git.iko.soy/typeable/pandoc
on master help sign in
Org reader: convert markup at beginning of footnotes
56dddccAlbert Krewinkel
src/Text/Pandoc/Readers/Org/Blocks.hs+1−1
@@ -869,7 +869,7 @@ latexEnd envName = try $
869--
869--
870noteBlock :: PandocMonad m => OrgParser m (F Blocks)
870noteBlock :: PandocMonad m => OrgParser m (F Blocks)
871noteBlock = try $ do
871noteBlock = try $ do
872− ref <- noteMarker <* skipSpaces
872+ ref <- noteMarker <* skipSpaces <* updateLastPreCharPos
873 content <- mconcat <$> blocksTillHeaderOrNote
873 content <- mconcat <$> blocksTillHeaderOrNote
874 addToNotesTable (ref, content)
874 addToNotesTable (ref, content)
875 return mempty
875 return mempty
test/Tests/Readers/Org.hs+10
@@ -1028,6 +1028,16 @@ tests =
1028 , note $ para ("Second" <> space <> "note.")
1028 , note $ para ("Second" <> space <> "note.")
1029 ])
1029 ])
1030
1030
1031+ , "Footnote that starts with emphasized text" =:
1032+ unlines [ "text[fn:1]"
1033+ , ""
1034+ , "[fn:1] /emphasized/"
1035+ ] =?>
1036+ para (mconcat
1037+ [ "text"
1038+ , note . para $ emph "emphasized"
1039+ ])
1040+
1031 , "Footnote followed by header" =:
1041 , "Footnote followed by header" =:
1032 unlines [ "Another note[fn:yay]"
1042 unlines [ "Another note[fn:yay]"
1033 , ""
1043 , ""