aboutsummaryrefslogtreecommitdiff
path: root/editors/code
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-10-18 09:30:28 +0100
committerGitHub <[email protected]>2020-10-18 09:30:28 +0100
commit2067a410f31810f6e1941a86cdea0247c3b7d6f4 (patch)
tree9a23155bf75c535f93373ea2e1f8e1f1b8b9d532 /editors/code
parent7c4bb971456649ab18a5dadd355a96d53cb72ed1 (diff)
parent06208e622f8306d30c177f2817bf43fe1e2d8862 (diff)
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 <[email protected]>
Diffstat (limited to 'editors/code')
-rw-r--r--editors/code/rust.tmGrammar.json20
1 files changed, 6 insertions, 14 deletions
diff --git a/editors/code/rust.tmGrammar.json b/editors/code/rust.tmGrammar.json
index 66c8843f4..18fad6288 100644
--- a/editors/code/rust.tmGrammar.json
+++ b/editors/code/rust.tmGrammar.json
@@ -694,23 +694,15 @@
694 "interpolations": { 694 "interpolations": {
695 "comment": "curly brace interpolations", 695 "comment": "curly brace interpolations",
696 "name": "meta.interpolation.rust", 696 "name": "meta.interpolation.rust",
697 "begin": "{", 697 "match": "({)[^\"{}]*(})",
698 "beginCaptures": { 698 "captures": {
699 "0": { 699 "1": {
700 "name": "punctuation.definition.interpolation.rust" 700 "name": "punctuation.definition.interpolation.rust"
701 } 701 },
702 }, 702 "2": {
703 "end": "}",
704 "endCaptures": {
705 "0": {
706 "name": "punctuation.definition.interpolation.rust" 703 "name": "punctuation.definition.interpolation.rust"
707 } 704 }
708 }, 705 }
709 "patterns": [
710 {
711 "include": "#interpolations"
712 }
713 ]
714 }, 706 },
715 "lifetimes": { 707 "lifetimes": {
716 "patterns": [ 708 "patterns": [