@@ -375,8 +375,9 @@ toksToString = T.unpack . untokenize
375satisfyTok :: PandocMonad m => (Tok -> Bool) -> LP m Tok
375satisfyTok :: PandocMonad m => (Tok -> Bool) -> LP m Tok
376satisfyTok f = do
376satisfyTok f = do
377 doMacros -- apply macros on remaining input stream
377 doMacros -- apply macros on remaining input stream
378+ res <- tokenPrim (T.unpack . untoken) updatePos matcher
378 updateState $ \st -> st{ sExpanded = False }
379 updateState $ \st -> st{ sExpanded = False }
379− tokenPrim (T.unpack . untoken) updatePos matcher
380+ return res
380 where matcher t | f t = Just t
381 where matcher t | f t = Just t
381 | otherwise = Nothing
382 | otherwise = Nothing
382 updatePos :: SourcePos -> Tok -> [Tok] -> SourcePos
383 updatePos :: SourcePos -> Tok -> [Tok] -> SourcePos