git.iko.soy/typeable/pandoc
on master help sign in
LaTeX reader: skip comments in handleIncludes.
commit09603b94f76777f4b11dc1d513a3816df4c9ae85 authorJohn MacFarlane <fiddlosopher@gmail.com> dateMon 5 Nov 2012, 08:22 (14 years ago) parent7af45f7
1 file changed+2
src/Text/Pandoc/Readers/LaTeX.hs+2
src/Text/Pandoc/Readers/LaTeX.hs+2
@@ -686,6 +686,8 @@ handleIncludes = handleIncludes' []
686686-- parents parameter prevents infinite include loops
687687handleIncludes' :: [FilePath] -> String -> IO String
688688handleIncludes' _ [] = return []
689+handleIncludes' parents ('%':xs) = handleIncludes' parents
690+ $ drop 1 $ dropWhile (/='\n') xs
689691handleIncludes' parents ('\\':xs) =
690692 case runParser include defaultParserState "input" ('\\':xs) of
691693 Right (fs, rest) -> do yss <- mapM (\f -> if f `elem` parents