Footnote inside of span class fails
SamWhited opened this issue · 7 comments
Using version 2.0.7.3
with the footnotes extension enabled, the following fails to produce the footnote (the link appears, and the span is output correctly with the class but no footnote is actually generated at the bottom of the page):
[Some statement[^footnote].](class:someclass)
[^footnote]: Some footnote
However, adding the span manually works as expected (there is a footnote at the bottom of the output):
<span class="someclass">
Some statement[^footnote].
</span>
[^footnote]: Some footnote
My guess is that this is due to an issue in the underlying Discount parser.
Please try to repro using the markdown
tool from Discount: https://github.com/Orc/discount
If successful repro, please open an issue on that project and reference this issue.
With the markdown
tool it appears not to add to the footnote counter if you've got it in a class metalink:
$ markdown -f +footnotes test.md
<p><span class="test">Test test<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup></span></p>
<p><span class="test">
Test2<sup id="fnref:1"><a href="#fn:1" rel="footnote">1</a></sup>
</span></p>
<div class="footnotes">
<hr/>
<ol>
<li id="fn:1">
<p>Test footnote<a href="#fnref:1" rev="footnote">↩</a></p></li>
<li id="fn:1">
<p>Test2 footnote<a href="#fnref:1" rev="footnote">↩</a></p></li>
</ol>
</div>
$ cat test.md
[Test test[^test]](class:test)
<span class="test">
Test2[^testtwo]
</span>
[^test]: Test footnote
[^testtwo]: Test2 footnote
will file an issue there (it looks similar to Orc/discount#76). Thanks.
Thanks @SamWhited.
Completely unrelated to this issue, but I see that you're part of DramaTech. I don't suppose you know Michael Lee? He's a friend of mine also out here in Seattle.
@davidfstr small world; Mike's an old friend. Tell him I said hi!
Fixed upstream via 46e147599fafe72f4ea694c122b540d1a766ee96
Cool. I'll integrate this once there's a new Discount release.
Fixed in RDiscount 2.1.8, which is now released.