mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-10 21:40:00 +00:00
HTML Tags (<br> specifically) after a header element breaks Markdown in following lines #434
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @RickStrahl on GitHub (Feb 5, 2021).
This is a minor inconsistency issue that a user reported to me in the Markdown Monster repository.
User was (kind of uselessly) placing explicit
<br>characters after a block element like a header followed on a new line by text that includes markdown. MD treats this as an HTML block and displays the text as literal without expanding the markdown:If however, if I space out the text then I get the correct behavior:
Finally if have two text blocks (instead of a header and textblock) MD does the right thing:
As said, I think this is a minor issue and not too concerned with it, but it does seem inconsistent. I suspect the issue here is mainly that in the last example there's some special handling for
<br>to behave differently than other HTML tags, while for header (or other non-literal) tags that's not applied.Babelmark seems to be split on 1. - I see about half the renderers rendering the rendered markdown vs. half rendering the literal text.
https://babelmark.github.io/?text=%23+This+is+some+text%0A%3Cbr%3E%0AThis+is+some+text.%0A
Not sure if it's worth fixing this as it is a bit of an edge case, but I thought I'd point it out since it was noticed in MM.
@xoofx commented on GitHub (Feb 5, 2021):
It's not a bug, that's how CommonMark is working. See above in the link, all real CommonMark are handling it the same way as Markdig.
Related issue #509