@@ -136,8 +136,8 @@ processLaTeXPreamble = do
136136-- | Parse LaTeX and return 'Pandoc'.
137137parseLaTeX :: GenParser Char ParserState Pandoc
138138parseLaTeX = do
139− skipMany $ spaces >> comment
140139 spaces
140+ skipMany $ comment >> spaces
141141 blocks <- try (processLaTeXPreamble >> environment "document")
142142 <|> (many block >>~ (spaces >> eof))
143143 state <- getState
@@ -528,7 +528,7 @@ skipChar = do
528528 return Null
529529
530530commentBlock :: GenParser Char st Block
531−commentBlock = comment >> return Null
531+commentBlock = many1 (comment >> spaces) >> return Null
532532
533533--
534534-- inline