-
Notifications
You must be signed in to change notification settings - Fork 8
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Normalization should not change whitespace within <pre> and <code> blocks #18
Comments
I looked into fixing it myself, but it traces to the NUglify library and I'm not a C# coder. I'll report a parallel issue there. |
BTW, I'm the author of htmlnorm, a Javascript HTML normalizer. It emphasizes safety / semantic fidelity, in case you want to try doing this on the client side, paying particular attention to HTML5 spec and the whitespace rules it imposes on browser interpretation of HTML. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
(each observed flaw, all related, is marked with 馃毄)
馃毄 Normalize tries to make pretty, indented HTML, but in so doing messes up the whitespace of
<pre>
blocks which should never be touched:If Normalize is unchecked, you can see the untouched HTML output of the various Markdown parsers.
馃毄 Note how the preview rendering uses the normalized version. Even if Normalize had no bugs, it would be best if the preview displayed the actual HTML shown above it.
CommonMark Dingus just for comparison:
馃毄 The same problem occurs for non-pre
<code>
bocks used for inline code:Normalize is unchecked shows the correct HTML, 馃毄 but as before the preview rendering uses the faulty normalized version:
CommonMark Dingus for comparison:
The text was updated successfully, but these errors were encountered: