Org reader: convert markup at beginning of footnotes

Closes: #3576
This commit is contained in:
Albert Krewinkel 2017-04-16 17:22:47 +02:00
parent e6a536befc
commit 56dddcc3f5
No known key found for this signature in database
GPG key ID: 388DC0B21F631124
2 changed files with 11 additions and 1 deletions

View file

@ -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

View file

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