aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs
index 61c9abe3a..2ec191154 100644
--- a/src/Text/Pandoc/Readers/LaTeX.hs
+++ b/src/Text/Pandoc/Readers/LaTeX.hs
@@ -559,7 +559,9 @@ tok = try $ spaces >> grouped inline <|> inlineCommand' <|> singleChar'
return $ str t
opt :: PandocMonad m => LP m Inlines
-opt = bracketed inline <|> (str <$> rawopt)
+opt = bracketed inline
+ <|>
+ (str . T.dropWhile (=='[') . T.dropWhileEnd (==']') <$> rawopt)
paropt :: PandocMonad m => LP m Inlines
paropt = parenWrapped inline