diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-12-14 11:26:28 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-12-14 11:34:32 -0800 |
commit | be0e3f979441176b6d838ff722ae7990940564be (patch) | |
tree | b996bc306f78e28ac4642a2dbf74adc2a5810576 /src/Text/Pandoc/Writers/Markdown | |
parent | d393f2f15816ed9030e6bf73a836f26d8148166e (diff) | |
download | pandoc-be0e3f979441176b6d838ff722ae7990940564be.tar.gz |
Markdown writer: avoid extra space before citation suffix...
if it already starts with a space.
Diffstat (limited to 'src/Text/Pandoc/Writers/Markdown')
-rw-r--r-- | src/Text/Pandoc/Writers/Markdown/Inline.hs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown/Inline.hs b/src/Text/Pandoc/Writers/Markdown/Inline.hs index 0d8463cdf..d299d31b2 100644 --- a/src/Text/Pandoc/Writers/Markdown/Inline.hs +++ b/src/Text/Pandoc/Writers/Markdown/Inline.hs @@ -531,8 +531,10 @@ inlineToMarkdown opts (Cite (c:cs) lst) sdoc <- inlineListToMarkdown opts sinlines let k' = literal (modekey m <> "@" <> maybeInBraces k) r = case sinlines of - Str (T.uncons -> Just (y,_)):_ | y `elem` (",;]@" :: String) -> k' <> sdoc - _ -> k' <+> sdoc + Str (T.uncons -> Just (y,_)):_ + | y `elem` (",;]@" :: String) -> k' <> sdoc + Space:_ -> k' <> sdoc + _ -> k' <+> sdoc return $ pdoc <+> r modekey SuppressAuthor = "-" modekey _ = "" |