diff options
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Parsing.hs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Parsing.hs b/src/Text/Pandoc/Parsing.hs index 7a3c5f27b..4bb2aa6d2 100644 --- a/src/Text/Pandoc/Parsing.hs +++ b/src/Text/Pandoc/Parsing.hs @@ -194,8 +194,11 @@ anyLine = do -- This is much faster than: -- manyTill anyChar newline inp <- getInput + pos <- getPosition let (this, rest) = break (=='\n') inp setInput rest + let newpos = setSourceLine (setSourceColumn pos 0) (sourceLine pos + 1) + setPosition newpos void (char '\n') <|> (guard (not $ null this) >> eof) return this |