Files
pandoc/test/command/nested-notes.md
T
John MacFarlaneandClaude Opus 5.5 1d49297127 Markdown, RST, Haddock writers: don't drop notes nested in notes.
Rendering a note can add further notes to the state. Previously
these were lost. Now we keep rendering notes until no new ones
appear, as the Org writer already does.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 22:30:28 -07:00

653 B

% pandoc -f native -t markdown
[Para [Str "a", Note [Para [Str "outer", Note [Para [Str "inner"]]]], Str "b", Note [Para [Str "second"]]]]
^D
a[^1]b[^2]

[^1]: outer[^3]

[^2]: second

[^3]: inner
% pandoc -f native -t rst
[Para [Str "a", Note [Para [Str "outer", Note [Para [Str "inner"]]]], Str "b", Note [Para [Str "second"]]]]
^D
a [1]_b [2]_

.. [1]
   outer [3]_

.. [2]
   second

.. [3]
   inner
% pandoc -f native -t haddock
[Para [Str "a", Note [Para [Str "outer", Note [Para [Str "inner"]]]], Str "b", Note [Para [Str "second"]]]]
^D
a<#notes [1]>b<#notes [2]>

#notes#

1.  outer<#notes [3]>

2.  second

3.  inner