aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2025-11-04 14:09:37 +0100
committerJohn MacFarlane <[email protected]>2025-11-04 14:09:37 +0100
commit69479fa49086dae60910fa8cc2d3d658fa95bb43 (patch)
tree2925e66f60e3b2150f39c1377b702ecdd5a8dc92
parent97f7a934608fe3cc973810b0f0e8bbc769115079 (diff)
Revert "Improve parsing of raw LaTeX blocks..."
This reverts commit 22863a3e124215e6fd24efe55a5a99fb2d605e5b.
-rw-r--r--src/Text/Pandoc/Readers/LaTeX.hs9
1 files changed, 2 insertions, 7 deletions
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)))