diff options
author | John MacFarlane <jgm@berkeley.edu> | 2019-11-02 09:33:32 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2019-11-02 09:33:32 -0700 |
commit | 4b58384c0a832ceee5b8d26dd77b38611976a7fd (patch) | |
tree | dbd36966c9c5d4671a090a5c4ce7d8841adf4391 | |
parent | 180c96f9a079b9d2586e66bb6c901e77e4427952 (diff) | |
download | pandoc-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.
-rw-r--r-- | src/Text/Pandoc/Readers/LaTeX.hs | 6 |
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 |