Skip to content

Commit

Permalink
Fix line name interpolation
Browse files Browse the repository at this point in the history
Line names are scoped as unquoted strings, thus need to clear string-scope.
Hence prepend `less-string-interpolations` even though interpolation is already
handled by `identifier-content`.
  • Loading branch information
deathaxe committed Mar 16, 2024
1 parent 234fd74 commit 0388b42
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Syntaxes/Less.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ contexts:
- match: '{{lang_range_begin}}'
push: language-range-content

line-names-content:
line-name-content:
- meta_prepend: true
- include: less-string-interpolations

Expand Down
10 changes: 10 additions & 0 deletions tests/syntax_test_less.less
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,16 @@ custom-@{element}-selector {}
// ^^^^^^^^ meta.path.url.css meta.string.css string.unquoted.css
// ^^^^^^^^ meta.path.url.css meta.string.css meta.interpolation.less - string
// ^^^^ meta.path.url.css meta.string.css string.unquoted.css

grid: [@{line}name, line@{name}, li@{ne}name];
// ^^^^^^^ meta.string.css meta.interpolation.less - string
// ^^^^ meta.string.css string.unquoted.line-name.css
// ^^^^ meta.string.css string.unquoted.line-name.css
// ^^^^^^^ meta.string.css meta.interpolation.less - string
// ^^ meta.string.css string.unquoted.line-name.css
// ^^^^^ meta.string.css meta.interpolation.less - string
// ^^^^ meta.string.css string.unquoted.line-name.css

}

//=============================================================================
Expand Down

0 comments on commit 0388b42

Please sign in to comment.