Formatting comments #9
Labels
🗄 area/interface
This affects the public interface
💪 phase/solved
Post is done
🧑 semver/major
This is a change
🦋 type/enhancement
This is great to have
I want to leave comments on their own lines whenever possible, or at lease respect comments which were on their own lines in the input.
Currently , all newlines around comments seem to be eaten. I also note that whitespace around comments seems to be eaten. For example,
<foo> <!-- comment --> </foo>
is rendered as<foo><!-- comment --></foo>
. Doesn't that change the semantics?Anyway, is there any easy/obvious way to formats comments onto their own lines (in cases where the semantics would be changed by the new lines and leading space characters), or do I just need to fork
rehype-format
, or is some filter/plug-in that could handle this?The text was updated successfully, but these errors were encountered: