Skip to content

Highlight $ in $: as keyword - #33

Merged
leafOfTree merged 1 commit into
masterfrom
dollar-keyword
Oct 21, 2026
Merged

leafOfTree merged 1 commit into
masterfrom
dollar-keyword

Conversation

@leafOfTree

Copy link
Copy Markdown
Owner

$: in <script> wasn't highlighted as svelteKeyword, as the check for adding $ to keyword characters used has("patch-7.4-1142"), which is never true.

Check patch-7.4.1142, and append $ to the current keyword characters instead of replacing them, which keeps - from css.vim for css keywords like font-size. For all test cases, the only change of syntax at the start and end of lines is svelteKeyword for $:.

Test: dollar.

The check for adding '$' to keyword characters used "patch-7.4-1142",
which is never true, so svelteKeyword never matched. Check
"patch-7.4.1142", and append '$' to the current keyword characters
instead of replacing them, which keeps '-' from css.vim for css keywords
like font-size.
@leafOfTree
leafOfTree merged commit 637769d into master Oct 21, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant