From 00a96d80066a5568bdab9db3f206df759150ee52 Mon Sep 17 00:00:00 2001 From: Noritada Kobayashi Date: Sat, 19 Nov 2022 17:10:17 +0900 Subject: [PATCH 1/2] Correct a escape character pattern This is a port of https://github.com/microsoft/vscode/pull/166792 . --- syntaxes/rust.tmLanguage.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/syntaxes/rust.tmLanguage.json b/syntaxes/rust.tmLanguage.json index 97e8abe..d8e4b51 100644 --- a/syntaxes/rust.tmLanguage.json +++ b/syntaxes/rust.tmLanguage.json @@ -419,7 +419,7 @@ "escapes": { "comment": "escapes: ASCII, byte, Unicode, quote, regex", "name": "constant.character.escape.rust", - "match": "(\\\\)(?:(?:(x[0-7][0-7a-fA-F])|(u(\\{)[\\da-fA-F]{4,6}(\\}))|.))", + "match": "(\\\\)(?:(?:(x[0-7][0-9a-fA-F])|(u(\\{)[\\da-fA-F]{4,6}(\\}))|.))", "captures": { "1": { "name": "constant.character.escape.backslash.rust" From 3cea7640a726349e882170eb214953b768df7c5c Mon Sep 17 00:00:00 2001 From: Noritada Kobayashi Date: Mon, 21 Nov 2022 23:44:23 +0900 Subject: [PATCH 2/2] Complete correction of escape character patterns (close #33) --- syntaxes/rust.tmLanguage.json | 4 ++-- syntaxes/rust.tmLanguage.yml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/syntaxes/rust.tmLanguage.json b/syntaxes/rust.tmLanguage.json index d8e4b51..ef69fed 100644 --- a/syntaxes/rust.tmLanguage.json +++ b/syntaxes/rust.tmLanguage.json @@ -419,7 +419,7 @@ "escapes": { "comment": "escapes: ASCII, byte, Unicode, quote, regex", "name": "constant.character.escape.rust", - "match": "(\\\\)(?:(?:(x[0-7][0-9a-fA-F])|(u(\\{)[\\da-fA-F]{4,6}(\\}))|.))", + "match": "(\\\\)(?:(?:(x[0-7][\\da-fA-F])|(u(\\{)[\\da-fA-F]{4,6}(\\}))|.))", "captures": { "1": { "name": "constant.character.escape.backslash.rust" @@ -1165,4 +1165,4 @@ ] } } -} \ No newline at end of file +} diff --git a/syntaxes/rust.tmLanguage.yml b/syntaxes/rust.tmLanguage.yml index 4ce86d8..741ebd5 100644 --- a/syntaxes/rust.tmLanguage.yml +++ b/syntaxes/rust.tmLanguage.yml @@ -242,7 +242,7 @@ repository: escapes: comment: 'escapes: ASCII, byte, Unicode, quote, regex' name: constant.character.escape.rust - match: (\\)(?:(?:(x[0-7][0-7a-fA-F])|(u(\{)[\da-fA-F]{4,6}(\}))|.)) + match: (\\)(?:(?:(x[0-7][\da-fA-F])|(u(\{)[\da-fA-F]{4,6}(\}))|.)) captures: 1: name: constant.character.escape.backslash.rust