Merge #6275
6275: Textmate grammar: prevent unwanted interpolation scopes r=matklad a=dustypomerleau Fixes the issues noted by @matklad after merging #6248. 1. prevent accidental interpolation scopes when `{` is used in a string 1. prevent interpolations from extending beyond the end of a string Co-authored-by: Dusty Pomerleau <dustypomerleau@users.noreply.github.com>
This commit is contained in:
commit
2067a410f3
1 changed files with 7 additions and 15 deletions
|
@ -694,23 +694,15 @@
|
|||
"interpolations": {
|
||||
"comment": "curly brace interpolations",
|
||||
"name": "meta.interpolation.rust",
|
||||
"begin": "{",
|
||||
"beginCaptures": {
|
||||
"0": {
|
||||
"match": "({)[^\"{}]*(})",
|
||||
"captures": {
|
||||
"1": {
|
||||
"name": "punctuation.definition.interpolation.rust"
|
||||
},
|
||||
"2": {
|
||||
"name": "punctuation.definition.interpolation.rust"
|
||||
}
|
||||
},
|
||||
"end": "}",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.definition.interpolation.rust"
|
||||
}
|
||||
},
|
||||
"patterns": [
|
||||
{
|
||||
"include": "#interpolations"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"lifetimes": {
|
||||
"patterns": [
|
||||
|
|
Loading…
Add table
Reference in a new issue