aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsilby <[email protected]>2025-03-19 16:33:19 -0700
committerGitHub <[email protected]>2025-03-19 16:33:19 -0700
commit0f71b9e8c473c0edb1c0c7523e8ba2da890e8aa9 (patch)
tree25bd25f3e9cb38dedda460d6e88f846355b5c040 /src
parentbfa81a52a5e2d487724867cf544be8af59250c7b (diff)
Skip at most one argument to LaTeX tabular newline (#10707)
In LaTeX's tabular environment, the tabular newline takes an optional argument that we skip. But it only takes a single optional argument, and any further square-bracketed text that follows shouldn't be skipped. Fixes #7512, and also adds a test for the original problem raised in that issue which was already fixed at some point.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX/Table.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX/Table.hs b/src/Text/Pandoc/Readers/LaTeX/Table.hs
index 298e60749..3ac887309 100644
--- a/src/Text/Pandoc/Readers/LaTeX/Table.hs
+++ b/src/Text/Pandoc/Readers/LaTeX/Table.hs
@@ -57,7 +57,7 @@ hline = try $ do
lbreak :: PandocMonad m => LP m Tok
lbreak = (controlSeq "\\" <|> controlSeq "tabularnewline")
- <* skipopts <* spaces
+ <* optional (void rawopt) <* spaces
amp :: PandocMonad m => LP m Tok
amp = symbol '&'