aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers/LaTeX.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-11-02 09:33:32 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2019-11-02 09:33:32 -0700
commit4b58384c0a832ceee5b8d26dd77b38611976a7fd (patch)
treedbd36966c9c5d4671a090a5c4ce7d8841adf4391 /src/Text/Pandoc/Readers/LaTeX.hs
parent180c96f9a079b9d2586e66bb6c901e77e4427952 (diff)
downloadpandoc-4b58384c0a832ceee5b8d26dd77b38611976a7fd.tar.gz
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.
Diffstat (limited to 'src/Text/Pandoc/Readers/LaTeX.hs')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs6
1 files changed, 3 insertions, 3 deletions
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