Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

md2html and cmark differ on ATX headings #278

Open
step- opened this issue Jan 16, 2025 · 0 comments
Open

md2html and cmark differ on ATX headings #278

step- opened this issue Jan 16, 2025 · 0 comments

Comments

@step-
Copy link
Contributor

step- commented Jan 16, 2025

Given the following Markdown involving four headings, md2html's and cmark's results diverged on the third and fourth headings.

Mardown:

# _h _

# _h _[](<#_h%20_>)

# _h _[](<#h-_>)

# _h _[](<#h__>)

md2html 0.5.2 output (Linux):

<h1>_h _</h1>
<h1>_h _<a href="#_h%20_"></a></h1>
<h1>_h <em><a href="#h-_"></a></h1>
<h1><em>h <em><a href="#h__"></a></h1>

cmark 0.31.1 output:

<h1>_h _</h1>
<h1>_h _<a href="#_h%20_"></a></h1>
<h1>_h _<a href="#h-_"></a></h1>
<h1>_h _<a href="#h__"></a></h1>

On a side note: in the third tag md2html opened an <em> tag without closing it. I guess that's expected since MD4C doesn't validate by design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant