From 4b58384c0a832ceee5b8d26dd77b38611976a7fd Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 2 Nov 2019 09:33:32 -0700 Subject: LaTeX reader: fixed a hang/memory leak in certain circumstances. We were using `grouped blocks` instead of `grouped block`. This caused the reader to hang in an infinite loop (with a memory leak) on e.g. `\parbox{1em}{#1}`. Closes #5845. --- src/Text/Pandoc/Readers/LaTeX.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Text/Pandoc/Readers/LaTeX.hs') diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index c20efce38..b1d8a7432 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -1689,8 +1689,8 @@ looseItem = do epigraph :: PandocMonad m => LP m Blocks epigraph = do - p1 <- grouped blocks - p2 <- grouped blocks + p1 <- grouped block + p2 <- grouped block return $ divWith ("", ["epigraph"], []) (p1 <> p2) resetCaption :: PandocMonad m => LP m () @@ -1771,7 +1771,7 @@ parbox = try $ do oldInTableCell <- sInTableCell <$> getState -- see #5711 updateState $ \st -> st{ sInTableCell = False } - res <- grouped blocks + res <- grouped block updateState $ \st -> st{ sInTableCell = oldInTableCell } return res -- cgit v1.2.3