aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-12-14 11:20:59 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2021-12-14 11:34:32 -0800
commitd393f2f15816ed9030e6bf73a836f26d8148166e (patch)
tree1f63c3bcec0c2db03239b393f7513261c4ccd0b2
parent5817e864918e5d03b6402afac0ff8c748a2ac2f6 (diff)
downloadpandoc-d393f2f15816ed9030e6bf73a836f26d8148166e.tar.gz
Markdown writer: ensure semicolon btw locator and next citation...
when an author-in-text citation has a locator and following citations.
-rw-r--r--src/Text/Pandoc/Writers/Markdown/Inline.hs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown/Inline.hs b/src/Text/Pandoc/Writers/Markdown/Inline.hs
index e774b5cc4..0d8463cdf 100644
--- a/src/Text/Pandoc/Writers/Markdown/Inline.hs
+++ b/src/Text/Pandoc/Writers/Markdown/Inline.hs
@@ -505,7 +505,11 @@ inlineToMarkdown opts (Cite (c:cs) lst)
then do
suffs <- inlineListToMarkdown opts $ citationSuffix c
rest <- mapM convertOne cs
- let inbr = suffs <+> joincits rest
+ let inbr = suffs <>
+ (if not (null (citationSuffix c)) && not (null rest)
+ then text ";"
+ else mempty)
+ <+> joincits rest
br = if isEmpty inbr then empty else char '[' <> inbr <> char ']'
return $ literal ("@" <> maybeInBraces (citationId c)) <+> br
else do