From 06208e622f8306d30c177f2817bf43fe1e2d8862 Mon Sep 17 00:00:00 2001 From: Dusty Pomerleau Date: Sun, 18 Oct 2020 13:27:03 +1100 Subject: fix: prevent unwanted interpolation scopes --- editors/code/rust.tmGrammar.json | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) (limited to 'editors/code') 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 @@ "interpolations": { "comment": "curly brace interpolations", "name": "meta.interpolation.rust", - "begin": "{", - "beginCaptures": { - "0": { + "match": "({)[^\"{}]*(})", + "captures": { + "1": { "name": "punctuation.definition.interpolation.rust" - } - }, - "end": "}", - "endCaptures": { - "0": { + }, + "2": { "name": "punctuation.definition.interpolation.rust" } - }, - "patterns": [ - { - "include": "#interpolations" - } - ] + } }, "lifetimes": { "patterns": [ -- cgit v1.2.3