aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Writers/Markdown/Inline.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown/Inline.hs b/src/Text/Pandoc/Writers/Markdown/Inline.hs
index 98ac91cba..05106b259 100644
--- a/src/Text/Pandoc/Writers/Markdown/Inline.hs
+++ b/src/Text/Pandoc/Writers/Markdown/Inline.hs
@@ -537,7 +537,7 @@ inlineToMarkdown opts (Math DisplayMath str) = do
(url <> urlEncode str', str'))
_ | isEnabled Ext_tex_math_gfm opts ->
return $ cr <> (literal "``` math"
- $$ literal str
+ $$ literal (T.dropAround (=='\n') str)
$$ literal "```") <> cr
| isEnabled Ext_tex_math_dollars opts ->
return $ delimited "$$" "$$" (literal str)