Skip to content

Commit a28180b

Browse files
committed
Require whitespace before as in to/downto labels
The `RE_TO_DOWNTO_AS_LABELS` rule previously used `\s*` between `(to|downto)` and `(as)`, allowing zero spaces and accidentally matching identifiers like "toast". Change the pattern to `\s+` so that an actual space is required, preventing spurious `as` highlighting inside identifiers.
1 parent acd6d7d commit a28180b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

grammars/rescript.tmLanguage.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
}
2222
},
2323
{
24-
"match": "(to|downto)\\s*(as)",
24+
"match": "(to|downto)\\s+(as)",
2525
"captures": {
2626
"1": {
2727
"name": "variable"

0 commit comments

Comments
 (0)