diff --git a/extensions/vscode-colorize-tests/test/colorize-results/test_yaml.json b/extensions/vscode-colorize-tests/test/colorize-results/test_yaml.json index 9ab753e755618..0908e19e3eae0 100644 --- a/extensions/vscode-colorize-tests/test/colorize-results/test_yaml.json +++ b/extensions/vscode-colorize-tests/test/colorize-results/test_yaml.json @@ -701,7 +701,7 @@ }, { "c": "spotSize:", - "t": "source.yaml meta.stream.yaml meta.document.yaml meta.block.sequence.yaml meta.mapping.yaml meta.map.value.yaml invalid.illegal.unrecognized.yaml markup.strikethrough", + "t": "source.yaml meta.stream.yaml meta.document.yaml meta.block.sequence.yaml meta.mapping.yaml meta.map.value.yaml invalid.illegal.unrecognized.yaml", "r": { "dark_plus": "invalid: #F44747", "light_plus": "invalid: #CD3131", diff --git a/extensions/yaml/cgmanifest.json b/extensions/yaml/cgmanifest.json index 43dc4ca637e93..c75a4e52f89ca 100644 --- a/extensions/yaml/cgmanifest.json +++ b/extensions/yaml/cgmanifest.json @@ -6,7 +6,7 @@ "git": { "name": "RedCMD/YAML-Syntax-Highlighter", "repositoryUrl": "https://github.com/RedCMD/YAML-Syntax-Highlighter", - "commitHash": "287c71aeb0773759497822b5e5ce4bdc4d5ef2aa" + "commitHash": "60e2e6e24c63d5a703cb04577678a2e416edd956" } }, "licenseDetail": [ @@ -21,7 +21,7 @@ "THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE." ], "license": "MIT", - "version": "1.0.0" + "version": "1.0.1" } ], "version": 1 diff --git a/extensions/yaml/syntaxes/yaml-1.0.tmLanguage.json b/extensions/yaml/syntaxes/yaml-1.0.tmLanguage.json index 9f2a401ca5eb8..6ca3d9bf1b89b 100644 --- a/extensions/yaml/syntaxes/yaml-1.0.tmLanguage.json +++ b/extensions/yaml/syntaxes/yaml-1.0.tmLanguage.json @@ -4,7 +4,7 @@ "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], - "version": "https://github.com/RedCMD/YAML-Syntax-Highlighter/commit/287c71aeb0773759497822b5e5ce4bdc4d5ef2aa", + "version": "https://github.com/RedCMD/YAML-Syntax-Highlighter/commit/60e2e6e24c63d5a703cb04577678a2e416edd956", "name": "YAML 1.0", "scopeName": "source.yaml.1.0", "comment": "https://yaml.org/spec/1.0/", @@ -22,6 +22,9 @@ "while": "^", "name": "meta.stream.yaml", "patterns": [ + { + "include": "source.yaml.1.1#byte-order-mark" + }, { "include": "#directives" }, @@ -29,7 +32,7 @@ "include": "#document" }, { - "include": "#presentation-detail" + "include": "source.yaml.1.1#presentation-detail" } ] }, @@ -38,6 +41,9 @@ "while": "\\G", "name": "meta.stream.yaml", "patterns": [ + { + "include": "source.yaml.1.1#byte-order-mark" + }, { "include": "#directives" }, @@ -45,7 +51,7 @@ "include": "#document" }, { - "include": "#presentation-detail" + "include": "source.yaml.1.1#presentation-detail" } ] } @@ -78,13 +84,13 @@ "name": "meta.directives.yaml", "patterns": [ { - "include": "#directive-invalid" + "include": "source.yaml.1.1#directive-invalid" }, { "include": "#directives" }, { - "include": "#presentation-detail" + "include": "source.yaml.1.1#presentation-detail" } ] }, @@ -96,12 +102,12 @@ "include": "#document" }, { - "include": "#presentation-detail" + "include": "source.yaml.1.1#presentation-detail" } ] }, { - "include": "#presentation-detail" + "include": "source.yaml.1.1#presentation-detail" } ] }, @@ -150,7 +156,7 @@ } }, { - "include": "#presentation-detail" + "include": "source.yaml.1.1#presentation-detail" } ] }, @@ -159,44 +165,7 @@ "name": "invalid.illegal.entity.other.document.end.yaml" }, { - "include": "#presentation-detail" - } - ] - } - ] - }, - "directive-invalid": { - "patterns": [ - { - "match": "\\G\\.{3}(?=[\\x{85 2028 2029}\r\n\t ])", - "name": "invalid.illegal.entity.other.document.end.yaml" - }, - { - "begin": "\\G(%)(YAML)", - "end": "$", - "beginCaptures": { - "1": { - "name": "punctuation.definition.directive.begin.yaml" - }, - "2": { - "name": "invalid.illegal.keyword.other.directive.yaml.yaml" - } - }, - "name": "meta.directive.yaml", - "patterns": [ - { - "match": "\\G([\t ]++|:)([0-9]++\\.[0-9]++)?+", - "captures": { - "1": { - "name": "punctuation.whitespace.separator.yaml" - }, - "2": { - "name": "constant.numeric.yaml-version.yaml" - } - } - }, - { - "include": "#presentation-detail" + "include": "source.yaml.1.1#presentation-detail" } ] } @@ -234,12 +203,15 @@ }, "patterns": [ { - "include": "#presentation-detail" + "include": "source.yaml.1.1#presentation-detail" } ] }, { - "include": "#presentation-detail" + "include": "source.yaml.1.1#byte-order-mark" + }, + { + "include": "source.yaml.1.1#presentation-detail" } ] }, @@ -267,13 +239,13 @@ "include": "#block-scalar" }, { - "include": "#anchor-property" + "include": "source.yaml.1.1#anchor-property" }, { "include": "#tag-property" }, { - "include": "#alias" + "include": "source.yaml.1.1#alias" }, { "begin": "(?=\"|')", @@ -284,7 +256,7 @@ "while": "\\G", "patterns": [ { - "include": "#presentation-detail" + "include": "source.yaml.1.1#presentation-detail" } ] }, @@ -292,45 +264,45 @@ "include": "#double" }, { - "include": "#single" + "include": "source.yaml.1.1#single" } ] }, { - "begin": "(?=\\[|{)", - "while": "\\G", + "begin": "(?={)", + "end": "$", "patterns": [ { - "include": "#block-mapping" + "include": "#flow-mapping" }, { - "begin": "(?!\\G)(?![\r\n\t ])", - "while": "\\G", - "patterns": [ - { - "include": "#presentation-detail" - } - ] - }, + "include": "source.yaml.1.1#presentation-detail" + } + ] + }, + { + "begin": "(?=\\[)", + "end": "$", + "patterns": [ { - "include": "#flow-mapping" + "include": "#flow-sequence" }, { - "include": "#flow-sequence" + "include": "source.yaml.1.1#presentation-detail" } ] }, { - "include": "#block-plain-out" + "include": "source.yaml.1.1#block-plain-out" }, { - "include": "#presentation-detail" + "include": "source.yaml.1.1#presentation-detail" } ] }, "block-mapping": { "//": "The check for plain keys is expensive", - "begin": "(?=((?<=[-?:]) )?+)(?[!&*][^\\x{85 2028 2029}\r\n\t ]*+[\t ]++)*+)(?=(?>(?#Double Quote)\"(?>[^\\\\\"]++|\\\\.)*+\"|(?#Single Quote)'(?>[^']++|'')*+'|(?#Plain)(?>[^-?:,\\[\\]{}#&*!|>'\"%@` \\p{Cntrl}\\p{Surrogate}\\x{FEFF FFFE FFFF}]|[?:-](?![\\x{85 2028 2029}\r\n\t ]))(?>[^:#]++|:(?![\\x{85 2028 2029}\r\n\t ])|(?[!&*][^\\x{85 2028 2029}\r\n\t ]*+[\t ]++)*+)(?=(?>(?#Double Quote)\"(?>[^\\\\\"]++|\\\\.)*+\"|(?#Single Quote)'(?>[^']++|'')*+'|(?#Flow-Map){(?>[^\\x{85 2028 2029}}]++|}[ \t]*+(?!:[\\x{85 2028 2029}\r\n\t ]))++}|(?#Flow-Seq)\\[(?>[^\\x{85 2028 2029}\\]]++|][ \t]*+(?!:[\\x{85 2028 2029}\r\n\t ]))++]|(?#Plain)(?>[^-?:,\\[\\]{}#&*!|>'\"%@` \\p{Cntrl}\\p{Surrogate}\\x{FFFE FFFF}]|[?:-](?![\\x{85 2028 2029}\r\n\t ]))(?>[^:#]++|:(?![\\x{85 2028 2029}\r\n\t ])|(?(\\1\\2)((?>[!&*][^\\x{85 2028 2029}\r\n\t ]*+[\t ]++)*+)((?>\t[\t ]*+)?+[^\\x{85 2028 2029}\r\n\t ?:\\-#!&*\"'\\[\\]{}0-9A-Za-z$()+./;<=\\\\^_~\\x{A0}-\\x{D7FF}\\x{E000}-\\x{FFFD}\\x{010000}-\\x{10FFFF}])?+|( *+)([\t ]*+[^\\x{85 2028 2029}\r\n#])?+)", "beginCaptures": { "2": { @@ -346,18 +318,15 @@ "include": "#tag-property" }, { - "include": "#anchor-property" + "include": "source.yaml.1.1#anchor-property" }, { - "include": "#alias" + "include": "source.yaml.1.1#alias" }, { - "include": "#presentation-detail" + "include": "source.yaml.1.1#presentation-detail" } ] - }, - "5": { - "name": "punctuation.whitespace.separator.yaml" } }, "whileCaptures": { @@ -371,13 +340,13 @@ "include": "#tag-property" }, { - "include": "#anchor-property" + "include": "source.yaml.1.1#anchor-property" }, { - "include": "#alias" + "include": "source.yaml.1.1#alias" }, { - "include": "#presentation-detail" + "include": "source.yaml.1.1#presentation-detail" } ] }, @@ -394,72 +363,19 @@ "name": "meta.mapping.yaml", "patterns": [ { - "comment": "https://yaml.org/spec/1.2.2/#double-quoted-style (BLOCK-KEY)", - "begin": "\\G\"", - "end": "\"", - "beginCaptures": { - "0": { - "name": "punctuation.definition.string.begin.yaml" - } - }, - "endCaptures": { - "0": { - "name": "punctuation.definition.string.end.yaml" - } - }, - "name": "meta.map.key.yaml string.quoted.double.yaml entity.name.tag.yaml", - "patterns": [ - { - "match": ".[\t ]*+$", - "name": "invalid.illegal.multiline-key.yaml" - }, - { - "match": "[^\t -\\x{10FFFF}]++", - "name": "invalid.illegal.character.yaml" - }, - { - "include": "#double-escape" - } - ] + "include": "#block-map-key-double" }, { - "comment": "https://yaml.org/spec/1.2.2/#rule-c-single-quoted (BLOCK-KEY)", - "begin": "\\G'", - "end": "'(?!')", - "beginCaptures": { - "0": { - "name": "punctuation.definition.string.begin.yaml" - } - }, - "endCaptures": { - "0": { - "name": "punctuation.definition.string.end.yaml" - } - }, - "name": "meta.map.key.yaml string.quoted.single.yaml entity.name.tag.yaml", - "patterns": [ - { - "match": ".[\t ]*+$", - "name": "invalid.illegal.multiline-key.yaml" - }, - { - "match": "[^\t -\\x{10FFFF}]++", - "name": "invalid.illegal.character.yaml" - }, - { - "match": "''", - "name": "constant.character.escape.single-quote.yaml" - } - ] + "include": "source.yaml#block-map-key-single" }, { - "include": "#block-key-plain" + "include": "source.yaml.1.1#block-map-key-plain" }, { - "include": "#block-map-value" + "include": "#block-map-key-explicit" }, { - "include": "#block-map-explicit" + "include": "#block-map-value" }, { "include": "#flow-mapping" @@ -468,7 +384,7 @@ "include": "#flow-sequence" }, { - "include": "#presentation-detail" + "include": "source.yaml.1.1#presentation-detail" } ] }, @@ -505,10 +421,10 @@ } ] }, - "block-map-explicit": { + "block-map-key-explicit": { "comment": "https://yaml.org/spec/1.2.2/#rule-c-l-block-map-explicit-key", "begin": "(?=((?<=[-?:]) )?+)\\G( *+)(\\?)(?=[\\x{85 2028 2029}\r\n\t ])", - "while": "\\G(?>(\\1\\2)(?![?:0-9A-Za-z$()+./;<=\\\\^_~\\x{A0}-\\x{D7FF}\\x{E000}-\\x{FFFD}\\x{010000}-\\x{10FFFF}&&[^\\x{2028 2029 FEFF}]])((?>\t[\t ]*+)?+[^\\x{85 2028 2029}\r\n\t #\\-\\[\\]{}])?+|(?!\\1\\2)( *+)([\t ]*+[^\\x{85 2028 2029}\r\n#])?+)", + "while": "\\G(?>(\\1\\2)(?![?:0-9A-Za-z$()+./;<=\\\\^_~\\x{A0}-\\x{D7FF}\\x{E000}-\\x{FFFD}\\x{010000}-\\x{10FFFF}&&[^\\x{2028 2029}]])((?>\t[\t ]*+)?+[^\\x{85 2028 2029}\r\n\t #\\-\\[\\]{}])?+|(?!\\1\\2)( *+)([\t ]*+[^\\x{85 2028 2029}\r\n#])?+)", "beginCaptures": { "2": { "name": "punctuation.whitespace.indentation.yaml" @@ -540,10 +456,10 @@ "include": "#key-double" }, { - "include": "#key-single" + "include": "source.yaml#key-single" }, { - "include": "#flow-key-plain-out" + "include": "source.yaml.1.1#flow-key-plain-out" }, { "include": "#block-map-value" @@ -553,48 +469,48 @@ } ] }, - "block-map-value": { - "comment": "https://yaml.org/spec/1.2.2/#rule-c-l-block-map-implicit-value", - "begin": "(:)(?=[\\x{85 2028 2029}\r\n\t ])", - "while": "\\G(?![?:!\"'0-9A-Za-z$()+./;<=\\\\^_~\\[{\\x{A0}-\\x{D7FF}\\x{E000}-\\x{FFFD}\\x{010000}-\\x{10FFFF}&&[^\\x{2028 2029 FEFF}]]|-[^\\x{85 2028 2029}\r\n\t ])", + "block-map-key-double": { + "comment": "https://yaml.org/spec/1.2.2/#double-quoted-style (BLOCK-KEY)", + "begin": "\\G\"", + "end": "\"", "beginCaptures": { - "1": { - "name": "punctuation.separator.map.value.yaml" + "0": { + "name": "punctuation.definition.string.begin.yaml" } }, - "name": "meta.map.value.yaml", - "patterns": [ - { - "include": "#block-node" + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.yaml" } - ] - }, - "block-key-plain": { - "comment": "https://yaml.org/spec/1.2.2/#rule-ns-plain-one-line (BLOCK-KEY)", - "begin": "\\G(?=[^-?:,\\[\\]{}#&*!|>'\"%@` \\p{Cntrl}\\p{Surrogate}\\x{FFFE FFFF}]|[?:-](?![\\x{85 2028 2029}\r\n\t ]))", - "end": "(?=[\t ]*+:[\\x{85 2028 2029}\r\n\t ]|(?>[\t ]++|\\G)#)", - "name": "meta.map.key.yaml string.unquoted.plain.yaml entity.name.tag.yaml", + }, + "name": "meta.map.key.yaml string.quoted.double.yaml entity.name.tag.yaml", "patterns": [ { - "include": "#tag-implicit-plain-out" + "match": ".[\t ]*+$", + "name": "invalid.illegal.multiline-key.yaml" }, { - "match": "\\G([\t ]++)(.)", - "captures": { - "1": { - "name": "punctuation.whitespace.separator.yaml" - }, - "2": { - "name": "invalid.illegal.multiline-key.yaml" - } - } + "match": "[^\t -\\x{10FFFF}]++", + "name": "invalid.illegal.character.yaml" }, { - "match": "[\t ]++$", - "name": "punctuation.whitespace.separator.yaml" - }, + "include": "#double-escape" + } + ] + }, + "block-map-value": { + "comment": "https://yaml.org/spec/1.2.2/#rule-c-l-block-map-implicit-value", + "begin": ":(?=[\\x{85 2028 2029}\r\n\t ])", + "while": "\\G(?![?:!\"'0-9A-Za-z$()+./;<=\\\\^_~\\[{\\x{A0}-\\x{D7FF}\\x{E000}-\\x{FFFD}\\x{010000}-\\x{10FFFF}&&[^\\x{2028 2029}]]|-[^\\x{85 2028 2029}\r\n\t ])", + "beginCaptures": { + "0": { + "name": "punctuation.separator.map.value.yaml" + } + }, + "name": "meta.map.value.yaml", + "patterns": [ { - "include": "#non-printable" + "include": "#block-node" } ] }, @@ -641,7 +557,7 @@ "contentName": "string.unquoted.block.yaml", "patterns": [ { - "include": "#non-printable" + "include": "source.yaml#non-printable" } ] }, @@ -650,7 +566,7 @@ "end": "$", "patterns": [ { - "include": "#presentation-detail" + "include": "source.yaml.1.1#presentation-detail" } ] } @@ -701,7 +617,7 @@ "contentName": "string.unquoted.block.yaml", "patterns": [ { - "include": "#non-printable" + "include": "source.yaml#non-printable" } ] }, @@ -734,7 +650,7 @@ "contentName": "string.unquoted.block.yaml", "patterns": [ { - "include": "#non-printable" + "include": "source.yaml#non-printable" } ] } @@ -746,7 +662,7 @@ "while": "\\G", "patterns": [ { - "include": "#presentation-detail" + "include": "source.yaml.1.1#presentation-detail" } ] } @@ -758,7 +674,7 @@ "end": "$", "patterns": [ { - "include": "#presentation-detail" + "include": "source.yaml.1.1#presentation-detail" } ] } @@ -766,47 +682,6 @@ } ] }, - "block-plain-out": { - "comment": "https://yaml.org/spec/1.2.2/#rule-ns-plain-multi-line (FLOW-OUT)", - "begin": "(?=[^-?:,\\[\\]{}#&*!|>'\"%@` \\p{Cntrl}\\p{Surrogate}\\x{FEFF FFFE FFFF}]|[?:-](?![\\x{85 2028 2029}\r\n\t ]))", - "while": "\\G", - "patterns": [ - { - "begin": "\\G", - "end": "(?=(?>[\t ]++|\\G)#)", - "name": "string.unquoted.plain.out.yaml", - "patterns": [ - { - "include": "#tag-implicit-plain-out" - }, - { - "match": ":(?=[\\x{85 2028 2029}\r\n\t ])", - "name": "invalid.illegal.multiline-key.yaml" - }, - { - "match": "\\G[\t ]++", - "name": "punctuation.whitespace.separator.yaml" - }, - { - "match": "[\t ]++$", - "name": "punctuation.whitespace.separator.yaml" - }, - { - "include": "#non-printable" - } - ] - }, - { - "begin": "(?!\\G)", - "while": "\\G", - "patterns": [ - { - "include": "#presentation-detail" - } - ] - } - ] - }, "flow-node": { "comment": "https://yaml.org/spec/1.2.2/#rule-ns-flow-seq-entry (FLOW-IN)", "patterns": [ @@ -819,7 +694,7 @@ "end": "(?=[:,\\]}])", "patterns": [ { - "include": "#presentation-detail" + "include": "source.yaml.1.1#presentation-detail" } ] }, @@ -832,13 +707,13 @@ ] }, { - "include": "#anchor-property" + "include": "source.yaml.1.1#anchor-property" }, { "include": "#tag-property" }, { - "include": "#alias" + "include": "source.yaml.1.1#alias" }, { "begin": "(?=\"|')", @@ -849,7 +724,7 @@ "end": "(?=[:,\\]}])", "patterns": [ { - "include": "#presentation-detail" + "include": "source.yaml.1.1#presentation-detail" } ] }, @@ -857,15 +732,15 @@ "include": "#double" }, { - "include": "#single" + "include": "source.yaml.1.1#single" } ] }, { - "include": "#flow-plain-in" + "include": "source.yaml.1.1#flow-plain-in" }, { - "include": "#presentation-detail" + "include": "source.yaml.1.1#presentation-detail" } ] }, @@ -900,12 +775,12 @@ "name": "invalid.illegal.separator.sequence.yaml" }, { - "include": "#presentation-detail" + "include": "source.yaml.1.1#presentation-detail" } ] }, { - "include": "#flow-map-key-mapping" + "include": "#flow-mapping-map-key" }, { "include": "#flow-map-value-yaml" @@ -949,12 +824,12 @@ "name": "invalid.illegal.separator.sequence.yaml" }, { - "include": "#presentation-detail" + "include": "source.yaml.1.1#presentation-detail" } ] }, { - "include": "#flow-map-key-sequence" + "include": "#flow-sequence-map-key" }, { "include": "#flow-map-value-yaml" @@ -967,7 +842,7 @@ } ] }, - "flow-map-key-mapping": { + "flow-mapping-map-key": { "comment": "https://yaml.org/spec/1.2.2/#rule-ns-flow-map-entry (FLOW-IN)", "patterns": [ { @@ -981,7 +856,7 @@ "name": "meta.flow.map.explicit.yaml", "patterns": [ { - "include": "#flow-map-key-mapping" + "include": "#flow-mapping-map-key" }, { "include": "#flow-map-value-yaml" @@ -996,12 +871,12 @@ }, { "comment": "https://yaml.org/spec/1.2.2/#rule-ns-flow-map-implicit-entry (FLOW-IN)", - "begin": "(?=(?>[^-?:,\\[\\]{}#&*!|>'\"%@` \\p{Cntrl}\\p{Surrogate}\\x{FEFF FFFE FFFF}]|[?:-](?![\\x{85 2028 2029}\r\n\t ,\\[\\]{}])))", + "begin": "(?=(?>[^-?:,\\[\\]{}#&*!|>'\"%@` \\p{Cntrl}\\p{Surrogate}\\x{FFFE FFFF}]|[?:-](?![\\x{85 2028 2029}\r\n\t ,\\[\\]{}])))", "end": "(?=[,\\[\\]{}])", "name": "meta.flow.map.implicit.yaml", "patterns": [ { - "include": "#flow-key-plain-in" + "include": "source.yaml.1.1#flow-key-plain-in" }, { "match": ":(?=\\[|{)", @@ -1011,7 +886,7 @@ "include": "#flow-map-value-yaml" }, { - "include": "#presentation-detail" + "include": "source.yaml.1.1#presentation-detail" } ] }, @@ -1025,19 +900,19 @@ "include": "#key-double" }, { - "include": "#key-single" + "include": "source.yaml#key-single" }, { "include": "#flow-map-value-json" }, { - "include": "#presentation-detail" + "include": "source.yaml.1.1#presentation-detail" } ] } ] }, - "flow-map-key-sequence": { + "flow-sequence-map-key": { "comment": "https://yaml.org/spec/1.2.2/#rule-ns-flow-map-entry (FLOW-IN)", "patterns": [ { @@ -1051,7 +926,7 @@ "name": "meta.flow.map.explicit.yaml", "patterns": [ { - "include": "#flow-map-key-mapping" + "include": "#flow-mapping-map-key" }, { "include": "#flow-map-value-yaml" @@ -1066,12 +941,12 @@ }, { "comment": "https://yaml.org/spec/1.2.2/#rule-ns-flow-map-implicit-entry (FLOW-IN)", - "begin": "(?<=[\t ,\\[{]|^)(?=(?>[^-?:,\\[\\]{}#&*!|>'\"%@` \\p{Cntrl}\\p{Surrogate}\\x{FEFF FFFE FFFF}]|[?:-](?![\\x{85 2028 2029}\r\n\t ,\\[\\]{}]))(?>[^:#,\\[\\]{}]++|:(?![\\x{85 2028 2029}\r\n\t ,\\[\\]{}])|(?[^-?:,\\[\\]{}#&*!|>'\"%@` \\p{Cntrl}\\p{Surrogate}\\x{FFFE FFFF}]|[?:-](?![\\x{85 2028 2029}\r\n\t ,\\[\\]{}]))(?>[^:#,\\[\\]{}]++|:(?![\\x{85 2028 2029}\r\n\t ,\\[\\]{}])|(?'\"%@` \\p{Cntrl}\\p{Surrogate}\\x{FEFF FFFE FFFF}]|[?:-](?![\\x{85 2028 2029}\r\n\t ,\\[\\]{}]))", - "end": "(?=(?>[\t ]++|\\G)#|[\t ]*+[,\\[\\]{}])", - "name": "string.unquoted.plain.in.yaml", - "patterns": [ - { - "include": "#tag-implicit-plain-in" - }, - { - "match": "\\G[\t ]++", - "name": "punctuation.whitespace.separator.yaml" - }, - { - "match": "[\t ]++$", - "name": "punctuation.whitespace.separator.yaml" - }, - { - "match": ":(?=[\\x{85 2028 2029}\r\n\t ,\\[\\]{}])", - "name": "invalid.illegal.multiline-key.yaml" - }, - { - "include": "#non-printable" - } - ] - }, - "flow-key-plain-out": { - "comment": "https://yaml.org/spec/1.2.2/#rule-ns-plain-one-line (FLOW-OUT)", - "begin": "(?=[^-?:,\\[\\]{}#&*!|>'\"%@` \\p{Cntrl}\\p{Surrogate}\\x{FEFF FFFE FFFF}]|[?:-](?![\\x{85 2028 2029}\r\n\t ]))", - "end": "(?=[\t ]*+:[\\x{85 2028 2029}\r\n\t ]|[\t ]++#)", - "name": "meta.map.key.yaml string.unquoted.plain.yaml entity.name.tag.yaml", - "patterns": [ - { - "include": "#tag-implicit-plain-out" - }, - { - "match": "\\G[\t ]++", - "name": "punctuation.whitespace.separator.yaml" - }, - { - "match": "[\t ]++$", - "name": "punctuation.whitespace.separator.yaml" - }, - { - "include": "#non-printable" - } - ] - }, - "flow-key-plain-in": { - "comment": "https://yaml.org/spec/1.2.2/#rule-ns-s-implicit-yaml-key (FLOW-KEY)", - "begin": "\\G(?![\\x{85 2028 2029}\r\n\t #])", - "end": "(?=[\t ]*+(?>:[\\x{85 2028 2029}\r\n\t ,\\[\\]{}]|[,\\[\\]{}])|[\t ]++#)", - "name": "meta.flow.map.key.yaml string.unquoted.plain.in.yaml entity.name.tag.yaml", - "patterns": [ - { - "include": "#tag-implicit-plain-in" - }, - { - "include": "#non-printable" - } - ] - }, "key-double": { - "comment": "https://yaml.org/spec/1.2.2/#double-quoted-style", - "begin": "\\G\"", + "comment": "https://yaml.org/spec/1.2.2/#double-quoted-style (FLOW-OUT)", + "begin": "\"", "end": "\"", "beginCaptures": { "0": { @@ -1226,32 +1039,6 @@ } ] }, - "key-single": { - "comment": "https://yaml.org/spec/1.2.2/#rule-c-single-quoted (BLOCK-KEY)", - "begin": "\\G'", - "end": "'(?!')", - "beginCaptures": { - "0": { - "name": "punctuation.definition.string.begin.yaml" - } - }, - "endCaptures": { - "0": { - "name": "punctuation.definition.string.end.yaml" - } - }, - "name": "meta.map.key.yaml string.quoted.single.yaml entity.name.tag.yaml", - "patterns": [ - { - "match": "[^\t -\\x{10FFFF}]++", - "name": "invalid.illegal.character.yaml" - }, - { - "match": "''", - "name": "constant.character.escape.single-quote.yaml" - } - ] - }, "double": { "comment": "https://yaml.org/spec/1.2.2/#double-quoted-style", "begin": "\"", @@ -1285,40 +1072,6 @@ } ] }, - "single": { - "comment": "https://yaml.org/spec/1.2.2/#single-quoted-style", - "begin": "'", - "end": "'(?!')", - "beginCaptures": { - "0": { - "name": "punctuation.definition.string.begin.yaml" - } - }, - "endCaptures": { - "0": { - "name": "punctuation.definition.string.end.yaml" - } - }, - "name": "string.quoted.single.yaml", - "patterns": [ - { - "match": "(?null|Null|NULL|~)(?=[\t ]++#|[\t ]*+(?>[\\x{85 2028 2029}\r\n,\\]}]|:[\\x{85 2028 2029}\r\n\t ,\\[\\]{}]))", - "name": "constant.language.null.yaml" - }, - { - "match": "\\G(?>true|True|TRUE|false|False|FALSE|y|Y|yes|Yes|YES|n|N|no|No|NO|on|On|ON|off|Off|OFF)(?=[\t ]++#|[\t ]*+(?>[\\x{85 2028 2029}\r\n,\\]}]|:[\\x{85 2028 2029}\r\n\t ,\\[\\]{}]))", - "name": "constant.language.boolean.yaml" - }, - { - "match": "\\G[-+]?+(0|[1-9][0-9_]*+)(?=[\t ]++#|[\t ]*+(?>[\\x{85 2028 2029}\r\n,\\]}]|:[\\x{85 2028 2029}\r\n\t ,\\[\\]{}]))", - "name": "constant.numeric.integer.decimal.yaml" - }, - { - "match": "\\G[-+]?+0b[0-1_]++(?=[\t ]++#|[\t ]*+(?>[\\x{85 2028 2029}\r\n,\\]}]|:[\\x{85 2028 2029}\r\n\t ,\\[\\]{}]))", - "name": "constant.numeric.integer.binary.yaml" - }, - { - "match": "\\G[-+]?0[0-7_]++(?=[\t ]++#|[\t ]*+(?>[\\x{85 2028 2029}\r\n,\\]}]|:[\\x{85 2028 2029}\r\n\t ,\\[\\]{}]))", - "name": "constant.numeric.integer.octal.yaml" - }, - { - "match": "\\G[-+]?+0x[0-9a-fA-F_]++(?=[\t ]++#|[\t ]*+(?>[\\x{85 2028 2029}\r\n,\\]}]|:[\\x{85 2028 2029}\r\n\t ,\\[\\]{}]))", - "name": "constant.numeric.integer.hexadecimal.yaml" - }, - { - "match": "\\G[-+]?+[1-9][0-9_]*+(?>:[0-5]?[0-9])++(?=[\t ]++#|[\t ]*+(?>[\\x{85 2028 2029}\r\n,\\]}]|:[\\x{85 2028 2029}\r\n\t ,\\[\\]{}]))", - "name": "constant.numeric.integer.Sexagesimal.yaml" - }, - { - "match": "\\G[-+]?+(?>[0-9][0-9_]*+)?+\\.[0-9.]*+(?>[eE][-+][0-9]+)?+(?=[\t ]++#|[\t ]*+(?>[\\x{85 2028 2029}\r\n,\\]}]|:[\\x{85 2028 2029}\r\n\t ,\\[\\]{}]))", - "name": "constant.numeric.float.decimal.yaml" - }, - { - "match": "\\G[-+]?+[0-9][0-9_]*+(?>:[0-5]?[0-9])++\\.[0-9_]*+(?=[\t ]++#|[\t ]*+(?>[\\x{85 2028 2029}\r\n,\\]}]|:[\\x{85 2028 2029}\r\n\t ,\\[\\]{}]))", - "name": "constant.numeric.float.Sexagesimal.yaml" - }, - { - "match": "\\G[-+]?+\\.(?>inf|Inf|INF)(?=[\t ]++#|[\t ]*+(?>[\\x{85 2028 2029}\r\n,\\]}]|:[\\x{85 2028 2029}\r\n\t ,\\[\\]{}]))", - "name": "constant.numeric.float.inf.yaml" - }, - { - "match": "\\G\\.(?>nan|NaN|NAN)(?=[\t ]++#|[\t ]*+(?>[\\x{85 2028 2029}\r\n,\\]}]|:[\\x{85 2028 2029}\r\n\t ,\\[\\]{}]))", - "name": "constant.numeric.float.nan.yaml" - }, - { - "comment": "https://www.w3.org/TR/NOTE-datetime does not allow spaces, however https://yaml.org/type/timestamp.html does, but the provided regex doesn't match the TZD space in many of the YAML examples", - "match": "\\G(?>[0-9]{4}-[0-9]{2,1}-[0-9]{2,1}(?>T|t|[\t ]++)[0-9]{2,1}:[0-9]{2}:[0-9]{2}(?>\\.[0-9]*+)?+[\t ]*+(?>Z|[-+][0-9]{2,1}(?>:[0-9]{2})?+)?+|[0-9]{4}-[0-9]{2}-[0-9]{2})(?=[\t ]++#|[\t ]*+(?>[\\x{85 2028 2029}\r\n,\\]}]|:[\\x{85 2028 2029}\r\n\t ,\\[\\]{}]))", - "name": "constant.numeric.timestamp.yaml" - }, - { - "match": "\\G<<(?=[\t ]++#|[\t ]*+(?>[\\x{85 2028 2029}\r\n,\\]}]|:[\\x{85 2028 2029}\r\n\t ,\\[\\]{}]))", - "name": "constant.language.merge.yaml" - }, - { - "match": "\\G=(?=[\t ]++#|[\t ]*+(?>[\\x{85 2028 2029}\r\n,\\]}]|:[\\x{85 2028 2029}\r\n\t ,\\[\\]{}]))", - "name": "constant.language.value.yaml" - }, - { - "match": "\\G(?>!|&|\\*)(?=[\t ]++#|[\t ]*+(?>[\\x{85 2028 2029}\r\n,\\]}]|:[\\x{85 2028 2029}\r\n\t ,\\[\\]{}]))", - "name": "constant.language.yaml.yaml" - } - ] - }, - "tag-implicit-plain-out": { - "comment": "https://yaml.org/type/index.html", - "patterns": [ - { - "match": "\\G(?>null|Null|NULL|~)(?=[\t ]++#|[\t ]*+(?>$|:[\\x{85 2028 2029}\r\n\t ]))", - "name": "constant.language.null.yaml" - }, - { - "match": "\\G(?>true|True|TRUE|false|False|FALSE|yes|Yes|YES|y|Y|no|No|NO|n|N|on|On|ON|off|Off|OFF)(?=[\t ]++#|[\t ]*+(?>$|:[\\x{85 2028 2029}\r\n\t ]))", - "name": "constant.language.boolean.yaml" - }, - { - "match": "\\G[-+]?+(0|[1-9][0-9_]*+)(?=[\t ]++#|[\t ]*+(?>$|:[\\x{85 2028 2029}\r\n\t ]))", - "name": "constant.numeric.integer.decimal.yaml" - }, - { - "match": "\\G[-+]?+0b[0-1_]++(?=[\t ]++#|[\t ]*+(?>$|:[\\x{85 2028 2029}\r\n\t ]))", - "name": "constant.numeric.integer.binary.yaml" - }, - { - "match": "\\G[-+]?0[0-7_]++(?=[\t ]++#|[\t ]*+(?>$|:[\\x{85 2028 2029}\r\n\t ]))", - "name": "constant.numeric.integer.octal.yaml" - }, - { - "match": "\\G[-+]?+0x[0-9a-fA-F_]++(?=[\t ]++#|[\t ]*+(?>$|:[\\x{85 2028 2029}\r\n\t ]))", - "name": "constant.numeric.integer.hexadecimal.yaml" - }, - { - "match": "\\G[-+]?+[1-9][0-9_]*+(?>:[0-5]?[0-9])++(?=[\t ]++#|[\t ]*+(?>$|:[\\x{85 2028 2029}\r\n\t ]))", - "name": "constant.numeric.integer.Sexagesimal.yaml" - }, - { - "match": "\\G[-+]?+(?>[0-9][0-9_]*+)?+\\.[0-9.]*+(?>[eE][-+][0-9]+)?+(?=[\t ]++#|[\t ]*+(?>$|:[\\x{85 2028 2029}\r\n\t ]))", - "name": "constant.numeric.float.decimal.yaml" - }, - { - "match": "\\G[-+]?+[0-9][0-9_]*+(?>:[0-5]?[0-9])++\\.[0-9_]*+(?=[\t ]++#|[\t ]*+(?>$|:[\\x{85 2028 2029}\r\n\t ]))", - "name": "constant.numeric.float.Sexagesimal.yaml" - }, - { - "match": "\\G[-+]?+\\.(?>inf|Inf|INF)(?=[\t ]++#|[\t ]*+(?>$|:[\\x{85 2028 2029}\r\n\t ]))", - "name": "constant.numeric.float.inf.yaml" - }, - { - "match": "\\G\\.(?>nan|NaN|NAN)(?=[\t ]++#|[\t ]*+(?>$|:[\\x{85 2028 2029}\r\n\t ]))", - "name": "constant.numeric.float.nan.yaml" - }, - { - "comment": "https://www.w3.org/TR/NOTE-datetime does not allow spaces, however https://yaml.org/type/timestamp.html does, but the provided regex doesn't match the TZD space in many of the YAML examples", - "match": "\\G(?>[0-9]{4}-[0-9]{2,1}-[0-9]{2,1}(?>T|t|[\t ]++)[0-9]{2,1}:[0-9]{2}:[0-9]{2}(?>\\.[0-9]*+)?+[\t ]*+(?>Z|[-+][0-9]{2,1}(?>:[0-9]{2})?+)?+|[0-9]{4}-[0-9]{2}-[0-9]{2})(?=[\t ]++#|[\t ]*+(?>$|:[\\x{85 2028 2029}\r\n\t ]))", - "name": "constant.numeric.timestamp.yaml" - }, - { - "match": "\\G<<(?=[\t ]++#|[\t ]*+(?>$|:[\\x{85 2028 2029}\r\n\t ]))", - "name": "constant.language.merge.yaml" - }, - { - "match": "\\G=(?=[\t ]++#|[\t ]*+(?>$|:[\\x{85 2028 2029}\r\n\t ]))", - "name": "constant.language.value.yaml" - }, - { - "match": "\\G(?>!|&|\\*)(?=[\t ]++#|[\t ]*+(?>$|:[\\x{85 2028 2029}\r\n\t ]))", - "name": "constant.language.yaml.yaml" - } - ] - }, "tag-property": { "comment": "https://yaml.org/spec/1.0/#c-ns-tag-property", "//": [ @@ -1520,102 +1141,9 @@ "include": "#double-escape" }, { - "include": "#non-printable" - } - ] - }, - "anchor-property": { - "match": "(&)([^ \\p{Cntrl}\\p{Surrogate}\\x{2028 2029 FFFE FFFF}]++)|(&)", - "captures": { - "0": { - "name": "keyword.control.flow.anchor.yaml" - }, - "1": { - "name": "punctuation.definition.anchor.yaml" - }, - "2": { - "name": "variable.other.anchor.yaml" - }, - "3": { - "name": "invalid.illegal.flow.anchor.yaml" - } - } - }, - "alias": { - "begin": "(\\*)([^ \\p{Cntrl}\\p{Surrogate}\\x{2028 2029 FFFE FFFF}]++)|(\\*)", - "end": "(?=:[\\x{85 2028 2029}\r\n\t ,\\[\\]{}]|[,\\[\\]{}])", - "captures": { - "0": { - "name": "keyword.control.flow.alias.yaml" - }, - "1": { - "name": "punctuation.definition.alias.yaml" - }, - "2": { - "name": "variable.other.alias.yaml" - }, - "3": { - "name": "invalid.illegal.flow.alias.yaml" - } - }, - "patterns": [ - { - "include": "#presentation-detail" - } - ] - }, - "presentation-detail": { - "patterns": [ - { - "match": "[\t ]++", - "name": "punctuation.whitespace.separator.yaml" - }, - { - "include": "#non-printable" - }, - { - "include": "#comment" - }, - { - "include": "#unknown" + "include": "source.yaml#non-printable" } ] - }, - "non-printable": { - "//": { - "85": "…", - "2028": "
", - "2029": "
", - "10000": "𐀀", - "A0": " ", - "D7FF": "퟿", - "E000": "", - "FFFD": "�", - "FFFF": "￿", - "10FFFF": "􏿿" - }, - "match": "[^\t\n\r -~\\x{85}\\x{A0}-\\x{D7FF}\\x{E000}-\\x{FFFD}\\x{010000}-\\x{10FFFF}]++", - "name": "invalid.illegal.non-printable.yaml" - }, - "comment": { - "comment": "Comments must be separated from other tokens by white space characters. `space`, `tab`, `newline` or `carriage-return`. `#(.*)` causes performance issues", - "begin": "(?<=^|[\\x{85 2028 2029} ])#", - "end": "[\\x{85 2028 2029}\r\n]", - "captures": { - "0": { - "name": "punctuation.definition.comment.yaml" - } - }, - "name": "comment.line.number-sign.yaml", - "patterns": [ - { - "include": "#non-printable" - } - ] - }, - "unknown": { - "match": ".[[^\\x{85}#\"':,\\[\\]{}]&&!-~\\x{A0}-\\x{D7FF}\\x{E000}-\\x{FFFD}\\x{010000}-\\x{10FFFF}]*+", - "name": "invalid.illegal.unrecognized.yaml markup.strikethrough" } } } \ No newline at end of file diff --git a/extensions/yaml/syntaxes/yaml-1.1.tmLanguage.json b/extensions/yaml/syntaxes/yaml-1.1.tmLanguage.json index bda3a191ce8ce..3b7974a1a5dfd 100644 --- a/extensions/yaml/syntaxes/yaml-1.1.tmLanguage.json +++ b/extensions/yaml/syntaxes/yaml-1.1.tmLanguage.json @@ -4,7 +4,7 @@ "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], - "version": "https://github.com/RedCMD/YAML-Syntax-Highlighter/commit/287c71aeb0773759497822b5e5ce4bdc4d5ef2aa", + "version": "https://github.com/RedCMD/YAML-Syntax-Highlighter/commit/60e2e6e24c63d5a703cb04577678a2e416edd956", "name": "YAML 1.1", "scopeName": "source.yaml.1.1", "comment": "https://yaml.org/spec/1.1/", @@ -182,7 +182,7 @@ "name": "invalid.illegal.character.uri.yaml" }, { - "include": "#non-printable" + "include": "source.yaml#non-printable" }, { "match": "[^\\x{85 2028 2029}\r\n\t a-zA-Z0-9-#;/?:@&=+$,_.!~*'()\\[\\]]++", @@ -348,7 +348,7 @@ "include": "#block-mapping" }, { - "include": "#block-scalar" + "include": "source.yaml.1.2#block-scalar" }, { "include": "#anchor-property" @@ -381,26 +381,26 @@ ] }, { - "begin": "(?=\\[|{)", - "while": "\\G", + "begin": "(?={)", + "end": "$", "patterns": [ { - "include": "#block-mapping" + "include": "#flow-mapping" }, { - "begin": "(?!\\G)(?![\r\n\t ])", - "while": "\\G", - "patterns": [ - { - "include": "#presentation-detail" - } - ] - }, + "include": "#presentation-detail" + } + ] + }, + { + "begin": "(?=\\[)", + "end": "$", + "patterns": [ { - "include": "#flow-mapping" + "include": "#flow-sequence" }, { - "include": "#flow-sequence" + "include": "#presentation-detail" } ] }, @@ -414,7 +414,7 @@ }, "block-mapping": { "//": "The check for plain keys is expensive", - "begin": "(?=((?<=[-?:]) )?+)(?[!&*][^\\x{85 2028 2029}\r\n\t ]*+[\t ]++)*+)(?=(?>(?#Double Quote)\"(?>[^\\\\\"]++|\\\\.)*+\"|(?#Single Quote)'(?>[^']++|'')*+'|(?#Plain)(?>[^-?:,\\[\\]{}#&*!|>'\"%@` \\p{Cntrl}\\p{Surrogate}\\x{FFFE FFFF}]|[?:-](?![\\x{85 2028 2029}\r\n\t ]))(?>[^:#]++|:(?![\\x{85 2028 2029}\r\n\t ])|(?[!&*][^\\x{85 2028 2029}\r\n\t ]*+[\t ]++)*+)(?=(?>(?#Double Quote)\"(?>[^\\\\\"]++|\\\\.)*+\"|(?#Single Quote)'(?>[^']++|'')*+'|(?#Flow-Map){(?>[^\\x{85 2028 2029}}]++|}[ \t]*+(?!:[\\x{85 2028 2029}\r\n\t ]))++}|(?#Flow-Seq)\\[(?>[^\\x{85 2028 2029}\\]]++|][ \t]*+(?!:[\\x{85 2028 2029}\r\n\t ]))++]|(?#Plain)(?>[^-?:,\\[\\]{}#&*!|>'\"%@` \\p{Cntrl}\\p{Surrogate}\\x{FFFE FFFF}]|[?:-](?![\\x{85 2028 2029}\r\n\t ]))(?>[^:#]++|:(?![\\x{85 2028 2029}\r\n\t ])|(?(\\1\\2)((?>[!&*][^\\x{85 2028 2029}\r\n\t ]*+[\t ]++)*+)((?>\t[\t ]*+)?+[^\\x{85 2028 2029}\r\n\t ?:\\-#!&*\"'\\[\\]{}0-9A-Za-z$()+./;<=\\\\^_~\\x{A0}-\\x{D7FF}\\x{E000}-\\x{FFFD}\\x{010000}-\\x{10FFFF}])?+|( *+)([\t ]*+[^\\x{85 2028 2029}\r\n#])?+)", "beginCaptures": { "2": { @@ -439,9 +439,6 @@ "include": "#presentation-detail" } ] - }, - "5": { - "name": "punctuation.whitespace.separator.yaml" } }, "whileCaptures": { @@ -478,72 +475,19 @@ "name": "meta.mapping.yaml", "patterns": [ { - "comment": "https://yaml.org/spec/1.2.2/#double-quoted-style (BLOCK-KEY)", - "begin": "\\G\"", - "end": "\"", - "beginCaptures": { - "0": { - "name": "punctuation.definition.string.begin.yaml" - } - }, - "endCaptures": { - "0": { - "name": "punctuation.definition.string.end.yaml" - } - }, - "name": "meta.map.key.yaml string.quoted.double.yaml entity.name.tag.yaml", - "patterns": [ - { - "match": ".[\t ]*+$", - "name": "invalid.illegal.multiline-key.yaml" - }, - { - "match": "[^\t -\\x{10FFFF}]++", - "name": "invalid.illegal.character.yaml" - }, - { - "include": "#double-escape" - } - ] + "include": "#block-map-key-double" }, { - "comment": "https://yaml.org/spec/1.2.2/#rule-c-single-quoted (BLOCK-KEY)", - "begin": "\\G'", - "end": "'(?!')", - "beginCaptures": { - "0": { - "name": "punctuation.definition.string.begin.yaml" - } - }, - "endCaptures": { - "0": { - "name": "punctuation.definition.string.end.yaml" - } - }, - "name": "meta.map.key.yaml string.quoted.single.yaml entity.name.tag.yaml", - "patterns": [ - { - "match": ".[\t ]*+$", - "name": "invalid.illegal.multiline-key.yaml" - }, - { - "match": "[^\t -\\x{10FFFF}]++", - "name": "invalid.illegal.character.yaml" - }, - { - "match": "''", - "name": "constant.character.escape.single-quote.yaml" - } - ] + "include": "source.yaml#block-map-key-single" }, { - "include": "#block-key-plain" + "include": "#block-map-key-plain" }, { - "include": "#block-map-value" + "include": "#block-map-key-explicit" }, { - "include": "#block-map-explicit" + "include": "#block-map-value" }, { "include": "#flow-mapping" @@ -589,10 +533,10 @@ } ] }, - "block-map-explicit": { + "block-map-key-explicit": { "comment": "https://yaml.org/spec/1.2.2/#rule-c-l-block-map-explicit-key", "begin": "(?=((?<=[-?:]) )?+)\\G( *+)(\\?)(?=[\\x{85 2028 2029}\r\n\t ])", - "while": "\\G(?>(\\1\\2)(?![?:0-9A-Za-z$()+./;<=\\\\^_~\\x{A0}-\\x{D7FF}\\x{E000}-\\x{FFFD}\\x{010000}-\\x{10FFFF}&&[^\\x{2028 2029 FEFF}]])((?>\t[\t ]*+)?+[^\\x{85 2028 2029}\r\n\t #\\-\\[\\]{}])?+|(?!\\1\\2)( *+)([\t ]*+[^\\x{85 2028 2029}\r\n#])?+)", + "while": "\\G(?>(\\1\\2)(?![?:0-9A-Za-z$()+./;<=\\\\^_~\\x{A0}-\\x{D7FF}\\x{E000}-\\x{FFFD}\\x{010000}-\\x{10FFFF}&&[^\\x{2028 2029}]])((?>\t[\t ]*+)?+[^\\x{85 2028 2029}\r\n\t #\\-\\[\\]{}])?+|(?!\\1\\2)( *+)([\t ]*+[^\\x{85 2028 2029}\r\n#])?+)", "beginCaptures": { "2": { "name": "punctuation.whitespace.indentation.yaml" @@ -624,7 +568,7 @@ "include": "#key-double" }, { - "include": "#key-single" + "include": "source.yaml#key-single" }, { "include": "#flow-key-plain-out" @@ -637,23 +581,36 @@ } ] }, - "block-map-value": { - "comment": "https://yaml.org/spec/1.2.2/#rule-c-l-block-map-implicit-value", - "begin": "(:)(?=[\\x{85 2028 2029}\r\n\t ])", - "while": "\\G(?![?:!\"'0-9A-Za-z$()+./;<=\\\\^_~\\[{\\x{A0}-\\x{D7FF}\\x{E000}-\\x{FFFD}\\x{010000}-\\x{10FFFF}&&[^\\x{2028 2029 FEFF}]]|-[^\\x{85 2028 2029}\r\n\t ])", + "block-map-key-double": { + "comment": "https://yaml.org/spec/1.2.2/#double-quoted-style (BLOCK-KEY)", + "begin": "\\G\"", + "end": "\"", "beginCaptures": { - "1": { - "name": "punctuation.separator.map.value.yaml" + "0": { + "name": "punctuation.definition.string.begin.yaml" } }, - "name": "meta.map.value.yaml", + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.yaml" + } + }, + "name": "meta.map.key.yaml string.quoted.double.yaml entity.name.tag.yaml", "patterns": [ { - "include": "#block-node" + "match": ".[\t ]*+$", + "name": "invalid.illegal.multiline-key.yaml" + }, + { + "match": "[^\t -\\x{10FFFF}]++", + "name": "invalid.illegal.character.yaml" + }, + { + "include": "#double-escape" } ] }, - "block-key-plain": { + "block-map-key-plain": { "comment": "https://yaml.org/spec/1.2.2/#rule-ns-plain-one-line (BLOCK-KEY)", "begin": "\\G(?=[^-?:,\\[\\]{}#&*!|>'\"%@` \\p{Cntrl}\\p{Surrogate}\\x{FFFE FFFF}]|[?:-](?![\\x{85 2028 2029}\r\n\t ]))", "end": "(?=[\t ]*+:[\\x{85 2028 2029}\r\n\t ]|(?>[\t ]++|\\G)#)", @@ -678,175 +635,23 @@ "name": "punctuation.whitespace.separator.yaml" }, { - "include": "#non-printable" + "include": "source.yaml#non-printable" } ] }, - "block-scalar": { - "comment": "https://yaml.org/spec/1.2.2/#81-block-scalar-styles", + "block-map-value": { + "comment": "https://yaml.org/spec/1.2.2/#rule-c-l-block-map-implicit-value", + "begin": ":(?=[\\x{85 2028 2029}\r\n\t ])", + "while": "\\G(?![?:!\"'0-9A-Za-z$()+./;<=\\\\^_~\\[{\\x{A0}-\\x{D7FF}\\x{E000}-\\x{FFFD}\\x{010000}-\\x{10FFFF}&&[^\\x{2028 2029}]]|-[^\\x{85 2028 2029}\r\n\t ])", + "beginCaptures": { + "0": { + "name": "punctuation.separator.map.value.yaml" + } + }, + "name": "meta.map.value.yaml", "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})| *+($|[^#]))", - "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" - } - }, - "whileCaptures": { - "0": { - "name": "punctuation.whitespace.indentation.yaml" - }, - "1": { - "name": "invalid.illegal.expected-indentation.yaml" - } - }, - "name": "meta.scalar.yaml", - "patterns": [ - { - "begin": "$", - "while": "\\G", - "contentName": "string.unquoted.block.yaml", - "patterns": [ - { - "include": "#non-printable" - } - ] - }, - { - "begin": "\\G", - "end": "$", - "patterns": [ - { - "include": "#presentation-detail" - } - ] - } - ] - }, - { - "comment": "https://yaml.org/spec/1.2.2/#rule-c-b-block-header", - "//": "Soooooooo many edge cases", - "begin": "([\t ]*+)(?>(\\|)|(>))([+-]?+)", - "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" - } - }, - "name": "meta.scalar.yaml", - "patterns": [ - { - "comment": "https://yaml.org/spec/1.2.2/#rule-l-literal-content", - "begin": "$", - "while": "\\G", - "patterns": [ - { - "comment": "https://yaml.org/spec/1.2.2/#rule-l-nb-literal-text", - "//": "Find the highest indented line", - "begin": "\\G( ++)$", - "while": "\\G(?>(\\1)$|(?!\\1)( *+)($|.))", - "captures": { - "1": { - "name": "punctuation.whitespace.indentation.yaml" - }, - "2": { - "name": "punctuation.whitespace.indentation.yaml" - }, - "3": { - "name": "invalid.illegal.expected-indentation.yaml" - } - }, - "contentName": "string.unquoted.block.yaml", - "patterns": [ - { - "include": "#non-printable" - } - ] - }, - { - "comment": "https://yaml.org/spec/1.2.2/#rule-b-nb-literal-next", - "//": [ - "Funky wrapper function", - "The `end` pattern clears the parent `\\G` anchor", - "Affectively forcing this rule to only match at most once", - "https://github.com/microsoft/vscode-textmate/issues/114" - ], - "begin": "\\G(?!$)(?=( *+))", - "end": "\\G(?!\\1)(?=[\t ]*+#)", - "patterns": [ - { - "comment": "https://yaml.org/spec/1.2.2/#rule-l-nb-literal-text", - "begin": "\\G( *+)", - "while": "\\G(?>(\\1)|( *+)($|[^\t#]|[\t ]++[^#]))", - "captures": { - "1": { - "name": "punctuation.whitespace.indentation.yaml" - }, - "2": { - "name": "punctuation.whitespace.indentation.yaml" - }, - "3": { - "name": "invalid.illegal.expected-indentation.yaml" - } - }, - "contentName": "string.unquoted.block.yaml", - "patterns": [ - { - "include": "#non-printable" - } - ] - } - ] - }, - { - "comment": "https://yaml.org/spec/1.2.2/#rule-l-chomped-empty", - "begin": "(?!\\G)(?=[\t ]*+#)", - "while": "\\G", - "patterns": [ - { - "include": "#presentation-detail" - } - ] - } - ] - }, - { - "comment": "Header Comment", - "begin": "\\G", - "end": "$", - "patterns": [ - { - "include": "#presentation-detail" - } - ] - } - ] + "include": "#block-node" } ] }, @@ -876,7 +681,7 @@ "name": "punctuation.whitespace.separator.yaml" }, { - "include": "#non-printable" + "include": "source.yaml#non-printable" } ] }, @@ -989,7 +794,7 @@ ] }, { - "include": "#flow-map-key-mapping" + "include": "#flow-mapping-map-key" }, { "include": "#flow-map-value-yaml" @@ -1038,7 +843,7 @@ ] }, { - "include": "#flow-map-key-sequence" + "include": "#flow-sequence-map-key" }, { "include": "#flow-map-value-yaml" @@ -1051,7 +856,7 @@ } ] }, - "flow-map-key-mapping": { + "flow-mapping-map-key": { "comment": "https://yaml.org/spec/1.2.2/#rule-ns-flow-map-entry (FLOW-IN)", "patterns": [ { @@ -1065,7 +870,7 @@ "name": "meta.flow.map.explicit.yaml", "patterns": [ { - "include": "#flow-map-key-mapping" + "include": "#flow-mapping-map-key" }, { "include": "#flow-map-value-yaml" @@ -1109,7 +914,7 @@ "include": "#key-double" }, { - "include": "#key-single" + "include": "source.yaml#key-single" }, { "include": "#flow-map-value-json" @@ -1121,7 +926,7 @@ } ] }, - "flow-map-key-sequence": { + "flow-sequence-map-key": { "comment": "https://yaml.org/spec/1.2.2/#rule-ns-flow-map-entry (FLOW-IN)", "patterns": [ { @@ -1135,7 +940,7 @@ "name": "meta.flow.map.explicit.yaml", "patterns": [ { - "include": "#flow-map-key-mapping" + "include": "#flow-mapping-map-key" }, { "include": "#flow-map-value-yaml" @@ -1179,7 +984,7 @@ "include": "#key-double" }, { - "include": "#key-single" + "include": "source.yaml#key-single" }, { "include": "#flow-map-value-json" @@ -1245,7 +1050,7 @@ "name": "invalid.illegal.multiline-key.yaml" }, { - "include": "#non-printable" + "include": "source.yaml#non-printable" } ] }, @@ -1267,7 +1072,7 @@ "name": "punctuation.whitespace.separator.yaml" }, { - "include": "#non-printable" + "include": "source.yaml#non-printable" } ] }, @@ -1281,13 +1086,13 @@ "include": "#tag-implicit-plain-in" }, { - "include": "#non-printable" + "include": "source.yaml#non-printable" } ] }, "key-double": { - "comment": "https://yaml.org/spec/1.2.2/#double-quoted-style", - "begin": "\\G\"", + "comment": "https://yaml.org/spec/1.2.2/#double-quoted-style (FLOW-OUT)", + "begin": "\"", "end": "\"", "beginCaptures": { "0": { @@ -1310,32 +1115,6 @@ } ] }, - "key-single": { - "comment": "https://yaml.org/spec/1.2.2/#rule-c-single-quoted (BLOCK-KEY)", - "begin": "\\G'", - "end": "'(?!')", - "beginCaptures": { - "0": { - "name": "punctuation.definition.string.begin.yaml" - } - }, - "endCaptures": { - "0": { - "name": "punctuation.definition.string.end.yaml" - } - }, - "name": "meta.map.key.yaml string.quoted.single.yaml entity.name.tag.yaml", - "patterns": [ - { - "match": "[^\t -\\x{10FFFF}]++", - "name": "invalid.illegal.character.yaml" - }, - { - "match": "''", - "name": "constant.character.escape.single-quote.yaml" - } - ] - }, "double": { "comment": "https://yaml.org/spec/1.2.2/#double-quoted-style", "begin": "\"", @@ -1601,7 +1380,7 @@ "name": "invalid.illegal.constant.character.escape.unicode.8-bit.yaml" }, { - "include": "#non-printable" + "include": "source.yaml#non-printable" }, { "match": "[^\\x{85 2028 2029}\r\n\t a-zA-Z0-9-#;/?:@&=+$,_.!~*'()\\[\\]%>]++", @@ -1646,7 +1425,7 @@ "name": "invalid.illegal.constant.character.escape.unicode.8-bit.yaml" }, { - "include": "#non-printable" + "include": "source.yaml#non-printable" }, { "match": "[^\\x{85 2028 2029}\r\n\t a-zA-Z0-9-#;/?:@&=+$,_.~*'()\\[\\]%]++", @@ -1741,7 +1520,7 @@ "name": "punctuation.separator.line-break.yaml" }, { - "include": "#non-printable" + "include": "source.yaml#non-printable" }, { "include": "#comment" @@ -1751,23 +1530,6 @@ } ] }, - "non-printable": { - "//": { - "85": "…", - "2028": "
", - "2029": "
", - "10000": "𐀀", - "A0": " ", - "D7FF": "퟿", - "E000": "", - "FFFD": "�", - "FEFF": "", - "FFFF": "￿", - "10FFFF": "􏿿" - }, - "match": "[^\t\n\r -~\\x{85}\\x{A0}-\\x{D7FF}\\x{E000}-\\x{FFFD}\\x{010000}-\\x{10FFFF}]++", - "name": "invalid.illegal.non-printable.yaml" - }, "comment": { "comment": "Comments must be separated from other tokens by white space characters. `space`, `newline` or `carriage-return`. `#(.*)` causes performance issues", "begin": "(?<=^|[\\x{FEFF 85 2028 2029} ])#", @@ -1780,13 +1542,13 @@ "name": "comment.line.number-sign.yaml", "patterns": [ { - "include": "#non-printable" + "include": "source.yaml#non-printable" } ] }, "unknown": { - "match": ".[[^\\x{85}#\"':,\\[\\]{}]&&!-~\\x{A0}-\\x{D7FF}\\x{E000}-\\x{FFFD}\\x{010000}-\\x{10FFFF}]*+", - "name": "invalid.illegal.unrecognized.yaml markup.strikethrough" + "match": ".[[^\\x{85 2028 2029}#\"':,\\[\\]{}]&&!-~\\x{A0}-\\x{D7FF}\\x{E000}-\\x{FFFD}\\x{010000}-\\x{10FFFF}]*+", + "name": "invalid.illegal.unrecognized.yaml" } } } \ No newline at end of file diff --git a/extensions/yaml/syntaxes/yaml-1.2.tmLanguage.json b/extensions/yaml/syntaxes/yaml-1.2.tmLanguage.json index b2a921a5dd19b..711f5c8e4222f 100644 --- a/extensions/yaml/syntaxes/yaml-1.2.tmLanguage.json +++ b/extensions/yaml/syntaxes/yaml-1.2.tmLanguage.json @@ -4,7 +4,7 @@ "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], - "version": "https://github.com/RedCMD/YAML-Syntax-Highlighter/commit/287c71aeb0773759497822b5e5ce4bdc4d5ef2aa", + "version": "https://github.com/RedCMD/YAML-Syntax-Highlighter/commit/60e2e6e24c63d5a703cb04577678a2e416edd956", "name": "YAML 1.2", "scopeName": "source.yaml.1.2", "comment": "https://yaml.org/spec/1.2.2", @@ -170,7 +170,7 @@ "name": "invalid.illegal.character.uri.yaml" }, { - "include": "#non-printable" + "include": "source.yaml#non-printable" }, { "match": "[^\r\n\t a-zA-Z0-9-#;/?:@&=+$,_.!~*'()\\[\\]]++", @@ -369,26 +369,26 @@ ] }, { - "begin": "(?=\\[|{)", - "while": "\\G", + "begin": "(?={)", + "end": "$", "patterns": [ { - "include": "#block-mapping" + "include": "#flow-mapping" }, { - "begin": "(?!\\G)(?![\r\n\t ])", - "while": "\\G", - "patterns": [ - { - "include": "#presentation-detail" - } - ] - }, + "include": "#presentation-detail" + } + ] + }, + { + "begin": "(?=\\[)", + "end": "$", + "patterns": [ { - "include": "#flow-mapping" + "include": "#flow-sequence" }, { - "include": "#flow-sequence" + "include": "#presentation-detail" } ] }, @@ -402,7 +402,7 @@ }, "block-mapping": { "//": "The check for plain keys is expensive", - "begin": "(?=((?<=[-?:]) )?+)(?((?>[!&*][^\r\n\t ]*+[\t ]++)*+)(?=(?>(?#Double Quote)\"(?>[^\\\\\"]++|\\\\.)*+\"|(?#Single Quote)'(?>[^']++|'')*+'|(?#Plain)(?>[\\x{85}[^-?:,\\[\\]{}#&*!|>'\"%@` \\p{Cntrl}\\p{Surrogate}\\x{FEFF FFFE FFFF}]]|[?:-](?![\r\n\t ]))(?>[^:#]++|:(?![\r\n\t ])|(?((?>[!&*][^\r\n\t ]*+[\t ]++)*+)(?=(?>(?#Double Quote)\"(?>[^\\\\\"]++|\\\\.)*+\"|(?#Single Quote)'(?>[^']++|'')*+'|(?#Flow-Map){(?>[^}]++|}[ \t]*+(?!:[\r\n\t ]))++}|(?#Flow-Seq)\\[(?>[^]]++|][ \t]*+(?!:[\r\n\t ]))++]|(?#Plain)(?>[\\x{85}[^-?:,\\[\\]{}#&*!|>'\"%@` \\p{Cntrl}\\p{Surrogate}\\x{FEFF FFFE FFFF}]]|[?:-](?![\r\n\t ]))(?>[^:#]++|:(?![\r\n\t ])|(?(\\1\\2)((?>[!&*][^\r\n\t ]*+[\t ]++)*+)((?>\t[\t ]*+)?+[^\r\n\t ?:\\-#!&*\"'\\[\\]{}0-9A-Za-z$()+./;<=\\\\^_~\\x{85}\\x{A0}-\\x{D7FF}\\x{E000}-\\x{FFFD}\\x{010000}-\\x{10FFFF}])?+|( *+)([\t ]*+[^\r\n#])?+)", "beginCaptures": { "2": { @@ -427,9 +427,6 @@ "include": "#presentation-detail" } ] - }, - "5": { - "name": "punctuation.whitespace.separator.yaml" } }, "whileCaptures": { @@ -469,7 +466,7 @@ "include": "#block-map-key-double" }, { - "include": "#block-map-key-single" + "include": "source.yaml#block-map-key-single" }, { "include": "#block-map-key-plain" @@ -559,7 +556,7 @@ "include": "#key-double" }, { - "include": "#key-single" + "include": "source.yaml#key-single" }, { "include": "#flow-key-plain-out" @@ -601,36 +598,6 @@ } ] }, - "block-map-key-single": { - "comment": "https://yaml.org/spec/1.2.2/#rule-c-single-quoted (BLOCK-KEY)", - "begin": "\\G'", - "end": "'(?!')", - "beginCaptures": { - "0": { - "name": "punctuation.definition.string.begin.yaml" - } - }, - "endCaptures": { - "0": { - "name": "punctuation.definition.string.end.yaml" - } - }, - "name": "meta.map.key.yaml string.quoted.single.yaml entity.name.tag.yaml", - "patterns": [ - { - "match": ".[\t ]*+$", - "name": "invalid.illegal.multiline-key.yaml" - }, - { - "match": "[^\t -\\x{10FFFF}]++", - "name": "invalid.illegal.character.yaml" - }, - { - "match": "''", - "name": "constant.character.escape.single-quote.yaml" - } - ] - }, "block-map-key-plain": { "comment": "https://yaml.org/spec/1.2.2/#rule-ns-plain-one-line (BLOCK-KEY)", "begin": "\\G(?=[\\x{85}[^-?:,\\[\\]{}#&*!|>'\"%@` \\p{Cntrl}\\p{Surrogate}\\x{FEFF FFFE FFFF}]]|[?:-](?![\r\n\t ]))", @@ -660,7 +627,7 @@ "name": "invalid.illegal.bom.yaml" }, { - "include": "#non-printable" + "include": "source.yaml#non-printable" } ] }, @@ -723,7 +690,7 @@ "contentName": "string.unquoted.block.yaml", "patterns": [ { - "include": "#non-printable" + "include": "source.yaml#non-printable" } ] }, @@ -783,7 +750,7 @@ "contentName": "string.unquoted.block.yaml", "patterns": [ { - "include": "#non-printable" + "include": "source.yaml#non-printable" } ] }, @@ -816,7 +783,7 @@ "contentName": "string.unquoted.block.yaml", "patterns": [ { - "include": "#non-printable" + "include": "source.yaml#non-printable" } ] } @@ -878,7 +845,7 @@ "name": "invalid.illegal.bom.yaml" }, { - "include": "#non-printable" + "include": "source.yaml#non-printable" } ] }, @@ -1111,7 +1078,7 @@ "include": "#key-double" }, { - "include": "#key-single" + "include": "source.yaml#key-single" }, { "include": "#flow-map-value-json" @@ -1181,7 +1148,7 @@ "include": "#key-double" }, { - "include": "#key-single" + "include": "source.yaml#key-single" }, { "include": "#flow-map-value-json" @@ -1251,7 +1218,7 @@ "name": "invalid.illegal.bom.yaml" }, { - "include": "#non-printable" + "include": "source.yaml#non-printable" } ] }, @@ -1277,7 +1244,7 @@ "name": "invalid.illegal.bom.yaml" }, { - "include": "#non-printable" + "include": "source.yaml#non-printable" } ] }, @@ -1295,13 +1262,13 @@ "name": "invalid.illegal.bom.yaml" }, { - "include": "#non-printable" + "include": "source.yaml#non-printable" } ] }, "key-double": { - "comment": "https://yaml.org/spec/1.2.2/#double-quoted-style", - "begin": "\\G\"", + "comment": "https://yaml.org/spec/1.2.2/#double-quoted-style (FLOW-OUT)", + "begin": "\"", "end": "\"", "beginCaptures": { "0": { @@ -1324,32 +1291,6 @@ } ] }, - "key-single": { - "comment": "https://yaml.org/spec/1.2.2/#rule-c-single-quoted (BLOCK-KEY)", - "begin": "\\G'", - "end": "'(?!')", - "beginCaptures": { - "0": { - "name": "punctuation.definition.string.begin.yaml" - } - }, - "endCaptures": { - "0": { - "name": "punctuation.definition.string.end.yaml" - } - }, - "name": "meta.map.key.yaml string.quoted.single.yaml entity.name.tag.yaml", - "patterns": [ - { - "match": "[^\t -\\x{10FFFF}]++", - "name": "invalid.illegal.character.yaml" - }, - { - "match": "''", - "name": "constant.character.escape.single-quote.yaml" - } - ] - }, "double": { "comment": "https://yaml.org/spec/1.2.2/#double-quoted-style", "begin": "\"", @@ -1557,7 +1498,7 @@ "name": "invalid.illegal.constant.character.escape.unicode.8-bit.yaml" }, { - "include": "#non-printable" + "include": "source.yaml#non-printable" }, { "match": "[^\r\n\t a-zA-Z0-9-#;/?:@&=+$,_.!~*'()\\[\\]%>]++", @@ -1602,7 +1543,7 @@ "name": "invalid.illegal.constant.character.escape.unicode.8-bit.yaml" }, { - "include": "#non-printable" + "include": "source.yaml#non-printable" }, { "match": "[^\r\n\t a-zA-Z0-9-#;/?:@&=+$_.~*'()%]++", @@ -1664,7 +1605,7 @@ "name": "punctuation.whitespace.separator.yaml" }, { - "include": "#non-printable" + "include": "source.yaml#non-printable" }, { "include": "#comment" @@ -1674,22 +1615,6 @@ } ] }, - "non-printable": { - "//": { - "85": "…", - "10000": "𐀀", - "A0": " ", - "D7FF": "퟿", - "E000": "", - "FFFD": "�", - "FEFF": "", - "FFFF": "￿", - "10FFFF": "􏿿" - }, - "//match": "[\\p{Cntrl}\\p{Surrogate}\\x{FFFE FFFF}&&[^\t\n\r\\x{85}]]++", - "match": "[^\t\n\r -~\\x{85}\\x{A0}-\\x{D7FF}\\x{E000}-\\x{FFFD}\\x{010000}-\\x{10FFFF}]++", - "name": "invalid.illegal.non-printable.yaml" - }, "comment": { "comment": "Comments must be separated from other tokens by white space characters. `space`, `tab`, `newline` or `carriage-return`. `#(.*)` causes performance issues", "begin": "(?<=[\\x{FEFF}\t ]|^)#", @@ -1702,13 +1627,13 @@ "name": "comment.line.number-sign.yaml", "patterns": [ { - "include": "#non-printable" + "include": "source.yaml#non-printable" } ] }, "unknown": { "match": ".[[^\"':,\\[\\]{}]&&!-~\\x{85}\\x{A0}-\\x{D7FF}\\x{E000}-\\x{FFFD}\\x{010000}-\\x{10FFFF}]*+", - "name": "invalid.illegal.unrecognized.yaml markup.strikethrough" + "name": "invalid.illegal.unrecognized.yaml" } } } \ No newline at end of file diff --git a/extensions/yaml/syntaxes/yaml-1.3.tmLanguage.json b/extensions/yaml/syntaxes/yaml-1.3.tmLanguage.json index 56444fd9fa20c..8df69f61c8c43 100644 --- a/extensions/yaml/syntaxes/yaml-1.3.tmLanguage.json +++ b/extensions/yaml/syntaxes/yaml-1.3.tmLanguage.json @@ -4,59 +4,16 @@ "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], - "version": "https://github.com/RedCMD/YAML-Syntax-Highlighter/commit/287c71aeb0773759497822b5e5ce4bdc4d5ef2aa", + "version": "https://github.com/RedCMD/YAML-Syntax-Highlighter/commit/274009903e20ac6dc37ba5763fb853744e28c9b2", "name": "YAML 1.3", "scopeName": "source.yaml.1.3", "comment": "https://spec.yaml.io/main/spec/1.3.0/", "patterns": [ { - "include": "#stream" + "include": "source.yaml" } ], "repository": { - "stream": { - "patterns": [ - { - "comment": "allows me to just use `\\G` instead of the performance heavy `(^|\\G)`", - "begin": "^(?!\\G)", - "while": "^", - "name": "meta.stream.yaml", - "patterns": [ - { - "include": "#byte-order-mark" - }, - { - "include": "#directives" - }, - { - "include": "#document" - }, - { - "include": "#presentation-detail" - } - ] - }, - { - "begin": "\\G", - "while": "\\G", - "name": "meta.stream.yaml", - "patterns": [ - { - "include": "#byte-order-mark" - }, - { - "include": "#directives" - }, - { - "include": "#document" - }, - { - "include": "#presentation-detail" - } - ] - } - ] - }, "directive-YAML": { "comment": "https://yaml.org/spec/1.2.2/#681-yaml-directives", "begin": "(?=%YAML[\t ]+1\\.3(?=[\r\n\t ]))", @@ -84,1631 +41,20 @@ "name": "meta.directives.yaml", "patterns": [ { - "include": "#directive-invalid" - }, - { - "include": "#directives" - }, - { - "include": "#presentation-detail" - } - ] - }, - { - "include": "#document" - } - ] - }, - "directives": { - "comment": "https://yaml.org/spec/1.2.2/#68-directives", - "patterns": [ - { - "include": "source.yaml.1.3#directive-YAML" - }, - { - "include": "source.yaml.1.2#directive-YAML" - }, - { - "include": "source.yaml.1.1#directive-YAML" - }, - { - "include": "source.yaml.1.0#directive-YAML" - }, - { - "begin": "(?=%)", - "while": "\\G(?!%|---[\r\n\t ])", - "name": "meta.directives.yaml", - "patterns": [ - { - "comment": "https://yaml.org/spec/1.2.2/#682-tag-directives", - "begin": "\\G(%)(TAG)(?>([\t ]++)((!)(?>[0-9A-Za-z-]*+(!))?+))?+", - "end": "$", - "applyEndPatternLast": true, - "beginCaptures": { - "1": { - "name": "punctuation.definition.directive.begin.yaml" - }, - "2": { - "name": "keyword.other.directive.tag.yaml" - }, - "3": { - "name": "punctuation.whitespace.separator.yaml" - }, - "4": { - "name": "storage.type.tag-handle.yaml" - }, - "5": { - "name": "punctuation.definition.tag.begin.yaml" - }, - "6": { - "name": "punctuation.definition.tag.end.yaml" - }, - "comment": "https://yaml.org/spec/1.2.2/#rule-c-tag-handle" - }, - "patterns": [ - { - "comment": "technically the beginning should only validate against a valid uri scheme [A-Za-z][A-Za-z0-9.+-]*", - "begin": "\\G[\t ]++(?!#)", - "end": "(?=[\r\n\t ])", - "beginCaptures": { - "0": { - "name": "punctuation.whitespace.separator.yaml" - } - }, - "contentName": "support.type.tag-prefix.yaml", - "patterns": [ - { - "match": "%[0-9a-fA-F]{2}", - "name": "constant.character.escape.unicode.8-bit.yaml" - }, - { - "match": "%[^\r\n\t ]{2,0}", - "name": "invalid.illegal.constant.character.escape.unicode.8-bit.yaml" - }, - { - "match": "\\G[,\\[\\]{}]", - "name": "invalid.illegal.character.uri.yaml" - }, - { - "include": "#non-printable" - }, - { - "match": "[^\r\n\t a-zA-Z0-9-#;/?:@&=+$,_.!~*'()\\[\\]]++", - "name": "invalid.illegal.unrecognized.yaml" - } - ] - }, - { - "include": "#presentation-detail" - } - ] - }, - { - "comment": "https://yaml.org/spec/1.2.2/#rule-ns-reserved-directive", - "begin": "(%)([\\x{85}[^ \\p{Cntrl}\\p{Surrogate}\\x{FEFF FFFE FFFF}]]++)", - "end": "$", - "beginCaptures": { - "1": { - "name": "punctuation.definition.directive.begin.yaml" - }, - "2": { - "name": "keyword.other.directive.other.yaml" - } - }, - "patterns": [ - { - "match": "\\G([\t ]++)([\\x{85}[^ \\p{Cntrl}\\p{Surrogate}\\x{FEFF FFFE FFFF}]]++)", - "captures": { - "1": { - "name": "punctuation.whitespace.separator.yaml" - }, - "2": { - "name": "string.unquoted.directive-name.yaml" - } - } - }, - { - "match": "([\t ]++)([\\x{85}[^ \\p{Cntrl}\\p{Surrogate}\\x{FEFF FFFE FFFF}]]++)", - "captures": { - "1": { - "name": "punctuation.whitespace.separator.yaml" - }, - "2": { - "name": "string.unquoted.directive-parameter.yaml" - } - } - }, - { - "include": "#presentation-detail" - } - ] - }, - { - "match": "\\G\\.{3}(?=[\r\n\t ])", - "name": "invalid.illegal.entity.other.document.end.yaml" - }, - { - "include": "#presentation-detail" - } - ] - } - ] - }, - "directive-invalid": { - "patterns": [ - { - "match": "\\G\\.{3}(?=[\r\n\t ])", - "name": "invalid.illegal.entity.other.document.end.yaml" - }, - { - "begin": "\\G(%)(YAML)", - "end": "$", - "beginCaptures": { - "1": { - "name": "punctuation.definition.directive.begin.yaml" - }, - "2": { - "name": "invalid.illegal.keyword.other.directive.yaml.yaml" - } - }, - "name": "meta.directive.yaml", - "patterns": [ - { - "match": "\\G([\t ]++|:)([0-9]++\\.[0-9]++)?+", - "captures": { - "1": { - "name": "punctuation.whitespace.separator.yaml" - }, - "2": { - "name": "constant.numeric.yaml-version.yaml" - } - } - }, - { - "include": "#presentation-detail" - } - ] - } - ] - }, - "document": { - "comment": "https://yaml.org/spec/1.2.2/#91-documents", - "patterns": [ - { - "begin": "---(?=[\r\n\t ])", - "while": "\\G(?!(?>\\.{3}|---)[\r\n\t ])", - "beginCaptures": { - "0": { - "name": "entity.other.document.begin.yaml" - } - }, - "name": "meta.document.yaml", - "patterns": [ - { - "include": "#block-node" - } - ] - }, - { - "begin": "(?=\\.{3}[\r\n\t ])", - "while": "\\G(?=[\t \\x{FEFF}]*+(?>#|$))", - "patterns": [ - { - "begin": "\\G\\.{3}", - "end": "$", - "beginCaptures": { - "0": { - "name": "entity.other.document.end.yaml" - } - }, - "patterns": [ - { - "include": "#presentation-detail" - } - ] - }, - { - "include": "#byte-order-mark" - }, - { - "include": "#presentation-detail" - } - ] - }, - { - "begin": "\\G(?!%|[\t \\x{FEFF}]*+(?>#|$))", - "while": "\\G(?!(?>\\.{3}|---)[\r\n\t ])", - "name": "meta.document.yaml", - "patterns": [ - { - "include": "#block-node" - } - ] - } - ] - }, - "block-node": { - "patterns": [ - { - "include": "#block-sequence" - }, - { - "include": "#block-mapping" - }, - { - "include": "#block-scalar" - }, - { - "include": "#anchor-property" - }, - { - "include": "#tag-property" - }, - { - "include": "#alias" - }, - { - "begin": "(?=\"|')", - "while": "\\G", - "patterns": [ - { - "begin": "(?!\\G)", - "while": "\\G", - "patterns": [ - { - "include": "#presentation-detail" - } - ] - }, - { - "include": "#double" - }, - { - "include": "#single" - } - ] - }, - { - "begin": "(?=\\[|{)", - "while": "\\G", - "patterns": [ - { - "include": "#block-mapping" - }, - { - "begin": "(?!\\G)(?![\r\n\t ])", - "while": "\\G", - "patterns": [ - { - "include": "#presentation-detail" - } - ] - }, - { - "include": "#flow-mapping" - }, - { - "include": "#flow-sequence" - } - ] - }, - { - "include": "#block-plain-out" - }, - { - "include": "#presentation-detail" - } - ] - }, - "block-mapping": { - "//": "The check for plain keys is expensive", - "begin": "(?=((?<=[-?:]) )?+)(?((?>[!&*][^\r\n\t ]*+[\t ]++)*+)(?=(?>(?#Double Quote)\"(?>[^\\\\\"]++|\\\\.)*+\"|(?#Single Quote)'(?>[^']++|'')*+'|(?#Plain)(?>[\\x{85}[^-?:,\\[\\]{}#&*!|>'\"%@` \\p{Cntrl}\\p{Surrogate}\\x{FEFF FFFE FFFF}]]|[?:-](?![\r\n\t ]))(?>[^:#]++|:(?![\r\n\t ])|(?(\\1\\2)((?>[!&*][^\r\n\t ]*+[\t ]++)*+)((?>\t[\t ]*+)?+[^\r\n\t ?:\\-#!&*\"'\\[\\]{}0-9A-Za-z$()+./;<=\\\\^_~\\x{85}\\x{A0}-\\x{D7FF}\\x{E000}-\\x{FFFD}\\x{010000}-\\x{10FFFF}])?+|( *+)([\t ]*+[^\r\n#])?+)", - "beginCaptures": { - "2": { - "name": "punctuation.whitespace.indentation.yaml" - }, - "3": { - "name": "punctuation.whitespace.separator.yaml" - }, - "4": { - "comment": "May cause lag on long lines starting with a tag, anchor or alias", - "patterns": [ - { - "include": "#tag-property" - }, - { - "include": "#anchor-property" - }, - { - "include": "#alias" - }, - { - "include": "#presentation-detail" - } - ] - }, - "5": { - "name": "punctuation.whitespace.separator.yaml" - } - }, - "whileCaptures": { - "1": { - "name": "punctuation.whitespace.indentation.yaml" - }, - "2": { - "comment": "May cause lag on long lines starting with a tag, anchor or alias", - "patterns": [ - { - "include": "#tag-property" - }, - { - "include": "#anchor-property" + "include": "source.yaml.1.2#directive-invalid" }, { - "include": "#alias" + "include": "source.yaml.1.2#directives" }, { - "include": "#presentation-detail" + "include": "source.yaml.1.2#presentation-detail" } ] }, - "3": { - "name": "invalid.illegal.expected-indentation.yaml" - }, - "4": { - "name": "punctuation.whitespace.indentation.yaml" - }, - "5": { - "name": "invalid.illegal.expected-indentation.yaml" - } - }, - "name": "meta.mapping.yaml", - "patterns": [ - { - "include": "#block-map-key-double" - }, - { - "include": "#block-map-key-single" - }, - { - "include": "#block-map-key-plain" - }, - { - "include": "#block-map-key-explicit" - }, - { - "include": "#block-map-value" - }, - { - "include": "#flow-mapping" - }, - { - "include": "#flow-sequence" - }, - { - "include": "#presentation-detail" - } - ] - }, - "block-sequence": { - "comment": "https://yaml.org/spec/1.2.2/#rule-l+block-sequence", - "begin": "(?=((?<=[-?:]) )?+)(?(\\1\\2)(?!-[\r\n\t ])((?>\t[\t ]*+)?+[^\r\n\t #\\]}])?+|(?!\\1\\2)( *+)([\t ]*+[^\r\n#])?+)", - "beginCaptures": { - "2": { - "name": "punctuation.whitespace.indentation.yaml" - }, - "3": { - "name": "punctuation.definition.block.sequence.item.yaml" - } - }, - "whileCaptures": { - "1": { - "name": "punctuation.whitespace.indentation.yaml" - }, - "2": { - "name": "invalid.illegal.expected-indentation.yaml" - }, - "3": { - "name": "punctuation.whitespace.indentation.yaml" - }, - "4": { - "name": "invalid.illegal.expected-indentation.yaml" - } - }, - "name": "meta.block.sequence.yaml", - "patterns": [ - { - "include": "#block-node" - } - ] - }, - "block-map-key-explicit": { - "comment": "https://yaml.org/spec/1.2.2/#rule-c-l-block-map-explicit-key", - "begin": "(?=((?<=[-?:]) )?+)\\G( *+)(\\?)(?=[\r\n\t ])", - "while": "\\G(?>(\\1\\2)(?![?:0-9A-Za-z$()+./;<=\\\\^_~\\x{85}\\x{A0}-\\x{D7FF}\\x{E000}-\\x{FFFD}\\x{010000}-\\x{10FFFF}&&[^\\x{FEFF}]])((?>\t[\t ]*+)?+[^\r\n\t #\\-\\[\\]{}])?+|(?!\\1\\2)( *+)([\t ]*+[^\r\n#])?+)", - "beginCaptures": { - "2": { - "name": "punctuation.whitespace.indentation.yaml" - }, - "3": { - "name": "punctuation.definition.map.key.yaml" - }, - "4": { - "name": "punctuation.whitespace.separator.yaml" - } - }, - "whileCaptures": { - "1": { - "name": "punctuation.whitespace.indentation.yaml" - }, - "2": { - "name": "invalid.illegal.expected-indentation.yaml" - }, - "3": { - "name": "punctuation.whitespace.indentation.yaml" - }, - "4": { - "name": "invalid.illegal.expected-indentation.yaml" - } - }, - "name": "meta.map.explicit.yaml", - "patterns": [ - { - "include": "#key-double" - }, - { - "include": "#key-single" - }, - { - "include": "#flow-key-plain-out" - }, - { - "include": "#block-map-value" - }, - { - "include": "#block-node" - } - ] - }, - "block-map-key-double": { - "comment": "https://yaml.org/spec/1.2.2/#double-quoted-style (BLOCK-KEY)", - "begin": "\\G\"", - "end": "\"", - "beginCaptures": { - "0": { - "name": "punctuation.definition.string.begin.yaml" - } - }, - "endCaptures": { - "0": { - "name": "punctuation.definition.string.end.yaml" - } - }, - "name": "meta.map.key.yaml string.quoted.double.yaml entity.name.tag.yaml", - "patterns": [ - { - "match": ".[\t ]*+$", - "name": "invalid.illegal.multiline-key.yaml" - }, - { - "match": "[^\t -\\x{10FFFF}]++", - "name": "invalid.illegal.character.yaml" - }, - { - "include": "#double-escape" - } - ] - }, - "block-map-key-single": { - "comment": "https://yaml.org/spec/1.2.2/#rule-c-single-quoted (BLOCK-KEY)", - "begin": "\\G'", - "end": "'(?!')", - "beginCaptures": { - "0": { - "name": "punctuation.definition.string.begin.yaml" - } - }, - "endCaptures": { - "0": { - "name": "punctuation.definition.string.end.yaml" - } - }, - "name": "meta.map.key.yaml string.quoted.single.yaml entity.name.tag.yaml", - "patterns": [ - { - "match": ".[\t ]*+$", - "name": "invalid.illegal.multiline-key.yaml" - }, - { - "match": "[^\t -\\x{10FFFF}]++", - "name": "invalid.illegal.character.yaml" - }, - { - "match": "''", - "name": "constant.character.escape.single-quote.yaml" - } - ] - }, - "block-map-key-plain": { - "comment": "https://yaml.org/spec/1.2.2/#rule-ns-plain-one-line (BLOCK-KEY)", - "begin": "\\G(?=[\\x{85}[^-?:,\\[\\]{}#&*!|>'\"%@` \\p{Cntrl}\\p{Surrogate}\\x{FEFF FFFE FFFF}]]|[?:-](?![\r\n\t ]))", - "end": "(?=[\t ]*+:[\r\n\t ]|(?>[\t ]++|\\G)#)", - "name": "meta.map.key.yaml string.unquoted.plain.yaml entity.name.tag.yaml", - "patterns": [ - { - "include": "#tag-implicit-plain-out" - }, - { - "match": "\\G([\t ]++)(.)", - "captures": { - "1": { - "name": "punctuation.whitespace.separator.yaml" - }, - "2": { - "name": "invalid.illegal.multiline-key.yaml" - } - } - }, - { - "match": "[\t ]++$", - "name": "punctuation.whitespace.separator.yaml" - }, - { - "match": "\\x{FEFF}", - "name": "invalid.illegal.bom.yaml" - }, - { - "include": "#non-printable" - } - ] - }, - "block-map-value": { - "comment": "https://yaml.org/spec/1.2.2/#rule-c-l-block-map-implicit-value", - "begin": ":(?=[\r\n\t ])", - "while": "\\G(?![?:!\"'0-9A-Za-z$()+./;<=\\\\^_~\\[{\\x{85}\\x{A0}-\\x{D7FF}\\x{E000}-\\x{FFFD}\\x{010000}-\\x{10FFFF}&&[^\\x{FEFF}]]|-[^\r\n\t ])", - "beginCaptures": { - "0": { - "name": "punctuation.separator.map.value.yaml" - } - }, - "name": "meta.map.value.yaml", - "patterns": [ - { - "include": "#block-node" - } - ] - }, - "block-scalar": { - "comment": "https://yaml.org/spec/1.2.2/#81-block-scalar-styles", - "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})| *+($|[^#]))", - "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" - } - }, - "whileCaptures": { - "0": { - "name": "punctuation.whitespace.indentation.yaml" - }, - "1": { - "name": "invalid.illegal.expected-indentation.yaml" - } - }, - "name": "meta.scalar.yaml", - "patterns": [ - { - "begin": "$", - "while": "\\G", - "contentName": "string.unquoted.block.yaml", - "patterns": [ - { - "include": "#non-printable" - } - ] - }, - { - "begin": "\\G", - "end": "$", - "patterns": [ - { - "include": "#presentation-detail" - } - ] - } - ] - }, - { - "comment": "https://yaml.org/spec/1.2.2/#rule-c-b-block-header", - "//": "Soooooooo many edge cases", - "begin": "([\t ]*+)(?>(\\|)|(>))([+-]?+)", - "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" - } - }, - "name": "meta.scalar.yaml", - "patterns": [ - { - "comment": "https://yaml.org/spec/1.2.2/#rule-l-literal-content", - "begin": "$", - "while": "\\G", - "patterns": [ - { - "comment": "https://yaml.org/spec/1.2.2/#rule-l-nb-literal-text", - "//": "Find the highest indented line", - "begin": "\\G( ++)$", - "while": "\\G(?>(\\1)$|(?!\\1)( *+)($|.))", - "captures": { - "1": { - "name": "punctuation.whitespace.indentation.yaml" - }, - "2": { - "name": "punctuation.whitespace.indentation.yaml" - }, - "3": { - "name": "invalid.illegal.expected-indentation.yaml" - } - }, - "contentName": "string.unquoted.block.yaml", - "patterns": [ - { - "include": "#non-printable" - } - ] - }, - { - "comment": "https://yaml.org/spec/1.2.2/#rule-b-nb-literal-next", - "//": [ - "Funky wrapper function", - "The `end` pattern clears the parent `\\G` anchor", - "Affectively forcing this rule to only match at most once", - "https://github.com/microsoft/vscode-textmate/issues/114" - ], - "begin": "\\G(?!$)(?=( *+))", - "end": "\\G(?!\\1)(?=[\t ]*+#)", - "patterns": [ - { - "comment": "https://yaml.org/spec/1.2.2/#rule-l-nb-literal-text", - "begin": "\\G( *+)", - "while": "\\G(?>(\\1)|( *+)($|[^\t#]|[\t ]++[^#]))", - "captures": { - "1": { - "name": "punctuation.whitespace.indentation.yaml" - }, - "2": { - "name": "punctuation.whitespace.indentation.yaml" - }, - "3": { - "name": "invalid.illegal.expected-indentation.yaml" - } - }, - "contentName": "string.unquoted.block.yaml", - "patterns": [ - { - "include": "#non-printable" - } - ] - } - ] - }, - { - "comment": "https://yaml.org/spec/1.2.2/#rule-l-chomped-empty", - "begin": "(?!\\G)(?=[\t ]*+#)", - "while": "\\G", - "patterns": [ - { - "include": "#presentation-detail" - } - ] - } - ] - }, - { - "comment": "Header Comment", - "begin": "\\G", - "end": "$", - "patterns": [ - { - "include": "#presentation-detail" - } - ] - } - ] - } - ] - }, - "block-plain-out": { - "comment": "https://yaml.org/spec/1.2.2/#rule-ns-plain-multi-line (FLOW-OUT)", - "begin": "(?=[\\x{85}[^-?:,\\[\\]{}#&*!|>'\"%@` \\p{Cntrl}\\p{Surrogate}\\x{FEFF FFFE FFFF}]]|[?:-](?![\r\n\t ]))", - "while": "\\G", - "patterns": [ - { - "begin": "\\G", - "end": "(?=(?>[\t ]++|\\G)#)", - "name": "string.unquoted.plain.out.yaml", - "patterns": [ - { - "include": "#tag-implicit-plain-out" - }, - { - "match": ":(?=[\r\n\t ])", - "name": "invalid.illegal.multiline-key.yaml" - }, - { - "match": "\\G[\t ]++", - "name": "punctuation.whitespace.separator.yaml" - }, - { - "match": "[\t ]++$", - "name": "punctuation.whitespace.separator.yaml" - }, - { - "match": "\\x{FEFF}", - "name": "invalid.illegal.bom.yaml" - }, - { - "include": "#non-printable" - } - ] - }, - { - "begin": "(?!\\G)", - "while": "\\G", - "patterns": [ - { - "include": "#presentation-detail" - } - ] - } - ] - }, - "flow-node": { - "comment": "https://yaml.org/spec/1.2.2/#rule-ns-flow-seq-entry (FLOW-IN)", - "patterns": [ - { - "begin": "(?=\\[|{)", - "end": "(?=[:,\\]}])", - "patterns": [ - { - "begin": "(?!\\G)", - "end": "(?=[:,\\]}])", - "patterns": [ - { - "include": "#presentation-detail" - } - ] - }, - { - "include": "#flow-mapping" - }, - { - "include": "#flow-sequence" - } - ] - }, - { - "include": "#anchor-property" - }, - { - "include": "#tag-property" - }, - { - "include": "#alias" - }, - { - "begin": "(?=\"|')", - "end": "(?=[:,\\]}])", - "patterns": [ - { - "begin": "(?!\\G)", - "end": "(?=[:,\\]}])", - "patterns": [ - { - "include": "#presentation-detail" - } - ] - }, - { - "include": "#double" - }, - { - "include": "#single" - } - ] - }, - { - "include": "#flow-plain-in" - }, - { - "include": "#presentation-detail" - } - ] - }, - "flow-mapping": { - "comment": "https://yaml.org/spec/1.2.2/#742-flow-mappings", - "begin": "{", - "end": "}", - "beginCaptures": { - "0": { - "name": "punctuation.definition.mapping.begin.yaml" - } - }, - "endCaptures": { - "0": { - "name": "punctuation.definition.mapping.end.yaml" - } - }, - "name": "meta.flow.mapping.yaml", - "patterns": [ - { - "comment": "https://yaml.org/spec/1.2.2/#rule-ns-s-flow-map-entries", - "begin": "(?<={)\\G(?=[\r\n\t ,#])|,", - "end": "(?=[^\r\n\t ,#])", - "beginCaptures": { - "0": { - "name": "punctuation.separator.mapping.yaml" - } - }, - "patterns": [ - { - "match": ",++", - "name": "invalid.illegal.separator.sequence.yaml" - }, - { - "include": "#presentation-detail" - } - ] - }, - { - "include": "#flow-mapping-map-key" - }, - { - "include": "#flow-map-value-yaml" - }, - { - "include": "#flow-map-value-json" - }, - { - "include": "#flow-node" - } - ] - }, - "flow-sequence": { - "comment": "https://yaml.org/spec/1.2.2/#741-flow-sequences", - "begin": "\\[", - "end": "]", - "beginCaptures": { - "0": { - "name": "punctuation.definition.sequence.begin.yaml" - } - }, - "endCaptures": { - "0": { - "name": "punctuation.definition.sequence.end.yaml" - } - }, - "name": "meta.flow.sequence.yaml", - "patterns": [ - { - "comment": "https://yaml.org/spec/1.2.2/#rule-ns-s-flow-seq-entries", - "begin": "(?<=\\[)\\G(?=[\r\n\t ,#])|,", - "end": "(?=[^\r\n\t ,#])", - "beginCaptures": { - "0": { - "name": "punctuation.separator.sequence.yaml" - } - }, - "patterns": [ - { - "match": ",++", - "name": "invalid.illegal.separator.sequence.yaml" - }, - { - "include": "#presentation-detail" - } - ] - }, - { - "include": "#flow-sequence-map-key" - }, - { - "include": "#flow-map-value-yaml" - }, - { - "include": "#flow-map-value-json" - }, - { - "include": "#flow-node" - } - ] - }, - "flow-mapping-map-key": { - "comment": "https://yaml.org/spec/1.2.2/#rule-ns-flow-map-entry (FLOW-IN)", - "patterns": [ - { - "begin": "\\?(?=[\r\n\t ,\\[\\]{}])", - "end": "(?=[,\\[\\]{}])", - "beginCaptures": { - "0": { - "name": "punctuation.definition.map.key.yaml" - } - }, - "name": "meta.flow.map.explicit.yaml", - "patterns": [ - { - "include": "#flow-mapping-map-key" - }, - { - "include": "#flow-map-value-yaml" - }, - { - "include": "#flow-map-value-json" - }, - { - "include": "#flow-node" - } - ] - }, - { - "comment": "https://yaml.org/spec/1.2.2/#rule-ns-flow-map-implicit-entry (FLOW-IN)", - "begin": "(?=(?>[\\x{85}[^-?:,\\[\\]{}#&*!|>'\"%@` \\p{Cntrl}\\p{Surrogate}\\x{FEFF FFFE FFFF}]]|[?:-](?![\r\n\t ,\\[\\]{}])))", - "end": "(?=[,\\[\\]{}])", - "name": "meta.flow.map.implicit.yaml", - "patterns": [ - { - "include": "#flow-key-plain-in" - }, - { - "match": ":(?=\\[|{)", - "name": "invalid.illegal.separator.map.yaml" - }, - { - "include": "#flow-map-value-yaml" - }, - { - "include": "#presentation-detail" - } - ] - }, - { - "comment": "https://yaml.org/spec/1.2.2/#rule-ns-flow-map-implicit-entry (FLOW-IN)", - "begin": "(?=\"|')", - "end": "(?=[,\\[\\]{}])", - "name": "meta.flow.map.implicit.yaml", - "patterns": [ - { - "include": "#key-double" - }, - { - "include": "#key-single" - }, - { - "include": "#flow-map-value-json" - }, - { - "include": "#presentation-detail" - } - ] - } - ] - }, - "flow-sequence-map-key": { - "comment": "https://yaml.org/spec/1.2.2/#rule-ns-flow-map-entry (FLOW-IN)", - "patterns": [ - { - "begin": "\\?(?=[\r\n\t ,\\[\\]{}])", - "end": "(?=[,\\[\\]{}])", - "beginCaptures": { - "0": { - "name": "punctuation.definition.map.key.yaml" - } - }, - "name": "meta.flow.map.explicit.yaml", - "patterns": [ - { - "include": "#flow-mapping-map-key" - }, - { - "include": "#flow-map-value-yaml" - }, - { - "include": "#flow-map-value-json" - }, - { - "include": "#flow-node" - } - ] - }, - { - "comment": "https://yaml.org/spec/1.2.2/#rule-ns-flow-map-implicit-entry (FLOW-IN)", - "begin": "(?<=[\t ,\\[{]|^)(?=(?>[\\x{85}[^-?:,\\[\\]{}#&*!|>'\"%@` \\p{Cntrl}\\p{Surrogate}\\x{FEFF FFFE FFFF}]]|[?:-](?![\r\n\t ,\\[\\]{}]))(?>[^:#,\\[\\]{}]++|:(?![\r\n\t ,\\[\\]{}])|(?\"(?>[^\\\\\"]++|\\\\.)*+\"|'(?>[^']++|'')*+')[\t ]*+:)", - "end": "(?=[,\\[\\]{}])", - "name": "meta.flow.map.implicit.yaml", - "patterns": [ - { - "include": "#key-double" - }, - { - "include": "#key-single" - }, - { - "include": "#flow-map-value-json" - }, - { - "include": "#presentation-detail" - } - ] - } - ] - }, - "flow-map-value-yaml": { - "comment": "https://yaml.org/spec/1.2.2/#rule-c-ns-flow-map-separate-value (FLOW-IN)", - "begin": ":(?=[\r\n\t ,\\[\\]{}])", - "end": "(?=[,\\]}])", - "beginCaptures": { - "0": { - "name": "punctuation.separator.map.value.yaml" - } - }, - "name": "meta.flow.pair.value.yaml", - "patterns": [ - { - "include": "#flow-node" - } - ] - }, - "flow-map-value-json": { - "comment": "https://yaml.org/spec/1.2.2/#rule-c-ns-flow-map-separate-value (FLOW-IN)", - "begin": "(?<=(?>[\"'\\]}]|^)[\t ]*+):", - "end": "(?=[,\\]}])", - "beginCaptures": { - "0": { - "name": "punctuation.separator.map.value.yaml" - } - }, - "name": "meta.flow.pair.value.yaml", - "patterns": [ - { - "include": "#flow-node" - } - ] - }, - "flow-plain-in": { - "comment": "https://yaml.org/spec/1.2.2/#rule-ns-plain-multi-line (FLOW-IN)", - "begin": "(?=[\\x{85}[^-?:,\\[\\]{}#&*!|>'\"%@` \\p{Cntrl}\\p{Surrogate}\\x{FEFF FFFE FFFF}]]|[?:-](?![\r\n\t ,\\[\\]{}]))", - "end": "(?=(?>[\t ]++|\\G)#|[\t ]*+[,\\[\\]{}])", - "name": "string.unquoted.plain.in.yaml", - "patterns": [ - { - "include": "#tag-implicit-plain-in" - }, - { - "match": "\\G[\t ]++", - "name": "punctuation.whitespace.separator.yaml" - }, - { - "match": "[\t ]++$", - "name": "punctuation.whitespace.separator.yaml" - }, - { - "match": ":(?=[\r\n\t ,\\[\\]{}])", - "name": "invalid.illegal.multiline-key.yaml" - }, - { - "match": "\\x{FEFF}", - "name": "invalid.illegal.bom.yaml" - }, - { - "include": "#non-printable" - } - ] - }, - "flow-key-plain-out": { - "comment": "https://yaml.org/spec/1.2.2/#rule-ns-plain-one-line (FLOW-OUT)", - "begin": "(?=[\\x{85}[^-?:,\\[\\]{}#&*!|>'\"%@` \\p{Cntrl}\\p{Surrogate}\\x{FEFF FFFE FFFF}]]|[?:-](?![\r\n\t ]))", - "end": "(?=[\t ]*+:[\r\n\t ]|[\t ]++#)", - "name": "meta.map.key.yaml string.unquoted.plain.yaml entity.name.tag.yaml", - "patterns": [ - { - "include": "#tag-implicit-plain-out" - }, - { - "match": "\\G[\t ]++", - "name": "punctuation.whitespace.separator.yaml" - }, - { - "match": "[\t ]++$", - "name": "punctuation.whitespace.separator.yaml" - }, - { - "match": "\\x{FEFF}", - "name": "invalid.illegal.bom.yaml" - }, - { - "include": "#non-printable" - } - ] - }, - "flow-key-plain-in": { - "comment": "https://yaml.org/spec/1.2.2/#rule-ns-s-implicit-yaml-key (FLOW-KEY)", - "begin": "\\G(?![\r\n\t #])", - "end": "(?=[\t ]*+(?>:[\r\n\t ,\\[\\]{}]|[,\\[\\]{}])|[\t ]++#)", - "name": "meta.flow.map.key.yaml string.unquoted.plain.in.yaml entity.name.tag.yaml", - "patterns": [ - { - "include": "#tag-implicit-plain-in" - }, - { - "match": "\\x{FEFF}", - "name": "invalid.illegal.bom.yaml" - }, - { - "include": "#non-printable" - } - ] - }, - "key-double": { - "comment": "https://yaml.org/spec/1.2.2/#double-quoted-style", - "begin": "\\G\"", - "end": "\"", - "beginCaptures": { - "0": { - "name": "punctuation.definition.string.begin.yaml" - } - }, - "endCaptures": { - "0": { - "name": "punctuation.definition.string.end.yaml" - } - }, - "name": "meta.map.key.yaml string.quoted.double.yaml entity.name.tag.yaml", - "patterns": [ - { - "match": "[^\t -\\x{10FFFF}]++", - "name": "invalid.illegal.character.yaml" - }, - { - "include": "#double-escape" - } - ] - }, - "key-single": { - "comment": "https://yaml.org/spec/1.2.2/#rule-c-single-quoted (BLOCK-KEY)", - "begin": "\\G'", - "end": "'(?!')", - "beginCaptures": { - "0": { - "name": "punctuation.definition.string.begin.yaml" - } - }, - "endCaptures": { - "0": { - "name": "punctuation.definition.string.end.yaml" - } - }, - "name": "meta.map.key.yaml string.quoted.single.yaml entity.name.tag.yaml", - "patterns": [ - { - "match": "[^\t -\\x{10FFFF}]++", - "name": "invalid.illegal.character.yaml" - }, - { - "match": "''", - "name": "constant.character.escape.single-quote.yaml" - } - ] - }, - "double": { - "comment": "https://yaml.org/spec/1.2.2/#double-quoted-style", - "begin": "\"", - "end": "\"", - "beginCaptures": { - "0": { - "name": "punctuation.definition.string.begin.yaml" - } - }, - "endCaptures": { - "0": { - "name": "punctuation.definition.string.end.yaml" - } - }, - "name": "string.quoted.double.yaml", - "patterns": [ - { - "match": "(?x[^\"]{2,0}|u[^\"]{4,0}|U[^\"]{8,0}|.)", - "name": "invalid.illegal.constant.character.escape.yaml" - } - ] - }, - "tag-implicit-plain-in": { - "comment": "https://yaml.org/spec/1.2.2/#103-core-schema", - "patterns": [ - { - "match": "\\G(?>null|Null|NULL|~)(?=[\t ]++#|[\t ]*+(?>[\r\n,\\]}]|:[\r\n\t ,\\[\\]{}]))", - "name": "constant.language.null.yaml" - }, - { - "match": "\\G(?>true|True|TRUE|false|False|FALSE)(?=[\t ]++#|[\t ]*+(?>[\r\n,\\]}]|:[\r\n\t ,\\[\\]{}]))", - "name": "constant.language.boolean.yaml" - }, - { - "match": "\\G[+-]?+[0-9]++(?=[\t ]++#|[\t ]*+(?>[\r\n,\\]}]|:[\r\n\t ,\\[\\]{}]))", - "name": "constant.numeric.integer.decimal.yaml" - }, - { - "match": "\\G0o[0-7]++(?=[\t ]++#|[\t ]*+(?>[\r\n,\\]}]|:[\r\n\t ,\\[\\]{}]))", - "name": "constant.numeric.integer.octal.yaml" - }, - { - "match": "\\G0x[0-9a-fA-F]++(?=[\t ]++#|[\t ]*+(?>[\r\n,\\]}]|:[\r\n\t ,\\[\\]{}]))", - "name": "constant.numeric.integer.hexadecimal.yaml" - }, - { - "match": "\\G[+-]?+(?>\\.[0-9]++|[0-9]++(?>\\.[0-9]*+)?+)(?>[eE][+-]?+[0-9]++)?+(?=[\t ]++#|[\t ]*+(?>[\r\n,\\]}]|:[\r\n\t ,\\[\\]{}]))", - "name": "constant.numeric.float.yaml" - }, - { - "match": "\\G[+-]?+\\.(?>inf|Inf|INF)(?=[\t ]++#|[\t ]*+(?>[\r\n,\\]}]|:[\r\n\t ,\\[\\]{}]))", - "name": "constant.numeric.float.inf.yaml" - }, - { - "match": "\\G\\.(?>nan|NaN|NAN)(?=[\t ]++#|[\t ]*+(?>[\r\n,\\]}]|:[\r\n\t ,\\[\\]{}]))", - "name": "constant.numeric.float.nan.yaml" - } - ] - }, - "tag-implicit-plain-out": { - "comment": "https://yaml.org/spec/1.2.2/#103-core-schema", - "patterns": [ - { - "match": "\\G(?>null|Null|NULL|~)(?=[\t ]++#|[\t ]*+(?>$|:[\r\n\t ]))", - "name": "constant.language.null.yaml" - }, - { - "match": "\\G(?>true|True|TRUE|false|False|FALSE)(?=[\t ]++#|[\t ]*+(?>$|:[\r\n\t ]))", - "name": "constant.language.boolean.yaml" - }, - { - "match": "\\G[+-]?+[0-9]++(?=[\t ]++#|[\t ]*+(?>$|:[\r\n\t ]))", - "name": "constant.numeric.integer.decimal.yaml" - }, - { - "match": "\\G0o[0-7]++(?=[\t ]++#|[\t ]*+(?>$|:[\r\n\t ]))", - "name": "constant.numeric.integer.octal.yaml" - }, - { - "match": "\\G0x[0-9a-fA-F]++(?=[\t ]++#|[\t ]*+(?>$|:[\r\n\t ]))", - "name": "constant.numeric.integer.hexadecimal.yaml" - }, - { - "match": "\\G[+-]?+(?>\\.[0-9]++|[0-9]++(?>\\.[0-9]*+)?+)(?>[eE][+-]?+[0-9]++)?+(?=[\t ]++#|[\t ]*+(?>$|:[\r\n\t ]))", - "name": "constant.numeric.float.yaml" - }, - { - "match": "\\G[+-]?+\\.(?>inf|Inf|INF)(?=[\t ]++#|[\t ]*+(?>$|:[\r\n\t ]))", - "name": "constant.numeric.float.inf.yaml" - }, - { - "match": "\\G\\.(?>nan|NaN|NAN)(?=[\t ]++#|[\t ]*+(?>$|:[\r\n\t ]))", - "name": "constant.numeric.float.nan.yaml" - } - ] - }, - "tag-property": { - "comment": "https://yaml.org/spec/1.2.2/#rule-c-ns-tag-property", - "//": [ - "!", - "!!", - "!<>", - "!...", - "!!...", - "!<...>", - "!...!..." - ], - "patterns": [ - { - "match": "!(?=[\r\n\t ])", - "name": "storage.type.tag.non-specific.yaml punctuation.definition.tag.non-specific.yaml" - }, - { - "comment": "https://yaml.org/spec/1.2.2/#rule-c-verbatim-tag", - "begin": "!<", - "end": ">", - "beginCaptures": { - "0": { - "name": "punctuation.definition.tag.begin.yaml" - } - }, - "endCaptures": { - "0": { - "name": "punctuation.definition.tag.end.yaml" - } - }, - "name": "storage.type.tag.verbatim.yaml", - "patterns": [ - { - "match": "%[0-9a-fA-F]{2}", - "name": "constant.character.escape.unicode.8-bit.yaml" - }, - { - "match": "%[^\r\n\t ]{2,0}", - "name": "invalid.illegal.constant.character.escape.unicode.8-bit.yaml" - }, - { - "include": "#non-printable" - }, - { - "match": "[^\r\n\t a-zA-Z0-9-#;/?:@&=+$,_.!~*'()\\[\\]%>]++", - "name": "invalid.illegal.unrecognized.yaml" - } - ] - }, - { - "comment": "https://yaml.org/spec/1.2.2/#rule-c-ns-shorthand-tag", - "begin": "(?=!)", - "end": "(?=[\r\n\t ,\\[\\]{}])", - "name": "storage.type.tag.shorthand.yaml", - "patterns": [ - { - "comment": "https://yaml.org/spec/1.2.2/#rule-c-secondary-tag-handle", - "match": "\\G!!", - "name": "punctuation.definition.tag.secondary.yaml" - }, - { - "comment": "https://yaml.org/spec/1.2.2/#rule-c-secondary-tag-handle", - "match": "\\G(!)[0-9A-Za-z-]++(!)", - "captures": { - "1": { - "name": "punctuation.definition.tag.named.yaml" - }, - "2": { - "name": "punctuation.definition.tag.named.yaml" - } - } - }, - { - "comment": "https://yaml.org/spec/1.2.2/#rule-c-primary-tag-handle", - "match": "\\G!", - "name": "punctuation.definition.tag.primary.yaml" - }, - { - "match": "%[0-9a-fA-F]{2}", - "name": "constant.character.escape.unicode.8-bit.yaml" - }, - { - "match": "%[^\r\n\t ]{2,0}", - "name": "invalid.illegal.constant.character.escape.unicode.8-bit.yaml" - }, - { - "include": "#non-printable" - }, - { - "match": "[^\r\n\t a-zA-Z0-9-#;/?:@&=+$_.~*'()%]++", - "name": "invalid.illegal.unrecognized.yaml" - } - ] - } - ] - }, - "anchor-property": { - "match": "(&)([\\x{85}[^ ,\\[\\]{}\\p{Cntrl}\\p{Surrogate}\\x{FEFF FFFE FFFF}]]++)|(&)", - "captures": { - "0": { - "name": "keyword.control.flow.anchor.yaml" - }, - "1": { - "name": "punctuation.definition.anchor.yaml" - }, - "2": { - "name": "variable.other.anchor.yaml" - }, - "3": { - "name": "invalid.illegal.flow.anchor.yaml" - } - } - }, - "alias": { - "begin": "(\\*)([\\x{85}[^ ,\\[\\]{}\\p{Cntrl}\\p{Surrogate}\\x{FEFF FFFE FFFF}]]++)|(\\*)", - "end": "(?=:[\r\n\t ,\\[\\]{}]|[,\\[\\]{}])", - "captures": { - "0": { - "name": "keyword.control.flow.alias.yaml" - }, - "1": { - "name": "punctuation.definition.alias.yaml" - }, - "2": { - "name": "variable.other.alias.yaml" - }, - "3": { - "name": "invalid.illegal.flow.alias.yaml" - } - }, - "patterns": [ - { - "include": "#presentation-detail" - } - ] - }, - "byte-order-mark": { - "comment": "", - "match": "\\G\\x{FEFF}++", - "name": "byte-order-mark.yaml" - }, - "presentation-detail": { - "patterns": [ - { - "match": "[\t ]++", - "name": "punctuation.whitespace.separator.yaml" - }, - { - "include": "#non-printable" - }, - { - "include": "#comment" - }, - { - "include": "#unknown" - } - ] - }, - "non-printable": { - "//": { - "85": "…", - "10000": "𐀀", - "A0": " ", - "D7FF": "퟿", - "E000": "", - "FFFD": "�", - "FEFF": "", - "FFFF": "￿", - "10FFFF": "􏿿" - }, - "//match": "[\\p{Cntrl}\\p{Surrogate}\\x{FFFE FFFF}&&[^\t\n\r\\x{85}]]++", - "match": "[^\t\n\r -~\\x{85}\\x{A0}-\\x{D7FF}\\x{E000}-\\x{FFFD}\\x{010000}-\\x{10FFFF}]++", - "name": "invalid.illegal.non-printable.yaml" - }, - "comment": { - "comment": "Comments must be separated from other tokens by white space characters. `space`, `tab`, `newline` or `carriage-return`. `#(.*)` causes performance issues", - "begin": "(?<=[\\x{FEFF}\t ]|^)#", - "end": "\r|\n", - "captures": { - "0": { - "name": "punctuation.definition.comment.yaml" - } - }, - "name": "comment.line.number-sign.yaml", - "patterns": [ { - "include": "#non-printable" + "include": "source.yaml.1.2#document" } ] - }, - "unknown": { - "match": ".[[^\"':,\\[\\]{}]&&!-~\\x{85}\\x{A0}-\\x{D7FF}\\x{E000}-\\x{FFFD}\\x{010000}-\\x{10FFFF}]*+", - "name": "invalid.illegal.unrecognized.yaml markup.strikethrough" } } } \ No newline at end of file diff --git a/extensions/yaml/syntaxes/yaml.tmLanguage.json b/extensions/yaml/syntaxes/yaml.tmLanguage.json index 39d8e5864421d..8be76d7a3c595 100644 --- a/extensions/yaml/syntaxes/yaml.tmLanguage.json +++ b/extensions/yaml/syntaxes/yaml.tmLanguage.json @@ -4,7 +4,7 @@ "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], - "version": "https://github.com/RedCMD/YAML-Syntax-Highlighter/commit/5d2a15e2ee4bb9c2cc9a86a0b72aea8fa2aba1e1", + "version": "https://github.com/RedCMD/YAML-Syntax-Highlighter/commit/274009903e20ac6dc37ba5763fb853744e28c9b2", "name": "YAML Ain't Markup Language", "scopeName": "source.yaml", "patterns": [ @@ -15,7 +15,81 @@ ], "repository": { "parity": { - "comment": "Yes... That is right. Due to the changes with \\x2028, \\x2029, \\x85 and 'tags'. This is all the code I was able to reuse between all versions 1.3, 1.2, 1.1 and 1.0" + "comment": "Yes... That is right. Due to the changes with \\x2028, \\x2029, \\x85 and 'tags'. This is all the code I was able to reuse between all YAML versions 1.3, 1.2, 1.1 and 1.0" + }, + "block-map-key-single": { + "comment": "https://yaml.org/spec/1.2.2/#rule-c-single-quoted (BLOCK-KEY)", + "begin": "\\G'", + "end": "'(?!')", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.yaml" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.yaml" + } + }, + "name": "meta.map.key.yaml string.quoted.single.yaml entity.name.tag.yaml", + "patterns": [ + { + "match": ".[\t ]*+$", + "name": "invalid.illegal.multiline-key.yaml" + }, + { + "match": "[^\t -\\x{10FFFF}]++", + "name": "invalid.illegal.character.yaml" + }, + { + "match": "''", + "name": "constant.character.escape.single-quote.yaml" + } + ] + }, + "key-single": { + "comment": "https://yaml.org/spec/1.2.2/#rule-c-single-quoted (FLOW-OUT)", + "begin": "'", + "end": "'(?!')", + "beginCaptures": { + "0": { + "name": "punctuation.definition.string.begin.yaml" + } + }, + "endCaptures": { + "0": { + "name": "punctuation.definition.string.end.yaml" + } + }, + "name": "meta.map.key.yaml string.quoted.single.yaml entity.name.tag.yaml", + "patterns": [ + { + "match": "[^\t -\\x{10FFFF}]++", + "name": "invalid.illegal.character.yaml" + }, + { + "match": "''", + "name": "constant.character.escape.single-quote.yaml" + } + ] + }, + "non-printable": { + "//": { + "85": "…", + "2028": "", + "2029": "", + "10000": "𐀀", + "A0": " ", + "D7FF": "퟿", + "E000": "", + "FFFD": "�", + "FEFF": "", + "FFFF": "￿", + "10FFFF": "􏿿" + }, + "//match": "[\\p{Cntrl}\\p{Surrogate}\\x{FFFE FFFF}&&[^\t\n\r\\x{85}]]++", + "match": "[^\t\n\r -~\\x{85}\\x{A0}-\\x{D7FF}\\x{E000}-\\x{FFFD}\\x{010000}-\\x{10FFFF}]++", + "name": "invalid.illegal.non-printable.yaml" } } } \ No newline at end of file