Man reader: improve source posiiton info.
This commit is contained in:
parent
e4726518af
commit
c5a42e695e
1 changed files with 2 additions and 1 deletions
|
@ -121,10 +121,11 @@ parseNewParagraph = do
|
||||||
-- Parser: [ManToken] -> Pandoc
|
-- 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
|
msatisfy predic = tokenPrim show nextPos testTok
|
||||||
where
|
where
|
||||||
testTok t = if predic t then Just t else Nothing
|
testTok t = if predic t then Just t else Nothing
|
||||||
|
nextPos _pos _x (MMacro _ _ pos':_) = pos'
|
||||||
nextPos pos _x _xs = updatePosString
|
nextPos pos _x _xs = updatePosString
|
||||||
(setSourceColumn
|
(setSourceColumn
|
||||||
(setSourceLine pos $ sourceLine pos + 1) 1) ""
|
(setSourceLine pos $ sourceLine pos + 1) 1) ""
|
||||||
|
|
Loading…
Reference in a new issue