diff options
| author | John MacFarlane <[email protected]> | 2024-09-10 08:22:48 -0700 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2024-09-10 08:22:48 -0700 |
| commit | 320a8add030a1e8bcb28ff85b981c572bad835f5 (patch) | |
| tree | 938d493b72da6c100abc35b06a40317fb2cad8cc /src | |
| parent | 2d299b085f14165df53873b2c7c77c70a53b400b (diff) | |
Markdown writer: fix tex_math_gfm output for display math.
Diffstat (limited to 'src')
| -rw-r--r-- | src/Text/Pandoc/Writers/Markdown/Inline.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown/Inline.hs b/src/Text/Pandoc/Writers/Markdown/Inline.hs index c64fdee19..948932fc5 100644 --- a/src/Text/Pandoc/Writers/Markdown/Inline.hs +++ b/src/Text/Pandoc/Writers/Markdown/Inline.hs @@ -534,8 +534,9 @@ inlineToMarkdown opts (Math DisplayMath str) = do inlineToMarkdown opts (Image nullAttr [Str str'] (url <> urlEncode str', str')) _ | isEnabled Ext_tex_math_gfm opts -> - return $ cr <> literal "``` math" - <> literal str <> literal "```" <> cr + return $ cr <> (literal "``` math" + $$ literal str + $$ literal "```") <> cr | isEnabled Ext_tex_math_dollars opts -> return $ "$$" <> literal str <> "$$" | isEnabled Ext_tex_math_single_backslash opts -> |
