Files
pandoc/test/command/11852.md
T
John MacFarlaneandClaude Opus 5.5 365cac08e7 HTML reader: don't drop ordered lists and rules inside footnotes.
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>
2026-11-08 09:06:32 -08:00

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" ] ]
    ]
]