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