diff options
author | John MacFarlane <jgm@berkeley.edu> | 2017-07-07 12:34:42 +0200 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2017-07-07 12:37:21 +0200 |
commit | 770e0cccc1d028415cc9e180b08b396fb0bc379b (patch) | |
tree | 79423fa71cb0ac1edda67fe87056f7430f8cbd45 | |
parent | 6f6e83a06e9793d26cb622024098af39c14cb60a (diff) | |
download | pandoc-770e0cccc1d028415cc9e180b08b396fb0bc379b.tar.gz |
Use takeP in LaTeX reader.
-rw-r--r-- | src/Text/Pandoc/Readers/LaTeX.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index d82e6a5dc..fde177f14 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -214,7 +214,7 @@ rawLaTeXBlock = do res <- runParserT rawblock lstate "source" toks case res of Left _ -> mzero - Right raw -> count (T.length (untokenize raw)) anyChar + Right raw -> takeP (T.length (untokenize raw)) macro :: (PandocMonad m, HasMacros s, HasReaderOptions s) => ParserT String s m Blocks @@ -236,7 +236,7 @@ macro = do Left _ -> mzero Right (raw, st) -> do updateState (updateMacros (const $ sMacros st)) - mempty <$ count (T.length (untokenize raw)) anyChar + mempty <$ takeP (T.length (untokenize raw)) applyMacros :: (PandocMonad m, HasMacros s, HasReaderOptions s) => String -> ParserT String s m String @@ -269,7 +269,7 @@ rawLaTeXInline = do Left _ -> mzero Right (raw, s) -> do updateState $ updateMacros (const $ sMacros s) - count (T.length (untokenize raw)) anyChar + takeP (T.length (untokenize raw)) inlineCommand :: PandocMonad m => ParserT String ParserState m Inlines inlineCommand = do @@ -288,7 +288,7 @@ inlineCommand = do Left _ -> mzero Right (il, raw, s) -> do updateState $ updateMacros (const $ sMacros s) - count (T.length (untokenize raw)) anyChar + takeP (T.length (untokenize raw)) return il tokenize :: Text -> [Tok] |