-
-
Notifications
You must be signed in to change notification settings - Fork 89
Closed
Description
Description
Enabling both the footnotes and the superscript extensions causes the footnotes extension to stop working.
Environment
- Commonmarker version 1.0.0.pre6
- Ruby 3.1.3
- Ubuntu 20.4
Reproduction code
require 'bundler/inline'
gemfile { gem 'commonmarker', '1.0.0.pre6' }
markdown = <<~MARKDOWN
Gimme footnote[^1]
This is ^superscript^
[^1]: Here is the footnote
MARKDOWN
extensions = { footnotes: true, superscript: true }
options = { extension: extensions, render: { hardbreaks: false } }
output = Commonmarker.to_html markdown, options: options
puts outputActual output
<p>
Gimme footnote[^1]
This is <sup>superscript</sup>
</p>Expected output
(which can be observed by disabling the superscript extension in the code above)
<p>
Gimme footnote<sup class="footnote-ref"><a href="#fn1" id="fnref1">1</a></sup>
This is <sup>superscript</sup>
</p>
<section class="footnotes">
<ol>
<li id="fn1">
<p>Here is the footnote <a href="#fnref1" class="footnote-backref">↩</a></p>
</li>
</ol>
</section>code was prettified manually, for clarity
Metadata
Metadata
Assignees
Labels
No labels