parseFromString': reset stateLastStrPos to Nothing before parse.
commitb446c6c44818b6516905ffd1fd0359c5fe16c64a
authorJohn MacFarlane <jgm@berkeley.edu>
dateMon 26 Aug 2019, 15:52 (7 years ago)
parent1dec5ba
src/Text/Pandoc/Parsing.hs+1
@@ -462,6 +462,7 @@ parseFromString' :: (Stream s m Char, IsString s, HasLastStrPosition u)
462462 -> ParserT s u m a
463463parseFromString' parser str = do
464464 oldLastStrPos <- getLastStrPos <$> getState
465+ updateState $ setLastStrPos Nothing
465466 res <- parseFromString parser str
466467 updateState $ setLastStrPos oldLastStrPos
467468 return res