mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
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 <dustypomerleau@users.noreply.github.com>
This commit is contained in:
commit
cc63f153f0
1 changed files with 3 additions and 22 deletions
|
@ -958,28 +958,9 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"comment": "double-quoted raw strings and raw byte strings (no hash)",
|
"comment": "double-quoted raw strings and raw byte strings",
|
||||||
"name": "string.quoted.double.rust",
|
"name": "string.quoted.double.rust",
|
||||||
"begin": "(b?r)(\")",
|
"begin": "(b?r)(#*)(\")",
|
||||||
"beginCaptures": {
|
|
||||||
"1": {
|
|
||||||
"name": "string.quoted.byte.raw.rust"
|
|
||||||
},
|
|
||||||
"2": {
|
|
||||||
"name": "punctuation.definition.string.rust"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"end": "\"",
|
|
||||||
"endCaptures": {
|
|
||||||
"0": {
|
|
||||||
"name": "punctuation.definition.string.rust"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"comment": "double-quoted raw strings and raw byte strings (with hash)",
|
|
||||||
"name": "string.quoted.double.rust",
|
|
||||||
"begin": "(b?r)(#+)(\")",
|
|
||||||
"beginCaptures": {
|
"beginCaptures": {
|
||||||
"1": {
|
"1": {
|
||||||
"name": "string.quoted.byte.raw.rust"
|
"name": "string.quoted.byte.raw.rust"
|
||||||
|
@ -991,7 +972,7 @@
|
||||||
"name": "punctuation.definition.string.rust"
|
"name": "punctuation.definition.string.rust"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"end": "(\")(#+)",
|
"end": "(\")(\\2)",
|
||||||
"endCaptures": {
|
"endCaptures": {
|
||||||
"1": {
|
"1": {
|
||||||
"name": "punctuation.definition.string.rust"
|
"name": "punctuation.definition.string.rust"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue