Skip to content

Parity: Footnotes with special chars in the name are not recognized #306

@digitalmoksha

Description

@digitalmoksha

A footnote name that contains markdown special characters, such as _ and *, are not recognized as valid footnotes. cmark-gfm does recognize these as valid footnotes.

cmark_gfm (cmark-gfm 0.29.0.gfm.10)

one[^x_y]
[^x_y]: test

gives

<p>one<sup class="footnote-ref"><a href="#fn-x_y" id="fnref-x_y" data-footnote-ref>1</a></sup></p>
<section class="footnotes" data-footnotes>
<ol>
<li id="fn-x_y">
<p>test <a href="#fnref-x_y" class="footnote-backref" data-footnote-backref data-footnote-backref-idx="1" aria-label="Back to reference 1">↩</a></p>
</li>
</ol>
</section>

comrak

gives

<p>one[^x_y]</p>

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions