Man reader: raise parse error if we don't get through whole input.
commit446790e95b8cb913750f879a9152d8191be7e1ce
authorJohn MacFarlane <jgm@berkeley.edu>
dateSat 20 Oct 2018, 10:55 (8 years ago)
parentbccfb11
src/Text/Pandoc/Readers/Man.hs+1−1
@@ -122,7 +122,7 @@ lexMan = many (lexComment <|> lexMacro <|> lexLine <|> lexEmptyLine)
122122
123123parseMan :: PandocMonad m => ManParser m Pandoc
124124parseMan = do
125− bs <- many parseBlock
125+ bs <- many parseBlock <* eof
126126 meta <- stateMeta <$> getState
127127 let (Pandoc _ blocks) = doc $ mconcat bs
128128 return $ Pandoc meta blocks