From 09603b94f76777f4b11dc1d513a3816df4c9ae85 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 5 Nov 2012 08:22:26 -0800 Subject: LaTeX reader: skip comments in handleIncludes. --- src/Text/Pandoc/Readers/LaTeX.hs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index 763765edf..db148617e 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -686,6 +686,8 @@ handleIncludes = handleIncludes' [] -- parents parameter prevents infinite include loops handleIncludes' :: [FilePath] -> String -> IO String handleIncludes' _ [] = return [] +handleIncludes' parents ('%':xs) = handleIncludes' parents + $ drop 1 $ dropWhile (/='\n') xs handleIncludes' parents ('\\':xs) = case runParser include defaultParserState "input" ('\\':xs) of Right (fs, rest) -> do yss <- mapM (\f -> if f `elem` parents -- cgit v1.2.3