Closed molinch closed 2 months ago
If you mix HTML tags (<br>
) with markdown, you must make sure to end the HTML block with a blank line.
Consider the following examples that differ in new lines:
"<br>\n[label](https://foo)"
HtmlBlock
"<br>\n\n[label](https://foo)"
HtmlBlock, ParagraphBlock, LinkInline, LiteralInline
"<br> [label](https://foo)"
ParagraphBlock, HtmlInline, LiteralInline, LinkInline, LiteralInline
See https://spec.commonmark.org/0.30/#html-blocks for more details.
Thanks a lot @MihaZupan I had no clue, now it is very clear. KUDOS for writing such a clear and detailed answer. It was extremely helpful.
Thanks for this awesome lib, we use it in several places and found one issue.
Given the following Markdown:
Hello\n\nIt is me (after 1 hard line break)\n\n<br>\nAnd again me (after 2 hard lines break)\nNow just below, [a link to Google](https://google.fr/)
The HTML will not contains an tag for the Markdown link. Do you have any idea what could lead to this situation? Maybe you are aware of a workaround we could leverage?
Interestingly having just the following works:
Now just below, [a link to Google](https://google.fr/)