aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Readers
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r--src/Text/Pandoc/Readers/Org.hs14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/Text/Pandoc/Readers/Org.hs b/src/Text/Pandoc/Readers/Org.hs
index c3ea8d7c2..0e872abf0 100644
--- a/src/Text/Pandoc/Readers/Org.hs
+++ b/src/Text/Pandoc/Readers/Org.hs
@@ -38,10 +38,9 @@ import qualified Text.Pandoc.Parsing as P
import Text.Pandoc.Parsing hiding ( F, unF, askF, asksF, runF
, newline, orderedListMarker
, parseFromString
- , updateLastStrPos )
+ )
import Text.Pandoc.Readers.LaTeX (inlineCommand, rawLaTeXInline)
import Text.Pandoc.Shared (compactify', compactify'DL)
-import Text.Parsec.Pos (updatePosString)
import Text.TeXMath (texMathToPandoc, DisplayType(..))
import Control.Applicative ( Applicative, pure
@@ -148,10 +147,6 @@ resetBlockAttributes :: OrgParser ()
resetBlockAttributes = updateState $ \s ->
s{ orgStateBlockAttributes = orgStateBlockAttributes def }
-updateLastStrPos :: OrgParser ()
-updateLastStrPos = getPosition >>= \p ->
- updateState $ \s -> s{ orgStateLastStrPos = Just p }
-
updateLastForbiddenCharPos :: OrgParser ()
updateLastForbiddenCharPos = getPosition >>= \p ->
updateState $ \s -> s{ orgStateLastForbiddenCharPos = Just p}
@@ -1376,8 +1371,9 @@ maybeRight = either (const Nothing) Just
inlineLaTeXCommand :: OrgParser String
inlineLaTeXCommand = try $ do
rest <- getInput
- pos <- getPosition
case runParser rawLaTeXInline def "source" rest of
- Right (RawInline _ cs) -> cs <$ (setInput $ drop (length cs) rest)
- <* (setPosition $ updatePosString pos cs)
+ Right (RawInline _ cs) -> do
+ let len = length cs
+ count len anyChar
+ return cs
_ -> mzero