CSS classes starting with a number are not correctly parsed
Tabrisrp opened this issue · comments
Rémy Perona commented
It is possible (though not recommended) to use a number as the starting character in a class/id name. An example: <p class="082874c1">hello world</p>
In the CSS declaration, the first number must be escaped with \3
, like the following:
.\30 82874c1 {
color: red;
}
This type of declaration is not working well with the parser, as the output looks like so:
[
{
"tokens": [
[
{
".\\30 82874c1": {
"1": [
"30"
],
"0": [
"82874c1"
]
}
},
[
"color:red"
]
]
]
}
]
The selector part is split in 2, while it is in fact only one selector.