From ab20fc8db374c9d942a2bb5c2533460f7cc4523f Mon Sep 17 00:00:00 2001 From: deathaxe Date: Sat, 17 Feb 2024 17:37:41 +0100 Subject: [PATCH] [YAML] Fix illegal scope covering string due to multi-push --- YAML/YAML.sublime-syntax | 8 ++++---- YAML/tests/syntax_test_flow.yaml | 16 ++++++++-------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/YAML/YAML.sublime-syntax b/YAML/YAML.sublime-syntax index 780aec9d4a..1cae918e96 100644 --- a/YAML/YAML.sublime-syntax +++ b/YAML/YAML.sublime-syntax @@ -526,14 +526,14 @@ contexts: flow-scalar-in-expect-end: - meta_include_prototype: false - - meta_content_scope: invalid.illegal.unexpected.yaml - - match: '{{_flow_scalar_end_plain_in}}' + - match: (?:(?!{{_flow_scalar_end_plain_in}}).)* + scope: invalid.illegal.unexpected.yaml pop: 1 flow-scalar-out-expect-end: - meta_include_prototype: false - - meta_content_scope: invalid.illegal.unexpected.yaml - - match: '{{_flow_scalar_end_plain_out}}' + - match: (?:(?!{{_flow_scalar_end_plain_out}}).)* + scope: invalid.illegal.unexpected.yaml pop: 1 flow-scalar-plain-in-implicit-type-11: diff --git a/YAML/tests/syntax_test_flow.yaml b/YAML/tests/syntax_test_flow.yaml index 6a89bd9cf6..ce3c05f464 100644 --- a/YAML/tests/syntax_test_flow.yaml +++ b/YAML/tests/syntax_test_flow.yaml @@ -23,13 +23,13 @@ # http://yaml.org/spec/1.2/spec.html#style/flow/double-quoted "flow string" -#^^^^^^^^^^^^ string.quoted.double +#^^^^^^^^^^^^ string.quoted.double - invalid # ^ punctuation.definition.string.end # <- string.quoted.double punctuation.definition.string.begin "flow string more string" -#^^^^^^^^^^^^ string.quoted.double +#^^^^^^^^^^^^ string.quoted.double - invalid # ^ punctuation.definition.string.end "\" \0 \\ \x1b \u12c4 \U1234F678" @@ -60,8 +60,8 @@ continuation" "string"illegal -# <- meta.string.yaml string.quoted.double.yaml -#^^^^^^^ meta.string.yaml string.quoted.double.yaml +# <- meta.string.yaml string.quoted.double.yaml - invalid +#^^^^^^^ meta.string.yaml string.quoted.double.yaml - invalid # ^^^^^^^ invalid.illegal.unexpected.yaml unquoted"string" @@ -73,13 +73,13 @@ unquoted"string" # http://yaml.org/spec/1.2/spec.html#style/flow/single-quoted 'flow string' -#^^^^^^^^^^^^ string.quoted.single +#^^^^^^^^^^^^ string.quoted.single - invalid # ^ punctuation.definition.string.end # <- string.quoted.single punctuation.definition.string.begin 'flow string more string' -#^^^^^^^^^^^^ string.quoted.single +#^^^^^^^^^^^^ string.quoted.single - invalid # ^ punctuation.definition.string.end # <- string.quoted.single @@ -89,8 +89,8 @@ unquoted"string" # ^ -constant 'string'illegal -# <- meta.string.yaml string.quoted.single.yaml -#^^^^^^^ meta.string.yaml string.quoted.single.yaml +# <- meta.string.yaml string.quoted.single.yaml - invalid +#^^^^^^^ meta.string.yaml string.quoted.single.yaml - invalid # ^^^^^^^ invalid.illegal.unexpected.yaml unquoted'string'