You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If a (foot)note is the last element in a document, without blank line(s) after it, it fails to be parsed.
Test for reproducing
local lunamark = require("lunamark")
local opts = { notes = true }
local writer = lunamark.writer.html5.new(opts)
local parse = lunamark.reader.markdown.new(writer, opts)
local result, matadata = parse([[
Here is a note.[^mynote]
[^mynote]: This is supposed to be the note's footnote.
]])
print(result)
Observed result
<p>Here is a note.[^mynote]</p>
[^mynote]: This is supposed to be the note's footnote.
Expected result
<p>Here is a note.<sup><a href="#fn1" class="footnoteRef" id="fnref1">1</a></sup></p>
<hr />
<ol class="notes">
<li id="fn1"><p>This is supposed to be the note's footnote. <a href="#fnref1" class="footnoteBackLink">↩</a></p></li>
</ol>
Rationale
For comparison, Pandoc is happy parsing the note whether there's a blank line or not.
The workaround is easy (just adding a blank line), but it could be misleading to users.
The text was updated successfully, but these errors were encountered:
Found by @jslabovitz (via discussion)
If a (foot)note is the last element in a document, without blank line(s) after it, it fails to be parsed.
Test for reproducing
Observed result
Expected result
Rationale
For comparison, Pandoc is happy parsing the note whether there's a blank line or not.
The workaround is easy (just adding a blank line), but it could be misleading to users.
The text was updated successfully, but these errors were encountered: