From 69479fa49086dae60910fa8cc2d3d658fa95bb43 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Tue, 4 Nov 2025 14:09:37 +0100 Subject: Revert "Improve parsing of raw LaTeX blocks..." This reverts commit 22863a3e124215e6fd24efe55a5a99fb2d605e5b. --- src/Text/Pandoc/Readers/LaTeX.hs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'src') diff --git a/src/Text/Pandoc/Readers/LaTeX.hs b/src/Text/Pandoc/Readers/LaTeX.hs index 32195d859..11419b15f 100644 --- a/src/Text/Pandoc/Readers/LaTeX.hs +++ b/src/Text/Pandoc/Readers/LaTeX.hs @@ -144,17 +144,12 @@ rawLaTeXBlock = do toks <- getInputTokens snd <$> ( rawLaTeXParser toks - (skipMany1 (try - (skipMany (whitespace <|> newlineTok) - *> (macroDef (const ()) - <|> void (controlSeq "makeatletter" <|> - controlSeq "mateatother"))) - <|> + (macroDef (const mempty) <|> do choice (map controlSeq ["include", "input", "subfile", "usepackage"]) skipMany opt braced - return mempty)) blocks + return mempty) blocks <|> rawLaTeXParser toks (void (environment <|> blockCommand)) (mconcat <$> many (block <|> beginOrEndCommand))) -- cgit v1.2.3