From c5a42e695e13ff096b75e1360d3f2b69f664bcbe Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 24 Oct 2018 22:44:51 -0700 Subject: Man reader: improve source posiiton info. --- src/Text/Pandoc/Readers/Man.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) "" -- cgit v1.2.3