summaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2022-06-13 23:14:51 -0600
committerJohn MacFarlane <jgm@berkeley.edu>2022-06-13 23:14:51 -0600
commitb263f383040618ff991912512ccd396b83d43da5 (patch)
treead2022cf9fba5acff67ba31b4c58b5c6a277ffb8 /src/Text
parent54b20e5733d7ae283170faf66ca48ff71abcfdbc (diff)
LaTeX reader: improve mathEnvWith.
When converting e.g. an align environment to an aligned environment inside a Math element, we need to include a newline before the `\end{aligned}`, since the previous line might end in a comment. Closes #8122.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Readers/LaTeX/Math.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Readers/LaTeX/Math.hs b/src/Text/Pandoc/Readers/LaTeX/Math.hs
index 9f3d6fe53..92f41910b 100644
--- a/src/Text/Pandoc/Readers/LaTeX/Math.hs
+++ b/src/Text/Pandoc/Readers/LaTeX/Math.hs
@@ -65,7 +65,7 @@ mathEnvWith f innerEnv name = f . mathDisplay . inner <$> mathEnv name
where inner x = case innerEnv of
Nothing -> x
Just y -> "\\begin{" <> y <> "}\n" <> x <>
- "\\end{" <> y <> "}"
+ "\n\\end{" <> y <> "}"
mathEnv :: PandocMonad m => Text -> LP m Text
mathEnv name = do