Tokenizing a property declaration with a space after property name resolves incorrectly to RuleSet instead of Declaration #11
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hey @marijnh,
It seems like when there is a space betwen the property name and the colon, the tokenizing fails; see the following case:
color: blueresolves correctly toDeclaration; howevercolor : redresolves toRuleSet.I have created a tree visualizer for
@lezer/cssand@lezer/javascript; you can take a look here as well: https://ergun.sh/lezer-viz.html?language=%40lezer%2Fcss&sourceText=*+%7B%0A++color%3A+red%3B%0A++color+%3A+blue%3B%0A%7DThis patch should help. It was getting confused because (since it supports nested rules) it was interpreting that colon as indicating some selector like
p :pseudoclasswas coming.Ah perfect, thanks for the quick patch again! :)
Do you have a time when the fix would be published?
I've tagged this in @lezer/css 1.1.7