diff options
| author | John MacFarlane <jgm@berkeley.edu> | 2024-03-14 11:04:26 -0700 |
|---|---|---|
| committer | John MacFarlane <jgm@berkeley.edu> | 2024-03-14 11:04:26 -0700 |
| commit | 95661b6a0584329e1f219e94aacfee945436fa52 (patch) | |
| tree | 2d27c9115e419979910065dc29f12f5bcdca34e4 | |
| parent | 876bd497868c4511e4463005062350c52324d22c (diff) | |
Markdown reader: Fix bug with footnotes at end of fenced div.
Cloess #9576.
| -rw-r--r-- | src/Text/Pandoc/Readers/Markdown.hs | 1 | ||||
| -rw-r--r-- | test/command/9576.md | 23 |
2 files changed, 24 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs index 2890c0125..206e5bc3c 100644 --- a/src/Text/Pandoc/Readers/Markdown.hs +++ b/src/Text/Pandoc/Readers/Markdown.hs @@ -417,6 +417,7 @@ noteMarker = string "[^" >> rawLine :: PandocMonad m => MarkdownParser m Text rawLine = try $ do notFollowedBy blankline + notFollowedByDivCloser notFollowedBy' $ try $ skipNonindentSpaces >> noteMarker optional indentSpaces anyLine diff --git a/test/command/9576.md b/test/command/9576.md new file mode 100644 index 000000000..e529a8f29 --- /dev/null +++ b/test/command/9576.md @@ -0,0 +1,23 @@ +``` +% pandoc -t native +::: {#something} +Text with a footnote.[^3] + +[^3]: A footnote. +::: +^D +[ Div + ( "something" , [] , [] ) + [ Para + [ Str "Text" + , Space + , Str "with" + , Space + , Str "a" + , Space + , Str "footnote." + , Note [ Para [ Str "A" , Space , Str "footnote." ] ] + ] + ] +] +``` |
