aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2017-04-16 17:22:47 +0200
committerAlbert Krewinkel <albert@zeitkraut.de>2017-04-16 17:22:47 +0200
commit56dddcc3f556217a3354aff2e887b0ba4714f369 (patch)
tree25701ee4e1eee27615e617470027339ba3fc553a
parente6a536befcfd433aba66a3085e62792383867695 (diff)
downloadpandoc-56dddcc3f556217a3354aff2e887b0ba4714f369.tar.gz
Org reader: convert markup at beginning of footnotes
Closes: #3576
-rw-r--r--src/Text/Pandoc/Readers/Org/Blocks.hs2
-rw-r--r--test/Tests/Readers/Org.hs10
2 files changed, 11 insertions, 1 deletions
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]"
, ""