diff options
author | tecosaur <tec@tecosaur.com> | 2021-04-30 16:23:28 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-30 10:23:28 +0200 |
commit | 6b16f3bb0d4c3a0ddc051ff9948c67d5cac72bcb (patch) | |
tree | 4fe4281ac061cc64f812d2151db266b4d7f812c4 /src/Text | |
parent | dc0e482da7db598037893684904e49300207631b (diff) | |
download | pandoc-6b16f3bb0d4c3a0ddc051ff9948c67d5cac72bcb.tar.gz |
Org writer: inline latex envs need newlines (#7259)
Closes #7252
As specified in https://orgmode.org/manual/LaTeX-fragments.html, an
inline \begin{}...\end{} LaTeX block must start on a new line.
Diffstat (limited to 'src/Text')
-rw-r--r-- | src/Text/Pandoc/Writers/Org.hs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/Text/Pandoc/Writers/Org.hs b/src/Text/Pandoc/Writers/Org.hs index d0c9813da..d404f1c8d 100644 --- a/src/Text/Pandoc/Writers/Org.hs +++ b/src/Text/Pandoc/Writers/Org.hs @@ -407,6 +407,8 @@ inlineToOrg (Math t str) = do then "\\(" <> literal str <> "\\)" else "\\[" <> literal str <> "\\]" inlineToOrg il@(RawInline f str) + | elem f ["tex", "latex"] && T.isPrefixOf "\\begin" str = + return $ cr <> literal str <> cr | isRawFormat f = return $ literal str | otherwise = do report $ InlineNotRendered il |