From 1710b6ea53713ef69a66cd4b10195f9a9d30b87b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20Tsnobiladz=C3=A9?= Date: Thu, 2 Dec 2021 18:25:24 +0100 Subject: [PATCH 1/2] Fix escaped backtick in string literal (#324) should fix #324: ``` let regex = `\`` let foo = 10 ``` --- grammars/rescript.tmLanguage.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grammars/rescript.tmLanguage.json b/grammars/rescript.tmLanguage.json index 1285cded2..a53decbc4 100644 --- a/grammars/rescript.tmLanguage.json +++ b/grammars/rescript.tmLanguage.json @@ -127,7 +127,7 @@ { "name": "string.template", "begin": "([a-z_][0-9a-zA-Z_]*)?(`)", - "end": "`", + "end": "[^\\]`", "beginCaptures": { "1": { "name": "variables.annotation" From 5662d65c250e83024bf2e97ec2ef3241a2e8c68c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20Tsnobiladz=C3=A9?= Date: Wed, 19 Jan 2022 14:22:03 +0100 Subject: [PATCH 2/2] escape backslash for json --- grammars/rescript.tmLanguage.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grammars/rescript.tmLanguage.json b/grammars/rescript.tmLanguage.json index a53decbc4..d5c147e74 100644 --- a/grammars/rescript.tmLanguage.json +++ b/grammars/rescript.tmLanguage.json @@ -127,7 +127,7 @@ { "name": "string.template", "begin": "([a-z_][0-9a-zA-Z_]*)?(`)", - "end": "[^\\]`", + "end": "[^\\\\]`", "beginCaptures": { "1": { "name": "variables.annotation"