aboutsummaryrefslogtreecommitdiff
path: root/test/command
diff options
context:
space:
mode:
authorEmmanuel Ferdman <[email protected]>2025-11-04 10:42:27 +0200
committerGitHub <[email protected]>2025-11-04 09:42:27 +0100
commitb106dca0693a26b8f134bb8550fe6ea5a83f3346 (patch)
treea8e916e66168ddb2e0b6420190a57932bd24aef1 /test/command
parent74f583847fb108593101a34ed88a13005a2252fb (diff)
LaTeX reader: fix spurious paragraph breaks in math environments (#11265)
Previously, a math environment with extra space before the `\end` would get rendered with a blank line, which LaTeX treats as a paragraph break. Signed-off-by: Emmanuel Ferdman <[email protected]>
Diffstat (limited to 'test/command')
-rw-r--r--test/command/latex-math-trailing-space.md38
1 files changed, 38 insertions, 0 deletions
diff --git a/test/command/latex-math-trailing-space.md b/test/command/latex-math-trailing-space.md
new file mode 100644
index 000000000..6502b120a
--- /dev/null
+++ b/test/command/latex-math-trailing-space.md
@@ -0,0 +1,38 @@
+Test that trailing spaces before \end{equation} don't create spurious paragraph breaks:
+
+```
+% pandoc -f latex -t latex
+\begin{equation}
+ a
+ \end{equation}
+^D
+\begin{equation}
+ a
+\end{equation}
+```
+
+Same for align environment:
+
+```
+% pandoc -f latex -t latex
+\begin{align}
+ x &= y \\
+ \end{align}
+^D
+\begin{align}
+ x &= y \\
+\end{align}
+```
+
+Test with multiple trailing spaces:
+
+```
+% pandoc -f latex -t latex
+\begin{equation}
+ a + b
+ \end{equation}
+^D
+\begin{equation}
+ a + b
+\end{equation}
+```