aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2018-10-24 22:44:51 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2018-10-24 22:44:51 -0700
commitc5a42e695e13ff096b75e1360d3f2b69f664bcbe (patch)
tree84ce1e9542d93a272146be246c9085dca5875a96
parente4726518afe2c4802c351f6f785032ff4e7e6a35 (diff)
downloadpandoc-c5a42e695e13ff096b75e1360d3f2b69f664bcbe.tar.gz
Man reader: improve source posiiton info.
-rw-r--r--src/Text/Pandoc/Readers/Man.hs3
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) ""