Previously an `<ol>` inside the body of a note was treated as the list of notes, and its items were lost. Similarly, an `<hr>` inside a note was dropped. We now set a local `inNoteBody` flag while parsing a note's content, and only treat `<ol>` as the note list (and drop `<hr>`) when not in a note body. Closes #11852. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1002 B
1002 B
% pandoc -f html -t native
<p>a<a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a></p>
<section id="footnotes" class="footnotes" role="doc-endnotes"><hr /><ol>
<li id="fn1"><p>note</p><ol><li>one</li><li>two</li></ol>
<a href="#fnref1" class="footnote-back" role="doc-backlink">x</a></li></ol></section>
^D
[ Para
[ Str "a"
, Note
[ Para [ Str "note" ]
, OrderedList
( 1 , DefaultStyle , DefaultDelim )
[ [ Plain [ Str "one" ] ] , [ Plain [ Str "two" ] ] ]
]
]
]
% pandoc -f html -t native
<p>a<a href="#fn1" class="footnote-ref" id="fnref1" role="doc-noteref"><sup>1</sup></a></p>
<section id="footnotes" class="footnotes" role="doc-endnotes"><hr /><ol>
<li id="fn1"><p>one</p><hr /><p>two</p>
<a href="#fnref1" class="footnote-back" role="doc-backlink">x</a></li></ol></section>
^D
[ Para
[ Str "a"
, Note
[ Para [ Str "one" ] , HorizontalRule , Para [ Str "two" ] ]
]
]