mirror of
https://github.com/xoofx/markdig.git
synced 2026-02-04 05:44:50 +00:00
[Bug]: Inline html tag </code></pre> convert to wrong result on the latest stable version 0.21.1
#397
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 @v-caxian on GitHub (Aug 31, 2020).
Issue Description
There is a wrong html encoding that causes the
</code></pre>tag to be converted to</code></pre>and it cannot be closed properly.Repro Steps
Input:
Output:
@MihaZupan commented on GitHub (Aug 31, 2020):
Can you please provide a minimal example we can look at?
@xoofx commented on GitHub (Aug 31, 2020):
The empty lines in the
<code><pre>is breaking the markdown HTML input. This is valid per CommonMark spec.Use instead code fence with backsticks instead, or don't use a Markdown converter if your input is solely HTML.
@xoofx commented on GitHub (Aug 31, 2020):
Errata, the issue is that you are missing a new line before the
<pre><code>in order for the parser to allow blank lines, otherwise the<pre><code>gets parsed with the previous HTML block (e.g<p>)