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 0f0bb5e commit e95edab
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Syntaxes/SCSS.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,10 @@ contexts:
- match: '{{lang_range_begin}}'
push: language-range-content

line-name-content:
- meta_prepend: true
- include: scss-string-interpolations

string-content:
- meta_prepend: true
- include: scss-string-interpolations
Expand Down
10 changes: 10 additions & 0 deletions Tests/syntax_test_scss.scss
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,16 @@
// ^ meta.property-value.css - meta.string - meta.interpolation
// ^^ meta.property-value.css meta.string.css string.unquoted.css
// ^^^^^^^^^^^^^ meta.property-value.css meta.string.css meta.interpolation.scss

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

}

.pseudo-class-lang:lang(#{$lng}-*K\*, de-#{$country}, *-#{$lng}-EN, "de-*#{"DE"}\*") {}
Expand Down

0 comments on commit e95edab

Please sign in to comment.