diff options
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Readers/LaTeX.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index 9699fc742..56eb85064 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -1120,8 +1120,7 @@ opt = bracketed inline rawopt :: PandocMonad m => LP m Text rawopt = do - symbol '[' - inner <- untokenize <$> manyTill anyTok (symbol ']') + inner <- untokenize <$> bracketedToks optional sp return $ "[" <> inner <> "]" @@ -1789,7 +1788,7 @@ newenvironment = do bracketedToks :: PandocMonad m => LP m [Tok] bracketedToks = do symbol '[' - manyTill anyTok (symbol ']') + mconcat <$> manyTill (braced <|> (:[]) <$> anyTok) (symbol ']') bracketedNum :: PandocMonad m => LP m Int bracketedNum = do |