diff options
-rw-r--r-- | src/Text/Pandoc/Readers/LaTeX.hs | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index 561038081..659382772 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -128,9 +128,7 @@ parseLaTeX :: GenParser Char ParserState Pandoc parseLaTeX = do spaces blocks <- try (processLaTeXPreamble >> spaces >> environment "document") - <|> many block - spaces - eof + <|> (many block >>~ (spaces >> eof)) state <- getState let blocks' = filter (/= Null) blocks let title' = stateTitle state |