@@ -38,10 +38,9 @@ import qualified Text.Pandoc.Parsing as P
3838import Text.Pandoc.Parsing hiding ( F, unF, askF, asksF, runF
3939 , newline, orderedListMarker
4040 , parseFromString
41− , updateLastStrPos )
41+ )
4242import Text.Pandoc.Readers.LaTeX (inlineCommand, rawLaTeXInline)
4343import Text.Pandoc.Shared (compactify', compactify'DL)
44−import Text.Parsec.Pos (updatePosString)
4544import Text.TeXMath (texMathToPandoc, DisplayType(..))
4645
4746import Control.Applicative ( Applicative, pure
@@ -148,10 +147,6 @@ resetBlockAttributes :: OrgParser ()
148147resetBlockAttributes = updateState $ \s ->
149148 s{ orgStateBlockAttributes = orgStateBlockAttributes def }
150149
151−updateLastStrPos :: OrgParser ()
152−updateLastStrPos = getPosition >>= \p ->
153− updateState $ \s -> s{ orgStateLastStrPos = Just p }
154−
155150updateLastForbiddenCharPos :: OrgParser ()
156151updateLastForbiddenCharPos = getPosition >>= \p ->
157152 updateState $ \s -> s{ orgStateLastForbiddenCharPos = Just p}
@@ -1376,8 +1371,9 @@ maybeRight = either (const Nothing) Just
13761371inlineLaTeXCommand :: OrgParser String
13771372inlineLaTeXCommand = try $ do
13781373 rest <- getInput
1379− pos <- getPosition
13801374 case runParser rawLaTeXInline def "source" rest of
1381− Right (RawInline _ cs) -> cs <$ (setInput $ drop (length cs) rest)
1382− <* (setPosition $ updatePosString pos cs)
1375+ Right (RawInline _ cs) -> do
1376+ let len = length cs
1377+ count len anyChar
1378+ return cs
13831379 _ -> mzero