Skip to content

Commit

Permalink
[YAML] Fix illegal scope covering string due to multi-push
Browse files Browse the repository at this point in the history
  • Loading branch information
deathaxe committed Feb 17, 2024
1 parent 6218337 commit ab20fc8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
8 changes: 4 additions & 4 deletions YAML/YAML.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
16 changes: 8 additions & 8 deletions YAML/tests/syntax_test_flow.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand All @@ -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

Expand All @@ -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'
Expand Down

0 comments on commit ab20fc8

Please sign in to comment.