diff --git a/src/Text/Pandoc/Readers/Org/Blocks.hs b/src/Text/Pandoc/Readers/Org/Blocks.hs index 9ef714da7..0753b5deb 100644 --- a/src/Text/Pandoc/Readers/Org/Blocks.hs +++ b/src/Text/Pandoc/Readers/Org/Blocks.hs @@ -869,7 +869,7 @@ latexEnd envName = try $ -- noteBlock :: PandocMonad m => OrgParser m (F Blocks) noteBlock = try $ do - ref <- noteMarker <* skipSpaces + ref <- noteMarker <* skipSpaces <* updateLastPreCharPos content <- mconcat <$> blocksTillHeaderOrNote addToNotesTable (ref, content) return mempty diff --git a/test/Tests/Readers/Org.hs b/test/Tests/Readers/Org.hs index 821739437..b2d0cd684 100644 --- a/test/Tests/Readers/Org.hs +++ b/test/Tests/Readers/Org.hs @@ -1028,6 +1028,16 @@ tests = , note $ para ("Second" <> space <> "note.") ]) + , "Footnote that starts with emphasized text" =: + unlines [ "text[fn:1]" + , "" + , "[fn:1] /emphasized/" + ] =?> + para (mconcat + [ "text" + , note . para $ emph "emphasized" + ]) + , "Footnote followed by header" =: unlines [ "Another note[fn:yay]" , ""