diff options
author | John MacFarlane <jgm@berkeley.edu> | 2018-10-24 22:44:51 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-10-24 22:44:51 -0700 |
commit | c5a42e695e13ff096b75e1360d3f2b69f664bcbe (patch) | |
tree | 84ce1e9542d93a272146be246c9085dca5875a96 /src/Text/Pandoc/Readers | |
parent | e4726518afe2c4802c351f6f785032ff4e7e6a35 (diff) | |
download | pandoc-c5a42e695e13ff096b75e1360d3f2b69f664bcbe.tar.gz |
Man reader: improve source posiiton info.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r-- | src/Text/Pandoc/Readers/Man.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/Man.hs b/src/Text/Pandoc/Readers/Man.hs index ee7051213..4fefb0e66 100644 --- a/src/Text/Pandoc/Readers/Man.hs +++ b/src/Text/Pandoc/Readers/Man.hs @@ -121,10 +121,11 @@ parseNewParagraph = do -- Parser: [ManToken] -> Pandoc -- -msatisfy :: (Show t, Stream s m t) => (t -> Bool) -> ParserT s st m t +msatisfy :: Monad m => (ManToken -> Bool) -> ParserT [ManToken] st m ManToken msatisfy predic = tokenPrim show nextPos testTok where testTok t = if predic t then Just t else Nothing + nextPos _pos _x (MMacro _ _ pos':_) = pos' nextPos pos _x _xs = updatePosString (setSourceColumn (setSourceLine pos $ sourceLine pos + 1) 1) "" |