@@ -137,14 +137,13 @@ anyLine =
137 <* updateLastPreCharPos
137 <* updateLastPreCharPos
138 <* updateLastForbiddenCharPos
138 <* updateLastForbiddenCharPos
140−-- The version Text.Pandoc.Parsing cannot be used, as we need additional parts
140+-- | Like @'Text.Pandoc.Parsing'@, but resets the position of the last character
141−-- of the state saved and restored.
141+-- allowed before emphasised text.
142parseFromString :: Monad m => OrgParser m a -> String -> OrgParser m a
142parseFromString :: Monad m => OrgParser m a -> String -> OrgParser m a
143parseFromString parser str' = do
143parseFromString parser str' = do
144− oldLastPreCharPos <- orgStateLastPreCharPos <$> getState
145 updateState $ \s -> s{ orgStateLastPreCharPos = Nothing }
144 updateState $ \s -> s{ orgStateLastPreCharPos = Nothing }
146 result <- P.parseFromString parser str'
145 result <- P.parseFromString parser str'
147− updateState $ \s -> s{ orgStateLastPreCharPos = oldLastPreCharPos }
146+ updateState $ \s -> s { orgStateLastPreCharPos = Nothing }
148 return result
147 return result
150-- | Skip one or more tab or space characters.
149-- | Skip one or more tab or space characters.