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

footnotes + FORMAT_XML leads to invalid xml with <<unknown>> tags #316

Open
jeroen opened this issue Mar 28, 2023 · 0 comments
Open

footnotes + FORMAT_XML leads to invalid xml with <<unknown>> tags #316

jeroen opened this issue Mar 28, 2023 · 0 comments

Comments

@jeroen
Copy link

jeroen commented Mar 28, 2023

Given markdown input

a statement[^1]

[^1]: this is true

Converting to FORMAT_HTML while enabling CMARK_OPT_FOOTNOTES works:

<p>a statement<sup class="footnote-ref"><a href="#fn-1" id="fnref-1" data-footnote-ref>1</a></sup></p>
<section class="footnotes" data-footnotes>
<ol>
<li id="fn-1">
<p>this is true <a href="#fnref-1" class="footnote-backref" data-footnote-backref data-footnote-backref-idx="1" aria-label="Back to reference 1"></a></p>
</li>
</ol>
</section>

However, converting to FORMAT_XML while enabling CMARK_OPT_FOOTNOTES yields invalid xml:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE document SYSTEM "CommonMark.dtd">
<document xmlns="http://commonmark.org/xml/1.0">
  <paragraph>
    <text xml:space="preserve">a statement</text>
    <<unknown> />
  </paragraph>
  <<unknown>>
    <paragraph>
      <text xml:space="preserve">this is true</text>
    </paragraph>
  </<unknown>>
</document>

The weird <<unknown>> tag is invalid.

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