Skip to content

Commit

Permalink
correct highlighting of n+- in :nth-child(2n+1)
Browse files Browse the repository at this point in the history
  • Loading branch information
braver committed May 4, 2018
1 parent c824633 commit 03f7cb4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 5 additions & 1 deletion LESS.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -464,8 +464,12 @@ contexts:
pop: true
- match: '\('
scope: meta.group.css punctuation.section.group.begin.css
- match: '[0-9]+'
- match: '[+-]'
scope: keyword.operator.css
- match: '[0-9]+(n*)'
scope: meta.group.css constant.numeric.css
captures:
1: keyword.other.unit.css
- match: (:|::)(selection|first-line|first-letter|before|backdrop|after)\b
scope: meta.selector.css entity.other.pseudo-element.css
captures:
Expand Down
3 changes: 3 additions & 0 deletions syntax_test_less.less
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,9 @@ html::before {
.avatar:not(.class) {}
/* ^ meta.group.css entity.other.attribute-name.class.css */
/* ^ meta.group.css punctuation.section.group.end.css */
.class#id:nth-child(2n-1) {}
/* ^ constant.numeric.css keyword.other.unit.css */
/* ^ keyword.operator.css */
.avatar:nth-child(3) {
/* ^ entity.other.pseudo-class.css punctuation.definition.entity.css */
/*. ^ entity.other.pseudo-class.css */
Expand Down

0 comments on commit 03f7cb4

Please sign in to comment.