We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
hast-util-from-parse5 7.1.0 hast-util-to-html 8.0.3 parse5 7.1.1
https://codepen.io/milahu/pen/eYKRmBW?editors=1010
import {parse} from 'parse5' import {fromParse5} from 'hast-util-from-parse5' import {toHtml} from 'hast-util-to-html' const source = ` <html> <head> <title>asdf</title> </head> <body> <div>asdf</div> </body> </html> ` function normalize(source) { const p5ast = parse(source, { sourceCodeLocationInfo: true, }) const hast = fromParse5(p5ast) return toHtml(hast) } async function main() { console.log("input:") console.log(source) console.log("output:") console.log(normalize(source)) } main()
<html> <head> <title>asdf</title> </head> <body> <div>asdf</div> </body> </html>
<html><head> <title>asdf</title> </head> <body> <div>asdf</div> </body></html>
not relevant
No response
The text was updated successfully, but these errors were encountered:
This is required by the HTML standard, which we follow. That behavior is not always useful. If you want pretty HTML, use rehype-format!
rehype-format
Sorry, something went wrong.
No branches or pull requests
Initial checklist
Affected packages and versions
hast-util-from-parse5 7.1.0
hast-util-to-html 8.0.3
parse5 7.1.1
Link to runnable example
https://codepen.io/milahu/pen/eYKRmBW?editors=1010
Steps to reproduce
Expected behavior
Actual behavior
Affected runtime and version
not relevant
Affected package manager and version
No response
Affected OS and version
No response
Build and bundle tools
No response
The text was updated successfully, but these errors were encountered: