From d8ad766d17603784b86fc5c2e1b22864125d04d1 Mon Sep 17 00:00:00 2001
From: John MacFarlane <jgm@berkeley.edu>
Date: Thu, 6 Aug 2020 14:41:13 -0700
Subject: [PATCH] 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.
---
 src/Text/Pandoc/App/CommandLineOptions.hs | 3 +--
 src/Text/Pandoc/Options.hs                | 2 +-
 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/"