Fix block sclars in YAML

pull/261/head
Wilfred Hughes 2022-04-14 18:45:48 +07:00
parent 47fe0cfc42
commit 1a93162740
4 changed files with 10 additions and 3 deletions

@ -4,6 +4,8 @@
Added support for Kotlin. Added support for Kotlin.
Fixed an issue with YAML and `|` block strings.
### Display ### Display
Improved syntax highlighting for keywords. Improved syntax highlighting for keywords.

@ -146,7 +146,7 @@ sample_files/whitespace_before.tsx sample_files/whitespace_after.tsx
c4151c5a44b11e04fd11c2594597ed33 - c4151c5a44b11e04fd11c2594597ed33 -
sample_files/yaml_before.yaml sample_files/yaml_after.yaml sample_files/yaml_before.yaml sample_files/yaml_after.yaml
1ae5db1355627f3ca607d76c3e6eed9a - c6b4ca92476b2abcf8ec53eab9115e67 -
sample_files/zig_before.zig sample_files/zig_after.zig sample_files/zig_before.zig sample_files/zig_after.zig
fe7f694c4223c83ecadbbf96f791ccad - fe7f694c4223c83ecadbbf96f791ccad -

@ -3,3 +3,7 @@ foo: [foobar]
hello: hello:
- "world" - "world"
- other - other
stuff: |
a
b

@ -579,11 +579,12 @@ pub fn from_language(language: guess::Language) -> TreeSitterConfig {
TreeSitterConfig { TreeSitterConfig {
name: "YAML", name: "YAML",
language, language,
atom_nodes: (vec![ atom_nodes: vec![
"string_scalar", "string_scalar",
"double_quote_scalar", "double_quote_scalar",
"single_quote_scalar", "single_quote_scalar",
]) "block_scalar",
]
.into_iter() .into_iter()
.collect(), .collect(),
delimiter_tokens: (vec![("{", "}"), ("(", ")"), ("[", "]")]), delimiter_tokens: (vec![("{", "}"), ("(", ")"), ("[", "]")]),