Skip to content

Commit cc63f15

Browse files
Merge #6302
6302: Textmate grammar: fix raw string highlighting r=matklad a=dustypomerleau 1. Fixes the raw string highlighting issue noted by @matklad in #6275. 2. Improves raw string highlighting by requiring the number of surrounding `#` to match. Co-authored-by: Dusty Pomerleau <[email protected]>
2 parents 729a832 + 93eeafc commit cc63f15

File tree

1 file changed

+3
-22
lines changed

1 file changed

+3
-22
lines changed

editors/code/rust.tmGrammar.json

Lines changed: 3 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -958,28 +958,9 @@
958958
]
959959
},
960960
{
961-
"comment": "double-quoted raw strings and raw byte strings (no hash)",
961+
"comment": "double-quoted raw strings and raw byte strings",
962962
"name": "string.quoted.double.rust",
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)(#+)(\")",
963+
"begin": "(b?r)(#*)(\")",
983964
"beginCaptures": {
984965
"1": {
985966
"name": "string.quoted.byte.raw.rust"
@@ -991,7 +972,7 @@
991972
"name": "punctuation.definition.string.rust"
992973
}
993974
},
994-
"end": "(\")(#+)",
975+
"end": "(\")(\\2)",
995976
"endCaptures": {
996977
"1": {
997978
"name": "punctuation.definition.string.rust"

0 commit comments

Comments
 (0)