aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2020-08-06 14:41:13 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2020-08-06 14:42:26 -0700
commitd8ad766d17603784b86fc5c2e1b22864125d04d1 (patch)
treea1705c80eed652ea901d2ad3ed8613e8a7a6fc2b /src
parent57417feaf425d1943f9503f669ccba37898e395f (diff)
downloadpandoc-d8ad766d17603784b86fc5c2e1b22864125d04d1.tar.gz
Options: Add `/tex-mml-chtml.js` to defaultMathJaxURL.
Previously we added this in processing command line options, but not in processing defaults files, which was inconsistent. Cloess #6593.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/App/CommandLineOptions.hs3
-rw-r--r--src/Text/Pandoc/Options.hs2
2 files changed, 2 insertions, 3 deletions
diff --git a/src/Text/Pandoc/App/CommandLineOptions.hs b/src/Text/Pandoc/App/CommandLineOptions.hs
index c3b05b70f..dec7ae41e 100644
--- a/src/Text/Pandoc/App/CommandLineOptions.hs
+++ b/src/Text/Pandoc/App/CommandLineOptions.hs
@@ -699,8 +699,7 @@ options =
, Option "" ["mathjax"]
(OptArg
(\arg opt -> do
- let url' = maybe (defaultMathJaxURL <>
- "tex-mml-chtml.js") T.pack arg
+ let url' = maybe defaultMathJaxURL T.pack arg
return opt { optHTMLMathMethod = MathJax url'})
"URL")
"" -- "Use MathJax for HTML math"
diff --git a/src/Text/Pandoc/Options.hs b/src/Text/Pandoc/Options.hs
index fde8a9abe..664b84123 100644
--- a/src/Text/Pandoc/Options.hs
+++ b/src/Text/Pandoc/Options.hs
@@ -308,7 +308,7 @@ isEnabled :: HasSyntaxExtensions a => Extension -> a -> Bool
isEnabled ext opts = ext `extensionEnabled` getExtensions opts
defaultMathJaxURL :: Text
-defaultMathJaxURL = "https://cdn.jsdelivr.net/npm/mathjax@3/es5/"
+defaultMathJaxURL = "https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-mml-chtml.js"
defaultKaTeXURL :: Text
defaultKaTeXURL = "https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.11.1/"