diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2012-11-05 08:22:26 -0800 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2012-11-05 08:22:26 -0800 |
commit | 09603b94f76777f4b11dc1d513a3816df4c9ae85 (patch) | |
tree | 0ac81bcf4f1b592719105ea2b9a5fdf828d99af2 /src/Text/Pandoc/Readers | |
parent | 7af45f78d12537c1bd5a2cac80bae0e18dc0961f (diff) | |
download | pandoc-09603b94f76777f4b11dc1d513a3816df4c9ae85.tar.gz |
LaTeX reader: skip comments in handleIncludes.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r-- | src/Text/Pandoc/Readers/LaTeX.hs | 2 |
1 files changed, 2 insertions, 0 deletions
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 |