summaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/CslJson.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2024-04-01 12:54:12 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2024-04-01 12:54:12 -0700
commitc29c18a0038b62718cf3133247177e3cb8ebf871 (patch)
treea17c36b217a8d4cb2671c76e62bfe9a155ae216d /src/Text/Pandoc/Writers/CslJson.hs
parent6ee03849aa475c2b74d18d0dc518368afaa18370 (diff)
Put `$` or `$$` around math in `csljson` output.HEADmain
Closes #9616.
Diffstat (limited to 'src/Text/Pandoc/Writers/CslJson.hs')
-rw-r--r--src/Text/Pandoc/Writers/CslJson.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/CslJson.hs b/src/Text/Pandoc/Writers/CslJson.hs
index 3e0455105..81e57055e 100644
--- a/src/Text/Pandoc/Writers/CslJson.hs
+++ b/src/Text/Pandoc/Writers/CslJson.hs
@@ -71,7 +71,8 @@ fromInline (Code _ t) = CslText t
fromInline Space = CslText " "
fromInline SoftBreak = CslText " "
fromInline LineBreak = CslText "\n"
-fromInline (Math _ t) = CslText t
+fromInline (Math InlineMath t) = CslText $ "$" <> t <> "$"
+fromInline (Math DisplayMath t) = CslText $ "$$" <> t <> "$$"
fromInline (RawInline _ _) = CslEmpty
fromInline (Link _ ils _) = fromInlines ils
fromInline (Image _ ils _) = fromInlines ils