From 71a88711ec184b7dde5240c8f150ad3c2dbbd5f1 Mon Sep 17 00:00:00 2001 From: RedCMD Date: Wed, 7 Aug 2024 22:22:11 +1200 Subject: [PATCH] Remove explicit `whitespace.separator` prefix from `block-scalar` --- syntaxes/yaml-1.0.tmLanguage.json | 24 +++++++++++------------- syntaxes/yaml-1.2.tmLanguage.json | 24 +++++++++++------------- 2 files changed, 22 insertions(+), 26 deletions(-) diff --git a/syntaxes/yaml-1.0.tmLanguage.json b/syntaxes/yaml-1.0.tmLanguage.json index a8b4a4d..c24dd58 100644 --- a/syntaxes/yaml-1.0.tmLanguage.json +++ b/syntaxes/yaml-1.0.tmLanguage.json @@ -310,15 +310,14 @@ "patterns": [ { "comment": "https://yaml.org/spec/1.2.2/#8111-block-indentation-indicator", - "begin": "([\t ]*+)(?>(\\|)|(>))(?[+-])?+((0)|(1)|(2)|(3)|(4)|(5)|(6)|(7)|(8)|(9))(?()|([+-]))?+", - "while": "\\G(?>(?>(?!\\6)|(?!\\7) |(?!\\8) {2}|(?!\\9) {3}|(?!\\10) {4}|(?!\\11) {5}|(?!\\12) {6}|(?!\\13) {7}|(?!\\14) {8}|(?!\\15) {9})| *+($|[^#]))", + "begin": "(?>(\\|)|(>))(?[+-])?+((0)|(1)|(2)|(3)|(4)|(5)|(6)|(7)|(8)|(9))(?()|([+-]))?+", + "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" }, @@ -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": [ diff --git a/syntaxes/yaml-1.2.tmLanguage.json b/syntaxes/yaml-1.2.tmLanguage.json index 60e7dfd..6ef5487 100644 --- a/syntaxes/yaml-1.2.tmLanguage.json +++ b/syntaxes/yaml-1.2.tmLanguage.json @@ -395,15 +395,14 @@ "patterns": [ { "comment": "https://yaml.org/spec/1.2.2/#8111-block-indentation-indicator", - "begin": "([\t ]*+)(?>(\\|)|(>))(?[+-])?+((1)|(2)|(3)|(4)|(5)|(6)|(7)|(8)|(9))(?()|([+-]))?+", - "while": "\\G(?>(?>(?!\\6) |(?!\\7) {2}|(?!\\8) {3}|(?!\\9) {4}|(?!\\10) {5}|(?!\\11) {6}|(?!\\12) {7}|(?!\\13) {8}|(?!\\14) {9})| *+($|[^#]))", + "begin": "(?>(\\|)|(>))(?[+-])?+((1)|(2)|(3)|(4)|(5)|(6)|(7)|(8)|(9))(?()|([+-]))?+", + "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" }, @@ -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": [