Treat integer values as atoms in CSS

ida_star
Wilfred Hughes 2021-09-05 11:39:49 +07:00
parent dcd8f4608f
commit b6b0f8057b
4 changed files with 7 additions and 4 deletions

@ -1,6 +1,9 @@
## 0.9 (unreleased)
No changes.
### Parsing
Fixed an issue with parsing integer values in CSS with units,
e.g. `123px`.
## 0.8

@ -5,7 +5,7 @@ world */
}
.foo1 {
margin: 0;
margin: 0 0 20px 0;
color: green;
}

@ -1,7 +1,7 @@
/* hello
world */
.foo1 {
margin: 0;
margin: 0 0 20px 0;
}
.bar {

@ -49,7 +49,7 @@ pub fn from_extension(extension: &OsStr) -> Option<TreeSitterConfig> {
"css" => Some(TreeSitterConfig {
name: "CSS",
language: unsafe { tree_sitter_css() },
atom_nodes: (vec![]).into_iter().collect(),
atom_nodes: (vec!["integer_value"]).into_iter().collect(),
open_delimiter_tokens: (vec!["{", "("]).into_iter().collect(),
}),
"el" => Some(TreeSitterConfig {