aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Backends/Xhtml.hs
diff options
context:
space:
mode:
authorAlec Theriault <alec.theriault@gmail.com>2018-11-09 08:13:35 -0800
committerAlec Theriault <alec.theriault@gmail.com>2018-11-09 08:13:35 -0800
commite44f4637472ebcd818089e96338e0b4705b4f649 (patch)
tree1b894bc2df3421c421e4a845c6ad72c821ac2b03 /haddock-api/src/Haddock/Backends/Xhtml.hs
parent63abb6c197ae513eac6d171c589b129feb004413 (diff)
parent8a491e437f1c8379b66a420f8584c1761b45aa7e (diff)
Merge branch 'ghc-8.6' into wip/new-ocean
Diffstat (limited to 'haddock-api/src/Haddock/Backends/Xhtml.hs')
-rw-r--r--haddock-api/src/Haddock/Backends/Xhtml.hs27
1 files changed, 17 insertions, 10 deletions
diff --git a/haddock-api/src/Haddock/Backends/Xhtml.hs b/haddock-api/src/Haddock/Backends/Xhtml.hs
index 202fcdf1..46d94b37 100644
--- a/haddock-api/src/Haddock/Backends/Xhtml.hs
+++ b/haddock-api/src/Haddock/Backends/Xhtml.hs
@@ -121,19 +121,26 @@ copyHtmlBits odir libdir themes withQuickjump = do
headHtml :: String -> Themes -> Maybe String -> Html
headHtml docTitle themes mathjax_url =
- header << [
- meta ! [ httpequiv "Content-Type", content "text/html; charset=UTF-8"],
- meta ! [ XHtml.name "viewport", content "width=device-width, initial-scale=1"],
- thetitle << docTitle,
- styleSheet themes,
- thelink ! [ rel "stylesheet", thetype "text/css", href quickJumpCssFile] << noHtml,
- thelink ! [ rel "stylesheet", thetype "text/css", href fontUrl] << noHtml,
- script ! [src haddockJsFile, emptyAttr "async", thetype "text/javascript"] << noHtml,
- script ! [src mjUrl, thetype "text/javascript"] << noHtml
+ header <<
+ [ meta ! [ httpequiv "Content-Type", content "text/html; charset=UTF-8"]
+ , meta ! [ XHtml.name "viewport", content "width=device-width, initial-scale=1"]
+ , thetitle << docTitle
+ , styleSheet themes
+ , thelink ! [ rel "stylesheet", thetype "text/css", href quickJumpCssFile] << noHtml
+ , thelink ! [ rel "stylesheet", thetype "text/css", href fontUrl] << noHtml
+ , script ! [src haddockJsFile, emptyAttr "async", thetype "text/javascript"] << noHtml
+ , script ! [thetype "text/x-mathjax-config"] << primHtml mjConf
+ , script ! [src mjUrl, thetype "text/javascript"] << noHtml
]
where
fontUrl = "https://fonts.googleapis.com/css?family=PT+Sans:400,400i,700"
- mjUrl = fromMaybe "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML" mathjax_url
+ mjUrl = fromMaybe "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js?config=TeX-AMS-MML_HTMLorMML" mathjax_url
+ mjConf = unwords [ "MathJax.Hub.Config({"
+ , "tex2jax: {"
+ , "processClass: \"mathjax\","
+ , "ignoreClass: \".*\""
+ , "}"
+ , "});" ]
srcButton :: SourceURLs -> Maybe Interface -> Maybe Html
srcButton (Just src_base_url, _, _, _) Nothing =