aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Readers/Markdown.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Markdown.hs b/src/Text/Pandoc/Readers/Markdown.hs
index f04ea88c4..ab146bdd0 100644
--- a/src/Text/Pandoc/Readers/Markdown.hs
+++ b/src/Text/Pandoc/Readers/Markdown.hs
@@ -1321,8 +1321,12 @@ citeKey = try $ do
suffix :: GenParser Char ParserState [Inline]
suffix = try $ do
+ hasSpace <- option False (notFollowedBy nonspaceChar >> return True)
spnl
- liftM normalizeSpaces $ many $ notFollowedBy (oneOf ";]") >> inline
+ rest <- liftM normalizeSpaces $ many $ notFollowedBy (oneOf ";]") >> inline
+ return $ if hasSpace
+ then Space : rest
+ else rest
prefix :: GenParser Char ParserState [Inline]
prefix = liftM normalizeSpaces $