Skip to content

Commit

Permalink
Fix nodes after text
Browse files Browse the repository at this point in the history
  • Loading branch information
RedCMD committed Jun 30, 2024
1 parent 2a745f2 commit adee192
Show file tree
Hide file tree
Showing 2 changed files with 92 additions and 24 deletions.
58 changes: 46 additions & 12 deletions syntaxes/yaml-1.0.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -184,18 +184,30 @@
{ "include": "#tag-property" },
{ "include": "#alias" },
{
"begin": "(?=[\"'\\[{])",
"begin": "(?=\"|')",
"while": "\\G",
"patterns": [
{ "include": "#flow-mapping" },
{ "include": "#flow-sequence" },
{ "include": "#double" },
{ "include": "#single" },
{
"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" },
Expand Down Expand Up @@ -500,14 +512,36 @@
"flow-node": {
"comment": "https://yaml.org/spec/1.2.2/#rule-ns-flow-seq-entry (FLOW-IN)",
"patterns": [
{ "include": "#flow-mapping" },
{ "include": "#flow-sequence" },
{
"begin": "(?=\\[|{)",
"end": "(?=[:,\\]}])",
"patterns": [
{
"begin": "(?!\\G)",
"end": "(?=[:,\\]}])",
"patterns": [ { "include": "#presentation-detail" } ]
},
{ "include": "#flow-mapping" },
{ "include": "#flow-sequence" }
]
},
{ "include": "#anchor-property" },
{ "include": "#tag-property" },
{ "include": "#alias" },
{ "include": "#double" },
{ "include": "#single" },
{ "include": "#flow-plain" },
{
"begin": "(?=\"|')",
"end": "(?=[:,\\]}])",
"patterns": [
{
"begin": "(?!\\G)",
"end": "(?=[:,\\]}])",
"patterns": [ { "include": "#presentation-detail" } ]
},
{ "include": "#double" },
{ "include": "#single" }
]
},
{ "include": "#flow-plain-in" },
{ "include": "#presentation-detail" }
]
},
Expand Down Expand Up @@ -669,7 +703,7 @@
"name": "meta.flow.pair.value.yaml",
"patterns": [ { "include": "#flow-node" } ]
},
"flow-plain": {
"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}]]|[?:-](?![\\x{2028 2029}\r\n\t ,\\[\\]{}]))",
"end": "(?=(?>[\t ]++|\\G)#|[\t ]*+[,\\[\\]{}])",
Expand Down
58 changes: 46 additions & 12 deletions syntaxes/yaml-1.1.tmLanguage.json
Original file line number Diff line number Diff line change
Expand Up @@ -238,18 +238,30 @@
{ "include": "#tag-property" },
{ "include": "#alias" },
{
"begin": "(?=[\"'\\[{])",
"begin": "(?=\"|')",
"while": "\\G",
"patterns": [
{ "include": "#flow-mapping" },
{ "include": "#flow-sequence" },
{ "include": "#double" },
{ "include": "#single" },
{
"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" },
Expand Down Expand Up @@ -554,14 +566,36 @@
"flow-node": {
"comment": "https://yaml.org/spec/1.2.2/#rule-ns-flow-seq-entry (FLOW-IN)",
"patterns": [
{ "include": "#flow-mapping" },
{ "include": "#flow-sequence" },
{
"begin": "(?=\\[|{)",
"end": "(?=[:,\\]}])",
"patterns": [
{
"begin": "(?!\\G)",
"end": "(?=[:,\\]}])",
"patterns": [ { "include": "#presentation-detail" } ]
},
{ "include": "#flow-mapping" },
{ "include": "#flow-sequence" }
]
},
{ "include": "#anchor-property" },
{ "include": "#tag-property" },
{ "include": "#alias" },
{ "include": "#double" },
{ "include": "#single" },
{ "include": "#flow-plain" },
{
"begin": "(?=\"|')",
"end": "(?=[:,\\]}])",
"patterns": [
{
"begin": "(?!\\G)",
"end": "(?=[:,\\]}])",
"patterns": [ { "include": "#presentation-detail" } ]
},
{ "include": "#double" },
{ "include": "#single" }
]
},
{ "include": "#flow-plain-in" },
{ "include": "#presentation-detail" }
]
},
Expand Down Expand Up @@ -723,7 +757,7 @@
"name": "meta.flow.pair.value.yaml",
"patterns": [ { "include": "#flow-node" } ]
},
"flow-plain": {
"flow-plain-in": {
"comment": "https://yaml.org/spec/1.2.2/#rule-ns-plain-multi-line (FLOW-IN)",
"begin": "(?=[^-?:,\\[\\]{}#&*!|>'\"%@` \\p{Cntrl}\\p{Surrogate}\\x{FFFE FFFF}]|[?:-](?![\\x{85 2028 2029}\r\n\t ,\\[\\]{}]))",
"end": "(?=(?>[\t ]++|\\G)#|[\t ]*+[,\\[\\]{}])",
Expand Down

0 comments on commit adee192

Please sign in to comment.