Skip to content

Commit

Permalink
Remove explicit whitespace.separator prefix from block-scalar
Browse files Browse the repository at this point in the history
  • Loading branch information
RedCMD committed Aug 7, 2024
1 parent 204a40e commit 71a8871
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 26 deletions.
24 changes: 11 additions & 13 deletions syntaxes/yaml-1.0.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -310,15 +310,14 @@
"patterns": [
{
"comment": "https://yaml.org/spec/1.2.2/#8111-block-indentation-indicator",
"begin": "([\t ]*+)(?>(\\|)|(>))(?<chomp>[+-])?+((0)|(1)|(2)|(3)|(4)|(5)|(6)|(7)|(8)|(9))(?(<chomp>)|([+-]))?+",
"while": "\\G(?>(?>(?!\\6)|(?!\\7) |(?!\\8) {2}|(?!\\9) {3}|(?!\\10) {4}|(?!\\11) {5}|(?!\\12) {6}|(?!\\13) {7}|(?!\\14) {8}|(?!\\15) {9})| *+($|[^#]))",
"begin": "(?>(\\|)|(>))(?<chomp>[+-])?+((0)|(1)|(2)|(3)|(4)|(5)|(6)|(7)|(8)|(9))(?(<chomp>)|([+-]))?+",
"while": "\\G(?>(?>(?!\\5)|(?!\\6) |(?!\\7) {2}|(?!\\8) {3}|(?!\\9) {4}|(?!\\10) {5}|(?!\\11) {6}|(?!\\12) {7}|(?!\\13) {8}|(?!\\14) {9})| *+($|[^#]))",
"beginCaptures": {
"1": { "name": "punctuation.whitespace.separator.yaml" },
"2": { "name": "keyword.control.flow.block-scalar.literal.yaml" },
"3": { "name": "keyword.control.flow.block-scalar.folded.yaml" },
"4": { "name": "storage.modifier.chomping-indicator.yaml" },
"5": { "name": "constant.numeric.indentation-indicator.yaml" },
"16": { "name": "storage.modifier.chomping-indicator.yaml" }
"1": { "name": "keyword.control.flow.block-scalar.literal.yaml" },
"2": { "name": "keyword.control.flow.block-scalar.folded.yaml" },
"3": { "name": "storage.modifier.chomping-indicator.yaml" },
"4": { "name": "constant.numeric.indentation-indicator.yaml" },
"15": { "name": "storage.modifier.chomping-indicator.yaml" }
},
"whileCaptures": {
"0": { "name": "punctuation.whitespace.indentation.yaml" },
Expand All @@ -342,13 +341,12 @@
{
"comment": "https://yaml.org/spec/1.2.2/#rule-c-b-block-header",
"//": "Soooooooo many edge cases",
"begin": "([\t ]*+)(?>(\\|)|(>))([+-]?+)",
"begin": "(?>(\\|)|(>))([+-]?+)",
"while": "\\G",
"beginCaptures": {
"1": { "name": "punctuation.whitespace.separator.yaml" },
"2": { "name": "keyword.control.flow.block-scalar.literal.yaml" },
"3": { "name": "keyword.control.flow.block-scalar.folded.yaml" },
"4": { "name": "storage.modifier.chomping-indicator.yaml" }
"1": { "name": "keyword.control.flow.block-scalar.literal.yaml" },
"2": { "name": "keyword.control.flow.block-scalar.folded.yaml" },
"3": { "name": "storage.modifier.chomping-indicator.yaml" }
},
"name": "meta.scalar.yaml",
"patterns": [
Expand Down
24 changes: 11 additions & 13 deletions syntaxes/yaml-1.2.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -395,15 +395,14 @@
"patterns": [
{
"comment": "https://yaml.org/spec/1.2.2/#8111-block-indentation-indicator",
"begin": "([\t ]*+)(?>(\\|)|(>))(?<chomp>[+-])?+((1)|(2)|(3)|(4)|(5)|(6)|(7)|(8)|(9))(?(<chomp>)|([+-]))?+",
"while": "\\G(?>(?>(?!\\6) |(?!\\7) {2}|(?!\\8) {3}|(?!\\9) {4}|(?!\\10) {5}|(?!\\11) {6}|(?!\\12) {7}|(?!\\13) {8}|(?!\\14) {9})| *+($|[^#]))",
"begin": "(?>(\\|)|(>))(?<chomp>[+-])?+((1)|(2)|(3)|(4)|(5)|(6)|(7)|(8)|(9))(?(<chomp>)|([+-]))?+",
"while": "\\G(?>(?>(?!\\5) |(?!\\6) {2}|(?!\\7) {3}|(?!\\8) {4}|(?!\\9) {5}|(?!\\10) {6}|(?!\\11) {7}|(?!\\12) {8}|(?!\\13) {9})| *+($|[^#]))",
"beginCaptures": {
"1": { "name": "punctuation.whitespace.separator.yaml" },
"2": { "name": "keyword.control.flow.block-scalar.literal.yaml" },
"3": { "name": "keyword.control.flow.block-scalar.folded.yaml" },
"4": { "name": "storage.modifier.chomping-indicator.yaml" },
"5": { "name": "constant.numeric.indentation-indicator.yaml" },
"15": { "name": "storage.modifier.chomping-indicator.yaml" }
"1": { "name": "keyword.control.flow.block-scalar.literal.yaml" },
"2": { "name": "keyword.control.flow.block-scalar.folded.yaml" },
"3": { "name": "storage.modifier.chomping-indicator.yaml" },
"4": { "name": "constant.numeric.indentation-indicator.yaml" },
"14": { "name": "storage.modifier.chomping-indicator.yaml" }
},
"whileCaptures": {
"0": { "name": "punctuation.whitespace.indentation.yaml" },
Expand All @@ -427,13 +426,12 @@
{
"comment": "https://yaml.org/spec/1.2.2/#rule-c-b-block-header",
"//": "Soooooooo many edge cases",
"begin": "([\t ]*+)(?>(\\|)|(>))([+-]?+)",
"begin": "(?>(\\|)|(>))([+-]?+)",
"while": "\\G",
"beginCaptures": {
"1": { "name": "punctuation.whitespace.separator.yaml" },
"2": { "name": "keyword.control.flow.block-scalar.literal.yaml" },
"3": { "name": "keyword.control.flow.block-scalar.folded.yaml" },
"4": { "name": "storage.modifier.chomping-indicator.yaml" }
"1": { "name": "keyword.control.flow.block-scalar.literal.yaml" },
"2": { "name": "keyword.control.flow.block-scalar.folded.yaml" },
"3": { "name": "storage.modifier.chomping-indicator.yaml" }
},
"name": "meta.scalar.yaml",
"patterns": [
Expand Down

1 comment on commit 71a8871

@RedCMD
Copy link
Owner Author

@RedCMD RedCMD commented on 71a8871 Aug 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Partially fixes microsoft/vscode#224978

Please sign in to comment.