From b05e739c6dcc33866c6e34017778f50da2692a8a Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 30 Dec 2010 22:05:19 -0800 Subject: LaTeX reader: Allow ignored comments after \end{document}. --- src/Text/Pandoc/Readers/LaTeX.hs | 4 +--- 1 file changed, 1 insertion(+), 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 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 -- cgit v1.2.3