aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-08-26 15:52:25 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2019-08-26 15:52:25 -0700
commitb446c6c44818b6516905ffd1fd0359c5fe16c64a (patch)
tree94170ee1d8dfe74eb0e25b402394fcc32b933e1f /src/Text
parent1dec5bacaa9f5a89615684dc24ee0e67642d0c06 (diff)
downloadpandoc-b446c6c44818b6516905ffd1fd0359c5fe16c64a.tar.gz
parseFromString': reset stateLastStrPos to Nothing before parse.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Parsing.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Parsing.hs b/src/Text/Pandoc/Parsing.hs
index 959e272a1..a50add362 100644
--- a/src/Text/Pandoc/Parsing.hs
+++ b/src/Text/Pandoc/Parsing.hs
@@ -462,6 +462,7 @@ parseFromString' :: (Stream s m Char, IsString s, HasLastStrPosition u)
-> ParserT s u m a
parseFromString' parser str = do
oldLastStrPos <- getLastStrPos <$> getState
+ updateState $ setLastStrPos Nothing
res <- parseFromString parser str
updateState $ setLastStrPos oldLastStrPos
return res