aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-11-18 23:50:21 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2018-11-18 23:50:21 -0800
commite86cbcd7e1e7faa47433961ff5f99f5bf32f902d (patch)
tree92473f008de6bf8015d6fe532adf42a098be25b1
parent8a157ff83930d3a630168020a963a1ea08bfd6ae (diff)
downloadpandoc-e86cbcd7e1e7faa47433961ff5f99f5bf32f902d.tar.gz
LaTeX reader: Allow space before bracketed options.
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index f91e62d31..d291e5529 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -774,7 +774,8 @@ paropt :: PandocMonad m => LP m Inlines
paropt = parenWrapped inline
rawopt :: PandocMonad m => LP m Text
-rawopt = do
+rawopt = try $ do
+ optional sp
inner <- untokenize <$> bracketedToks
optional sp
return $ "[" <> inner <> "]"