LaTeX reader: small efficiency improvement.
This commit is contained in:
parent
1db585689a
commit
ae51de3b3d
1 changed files with 2 additions and 1 deletions
|
@ -375,8 +375,9 @@ toksToString = T.unpack . untokenize
|
|||
satisfyTok :: PandocMonad m => (Tok -> Bool) -> LP m Tok
|
||||
satisfyTok f = do
|
||||
doMacros -- apply macros on remaining input stream
|
||||
res <- tokenPrim (T.unpack . untoken) updatePos matcher
|
||||
updateState $ \st -> st{ sExpanded = False }
|
||||
tokenPrim (T.unpack . untoken) updatePos matcher
|
||||
return res
|
||||
where matcher t | f t = Just t
|
||||
| otherwise = Nothing
|
||||
updatePos :: SourcePos -> Tok -> [Tok] -> SourcePos
|
||||
|
|
Loading…
Reference in a new issue