aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2017-03-05 11:10:11 +0100
committerJohn MacFarlane <jgm@berkeley.edu>2017-03-05 11:10:11 +0100
commit3ff41fe7f4b323d61249e1865cb0a95c7293bafd (patch)
tree2d02b7690cc11e4393cab49804826b1c6345553e /src/Text/Pandoc
parent2fee07795c0066f38c14a81a2323b7a015541af9 (diff)
downloadpandoc-3ff41fe7f4b323d61249e1865cb0a95c7293bafd.tar.gz
LaTeX reader: Handle spaces before \cite arguments.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index 0f17d3db4..353304330 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -1276,9 +1276,7 @@ simpleCiteArgs :: PandocMonad m => LP m [Citation]
simpleCiteArgs = try $ do
first <- optionMaybe $ toList <$> opt
second <- optionMaybe $ toList <$> opt
- char '{'
- optional sp
- keys <- manyTill citationLabel (char '}')
+ keys <- try $ bgroup *> (manyTill citationLabel egroup)
let (pre, suf) = case (first , second ) of
(Just s , Nothing) -> (mempty, s )
(Just s , Just t ) -> (s , t )