Skip to content

Commit

Permalink
Options: Add /tex-mml-chtml.js to defaultMathJaxURL.
Browse files Browse the repository at this point in the history
Previously we added this in processing command line options,
but not in processing defaults files, which was inconsistent.

Cloess #6593.
  • Loading branch information
jgm committed Aug 6, 2020
1 parent 57417fe commit d8ad766
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/Text/Pandoc/App/CommandLineOptions.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion src/Text/Pandoc/Options.hs
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand Down

3 comments on commit d8ad766

@gabyx
Copy link

@gabyx gabyx commented on d8ad766 Aug 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jgm : Shouldn't be another change here?

writerHTMLMathMethod = MathJax (defaultMathJaxURL <>

@jgm
Copy link
Owner Author

@jgm jgm commented on d8ad766 Aug 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gabyx you're right

@jgm
Copy link
Owner Author

@jgm jgm commented on d8ad766 Aug 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in bed62fc

Please sign in to comment.