Skip to content

Commit

Permalink
Update yaml grammar
Browse files Browse the repository at this point in the history
Part of #224862
  • Loading branch information
alexr00 committed Aug 6, 2024
1 parent 4c1b0e9 commit 411e4cb
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 9 deletions.
4 changes: 2 additions & 2 deletions extensions/yaml/cgmanifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"git": {
"name": "RedCMD/YAML-Syntax-Highlighter",
"repositoryUrl": "https://github.com/RedCMD/YAML-Syntax-Highlighter",
"commitHash": "60e2e6e24c63d5a703cb04577678a2e416edd956"
"commitHash": "d4dca9f38a654ebbb13c1b72b7881e3c5864a778"
}
},
"licenseDetail": [
Expand All @@ -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.1"
"version": "1.1.1"
}
],
"version": 1
Expand Down
5 changes: 3 additions & 2 deletions extensions/yaml/syntaxes/yaml-1.0.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/60e2e6e24c63d5a703cb04577678a2e416edd956",
"version": "https://github.com/RedCMD/YAML-Syntax-Highlighter/commit/dfd7e5f4f71f9695c5d8697ca57f81240165aa04",
"name": "YAML 1.0",
"scopeName": "source.yaml.1.0",
"comment": "https://yaml.org/spec/1.0/",
Expand Down Expand Up @@ -500,7 +500,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": {
Expand Down
5 changes: 3 additions & 2 deletions extensions/yaml/syntaxes/yaml-1.1.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/60e2e6e24c63d5a703cb04577678a2e416edd956",
"version": "https://github.com/RedCMD/YAML-Syntax-Highlighter/commit/dfd7e5f4f71f9695c5d8697ca57f81240165aa04",
"name": "YAML 1.1",
"scopeName": "source.yaml.1.1",
"comment": "https://yaml.org/spec/1.1/",
Expand Down Expand Up @@ -641,7 +641,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": {
Expand Down
6 changes: 4 additions & 2 deletions extensions/yaml/syntaxes/yaml-1.2.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -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/60e2e6e24c63d5a703cb04577678a2e416edd956",
"version": "https://github.com/RedCMD/YAML-Syntax-Highlighter/commit/d4dca9f38a654ebbb13c1b72b7881e3c5864a778",
"name": "YAML 1.2",
"scopeName": "source.yaml.1.2",
"comment": "https://yaml.org/spec/1.2.2",
Expand Down Expand Up @@ -37,6 +37,7 @@
]
},
{
"comment": "For when YAML is embedded inside a Markdown code-block",
"begin": "\\G",
"while": "\\G",
"name": "meta.stream.yaml",
Expand Down Expand Up @@ -633,7 +634,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": {
Expand Down
13 changes: 12 additions & 1 deletion extensions/yaml/syntaxes/yaml.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,21 @@
"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/274009903e20ac6dc37ba5763fb853744e28c9b2",
"version": "https://github.com/RedCMD/YAML-Syntax-Highlighter/commit/d4dca9f38a654ebbb13c1b72b7881e3c5864a778",
"name": "YAML Ain't Markup Language",
"scopeName": "source.yaml",
"patterns": [
{
"comment": "Support legacy FrontMatter integration",
"//": "https://github.com/microsoft/vscode-markdown-tm-grammar/pull/162",
"begin": "(?<=^-{3,}\\s*+)\\G$",
"while": "^(?! {3,0}-{3,}[ \t]*+$|[ \t]*+\\.{3}$)",
"patterns": [
{
"include": "source.yaml.1.2"
}
]
},
{
"comment": "Default to YAML version 1.2",
"include": "source.yaml.1.2"
Expand Down

0 comments on commit 411e4cb

Please sign in to comment.