summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2022-06-01 23:24:49 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2022-06-01 23:24:49 -0700
commitf53977e295a4c301759d54787a39d0737c155a16 (patch)
tree919090a2b338646e748cdefe64522b2d82dd7f99 /src
parente8be78f91af78bef31438b65954d411dcb635fae (diff)
LaTeX writer: Improve grouping with autocites.
Closes #8088.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Writers/LaTeX/Citation.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/LaTeX/Citation.hs b/src/Text/Pandoc/Writers/LaTeX/Citation.hs
index bed258614..e3c56f34c 100644
--- a/src/Text/Pandoc/Writers/LaTeX/Citation.hs
+++ b/src/Text/Pandoc/Writers/LaTeX/Citation.hs
@@ -171,8 +171,9 @@ citationsToBiblatex inlineListToLaTeX (c:cs)
return $ text cmd <> mconcat groups
where grouper prev cit = case prev of
- ((CiteGroup oPfx oSfx ids):rest)
- | null oSfx && null pfx -> CiteGroup oPfx sfx (cid:ids) : rest
+ ((CiteGroup oPfx [] ids):rest)
+ | null pfx && null sfx
+ -> CiteGroup oPfx sfx (cid:ids) : rest
_ -> CiteGroup pfx sfx [cid] : prev
where pfx = citationPrefix cit
sfx = citationSuffix cit