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:
bors[bot] 2020-10-18 08:30:28 +00:00 committed by GitHub
commit 2067a410f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -694,24 +694,16 @@
"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": [
{