-
Hi, Is there a way to reach the toHast() options from wrap.js? The current implementation results in Thanks |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
The output is indeed readable. And is similar to how CommonMark generates line endings. It doesn’t match the CommonMark examples entirely in several places.
I see good reason for the HTML generated by this project to be readable, I don’t see a good reason to make it less readable. Whitespace is part of the tree in HTML and it affects many things. |
Beta Was this translation helpful? Give feedback.
The output is indeed readable. And is similar to how CommonMark generates line endings. It doesn’t match the CommonMark examples entirely in several places.
I see good reason for the HTML generated by this project to be readable, I don’t see a good reason to make it less readable.
If you want less readable output,
rehype-minify
, specifically,rehype-minify-whitespace
can help?Whitespace is part of the tree in HTML and it affects many things.
That also means that formatting and minifying them can happen on the AST.
And I think I believe it should happen there instead of a serializer.