diff --git a/CHANGELOG.md b/CHANGELOG.md index 00097105b..3df13a94f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,8 @@ #### :bug: Bug fix +- Fix: incorrect highlighting of `as` inside labelled arguments like `toast` https://github.com/rescript-lang/rescript-vscode/pull/1085 + - Fix: bug where incremental analysis does not work when the project folder contains a dot. https://github.com/rescript-lang/rescript-vscode/pull/1080 - Fix: bug where incremental compilation crashes when rewatch is being run in a specific package vs the root of the monorepo. https://github.com/rescript-lang/rescript-vscode/pull/1082 diff --git a/grammars/rescript.tmLanguage.json b/grammars/rescript.tmLanguage.json index c01154554..7a5bade0f 100644 --- a/grammars/rescript.tmLanguage.json +++ b/grammars/rescript.tmLanguage.json @@ -10,7 +10,7 @@ "RE_TO_DOWNTO_AS_LABELS": { "patterns": [ { - "match": "(to|downto)\\s*(=)", + "match": "~(to|downto)\\s*(=)", "captures": { "1": { "name": "variable" @@ -21,7 +21,7 @@ } }, { - "match": "(to|downto)\\s*(as)", + "match": "~(to|downto)\\s+(as)", "captures": { "1": { "name": "variable"