aboutsummaryrefslogtreecommitdiff
path: root/editors
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-10-21 09:39:03 +0100
committerGitHub <[email protected]>2020-10-21 09:39:03 +0100
commitcc63f153f07af0d494f6bdfba9291e821a839807 (patch)
tree39ab750055297dc690bec1ec6e8fe60301efb991 /editors
parent729a832a76674366942c325bfb87d1d8650689f4 (diff)
parent93eeafc79feaf974d5ef2310e2e4be414ff0bf0b (diff)
Merge #6302
6302: Textmate grammar: fix raw string highlighting r=matklad a=dustypomerleau 1. Fixes the raw string highlighting issue noted by @matklad in https://github.com/rust-analyzer/rust-analyzer/pull/6275. 2. Improves raw string highlighting by requiring the number of surrounding `#` to match. Co-authored-by: Dusty Pomerleau <[email protected]>
Diffstat (limited to 'editors')
-rw-r--r--editors/code/rust.tmGrammar.json25
1 files changed, 3 insertions, 22 deletions
diff --git a/editors/code/rust.tmGrammar.json b/editors/code/rust.tmGrammar.json
index 18fad6288..3be565195 100644
--- a/editors/code/rust.tmGrammar.json
+++ b/editors/code/rust.tmGrammar.json
@@ -958,28 +958,9 @@
958 ] 958 ]
959 }, 959 },
960 { 960 {
961 "comment": "double-quoted raw strings and raw byte strings (no hash)", 961 "comment": "double-quoted raw strings and raw byte strings",
962 "name": "string.quoted.double.rust", 962 "name": "string.quoted.double.rust",
963 "begin": "(b?r)(\")", 963 "begin": "(b?r)(#*)(\")",
964 "beginCaptures": {
965 "1": {
966 "name": "string.quoted.byte.raw.rust"
967 },
968 "2": {
969 "name": "punctuation.definition.string.rust"
970 }
971 },
972 "end": "\"",
973 "endCaptures": {
974 "0": {
975 "name": "punctuation.definition.string.rust"
976 }
977 }
978 },
979 {
980 "comment": "double-quoted raw strings and raw byte strings (with hash)",
981 "name": "string.quoted.double.rust",
982 "begin": "(b?r)(#+)(\")",
983 "beginCaptures": { 964 "beginCaptures": {
984 "1": { 965 "1": {
985 "name": "string.quoted.byte.raw.rust" 966 "name": "string.quoted.byte.raw.rust"
@@ -991,7 +972,7 @@
991 "name": "punctuation.definition.string.rust" 972 "name": "punctuation.definition.string.rust"
992 } 973 }
993 }, 974 },
994 "end": "(\")(#+)", 975 "end": "(\")(\\2)",
995 "endCaptures": { 976 "endCaptures": {
996 "1": { 977 "1": {
997 "name": "punctuation.definition.string.rust" 978 "name": "punctuation.definition.string.rust"