-
-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable format element's with properties type
and value
that aren't tagName: input
#22
Comments
Hey @matthewp! 👋 |
It does seem that way, @ChristianMurphy, is it better to close this one in that case? |
That's a higher-level issue, I think this is the right place for this one. |
Ah no, it's with hastscript, that's what's pushing it down into children. |
It is better to close this.
Generate valid HTML for the formatter to work. Where you are generating the AST make sure it is valid. |
Initial checklist
Affected packages and versions
hast-util-raw@9
Link to runnable example
https://codepen.io/matthewp/pen/rNRmLLq?editors=1010
Steps to reproduce
This is enough to cause it
Note that if you replace
div
withinput
it works fine. I traced this back from an Astro bug which is reproducible at a higher level here: https://stackblitz.com/edit/github-qdnomy?file=src%2Fpages%2Findex.md . In that example the div comes into hast-util-raw as a "raw" node (I think), but I assume that it's the same underlying issue as in the reduced example.Expected behavior
Should be reformatted with the properties as properties.
Actual behavior
Throws with: Cannot compile
number
nodeAffected runtime and version
node@18 and Chrome
Affected package manager and version
No response
Affected OS and version
No response
Build and bundle tools
Astro
The text was updated successfully, but these errors were encountered: