Skip to content

Commit

Permalink
LaTeX reader: math environments don't have bracketed options.
Browse files Browse the repository at this point in the history
We were checking for these, and that caused problems if the math
began with `[`.

Closes #10160.
  • Loading branch information
jgm committed Sep 7, 2024
1 parent 7d672fc commit 74221a0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/Text/Pandoc/Readers/LaTeX/Math.hs
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ mathEnvWith f innerEnv name = f . mathDisplay . inner <$> mathEnv name

mathEnv :: PandocMonad m => Text -> LP m Text
mathEnv name = do
skipopts
optional blankline
res <- manyTill anyTok (end_ name)
return $ stripTrailingNewlines $ untokenize res
Expand Down
11 changes: 11 additions & 0 deletions test/command/10160.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
```
% pandoc -f latex -t native
\begin{equation}
[0,1)
\end{equation}
\begin{table}[h]
\end{table}
^D
[ Para [ Math DisplayMath "[0,1)" ] ]
```

0 comments on commit 74221a0

Please sign in to comment.