You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Weird. It seems to be the camelcase.
If I pass any other lowercase string (even lineargradient) through, it nests adjacently fine.
And the weird thing with lineargradient: if I pass that in, I get linearGradient out!
My guess for what’s going on is that the HTML parser is case-insensitive for tag names.
So, parse5 lowercases things.
When we here pass a cased string in, most things go fine, but when doing the closing tag, it doesn’t match up to the current open tag, and is thus discarded.
Initial checklist
Affected packages and versions
hast-util-raw@9.0.2
Link to runnable example
No response
Steps to reproduce
Fun the following script:
This causes remcohaszing/rehype-mermaid#17
Expected behavior
It logs:
Actual behavior
It moves all siblings after
linearGradient
inside its children.Affected runtime and version
node@22.1.0
Affected package manager and version
npm@10.7.0
Affected OS and version
Pop!_OS 22.04
Build and bundle tools
No response
The text was updated successfully, but these errors were encountered: