git.iko.soy/typeable/pandoc
on master help sign in
Use takeP in LaTeX reader.
commit770e0cccc1d028415cc9e180b08b396fb0bc379b authorJohn MacFarlane <jgm@berkeley.edu> dateFri 7 Jul 2017, 12:34 (9 years ago) parent6f6e83a
1 file changed+4−4
src/Text/Pandoc/Readers/LaTeX.hs+4−4
src/Text/Pandoc/Readers/LaTeX.hs+4−4
@@ -214,7 +214,7 @@ rawLaTeXBlock = do
214214 res <- runParserT rawblock lstate "source" toks
215215 case res of
216216 Left _ -> mzero
217− Right raw -> count (T.length (untokenize raw)) anyChar
217+ Right raw -> takeP (T.length (untokenize raw))
218218
219219macro :: (PandocMonad m, HasMacros s, HasReaderOptions s)
220220 => ParserT String s m Blocks
@@ -236,7 +236,7 @@ macro = do
236236 Left _ -> mzero
237237 Right (raw, st) -> do
238238 updateState (updateMacros (const $ sMacros st))
239− mempty <$ count (T.length (untokenize raw)) anyChar
239+ mempty <$ takeP (T.length (untokenize raw))
240240
241241applyMacros :: (PandocMonad m, HasMacros s, HasReaderOptions s)
242242 => String -> ParserT String s m String
@@ -269,7 +269,7 @@ rawLaTeXInline = do
269269 Left _ -> mzero
270270 Right (raw, s) -> do
271271 updateState $ updateMacros (const $ sMacros s)
272− count (T.length (untokenize raw)) anyChar
272+ takeP (T.length (untokenize raw))
273273
274274inlineCommand :: PandocMonad m => ParserT String ParserState m Inlines
275275inlineCommand = do
@@ -288,7 +288,7 @@ inlineCommand = do
288288 Left _ -> mzero
289289 Right (il, raw, s) -> do
290290 updateState $ updateMacros (const $ sMacros s)
291− count (T.length (untokenize raw)) anyChar
291+ takeP (T.length (untokenize raw))
292292 return il
293293
294294tokenize :: Text -> [Tok]