Skip to content

Commit

Permalink
Assume {{preprocess variables}} to be valid map keys
Browse files Browse the repository at this point in the history
  • Loading branch information
RedCMD committed Aug 2, 2024
1 parent 42ed6c2 commit dfd7e5f
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion syntaxes/yaml-1.0.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,8 @@
},
"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 ])",
"//": "Assumming 3rd party preprocessing variables `{{...}}` turn into valid map-keys when inside a block-mapping",
"begin": ":(?=[\\x{85 2028 2029}\r\n\t ])|(?<=}})(?=[\t ]++#|[\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",
Expand Down
3 changes: 2 additions & 1 deletion syntaxes/yaml-1.1.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,8 @@
},
"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 ])",
"//": "Assumming 3rd party preprocessing variables `{{...}}` turn into valid map-keys when inside a block-mapping",
"begin": ":(?=[\\x{85 2028 2029}\r\n\t ])|(?<=}})(?=[\t ]++#|[\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",
Expand Down
3 changes: 2 additions & 1 deletion syntaxes/yaml-1.2.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,8 @@
},
"block-map-value": {
"comment": "https://yaml.org/spec/1.2.2/#rule-c-l-block-map-implicit-value",
"begin": ":(?=[\r\n\t ])",
"//": "Assumming 3rd party preprocessing variables `{{...}}` turn into valid map-keys when inside a block-mapping",
"begin": ":(?=[\r\n\t ])|(?<=}})(?=[\t ]++#|[\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",
Expand Down

0 comments on commit dfd7e5f

Please sign in to comment.