summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Goerz <goerz@stanford.edu>2018-12-17 22:14:25 -0500
committerMichael Goerz <goerz@stanford.edu>2018-12-17 22:14:25 -0500
commit77e617e25ad097fd4e0697cb1fd7ef3774552c38 (patch)
tree4b78547b213ea264edac8ed836dbc483cf37a46c
parente9c87b3d13c192a9b6a82d9ce0c6572f85e85743 (diff)
downloadsphinx-git-77e617e25ad097fd4e0697cb1fd7ef3774552c38.tar.gz
Use mathjax CDN "latest" URL by default
Closes #5725
-rw-r--r--CHANGES1
-rw-r--r--sphinx/ext/mathjax.py2
-rw-r--r--tests/test_ext_math.py2
3 files changed, 3 insertions, 2 deletions
diff --git a/CHANGES b/CHANGES
index 6f7367919..e047f7f63 100644
--- a/CHANGES
+++ b/CHANGES
@@ -16,6 +16,7 @@ Features added
Bugs fixed
----------
+* #5725: mathjax: Use CDN URL for "latest" version by default
* #5460: html search does not work with some 3rd party themes
* #5520: LaTeX, caption package incompatibility since Sphinx 1.6
* #5614: autodoc: incremental build is broken when builtin modules are imported
diff --git a/sphinx/ext/mathjax.py b/sphinx/ext/mathjax.py
index 21406c451..2a9f37699 100644
--- a/sphinx/ext/mathjax.py
+++ b/sphinx/ext/mathjax.py
@@ -98,7 +98,7 @@ def setup(app):
# more information for mathjax secure url is here:
# https://docs.mathjax.org/en/latest/start.html#secure-access-to-the-cdn
app.add_config_value('mathjax_path',
- 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?'
+ 'https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?'
'config=TeX-AMS-MML_HTMLorMML', 'html')
app.add_config_value('mathjax_options', {}, 'html')
app.add_config_value('mathjax_inline', [r'\(', r'\)'], 'html')
diff --git a/tests/test_ext_math.py b/tests/test_ext_math.py
index 5ccaa6047..796ed852c 100644
--- a/tests/test_ext_math.py
+++ b/tests/test_ext_math.py
@@ -97,7 +97,7 @@ def test_mathjax_options(app, status, warning):
content = (app.outdir / 'index.html').text()
assert ('<script async="async" integrity="sha384-0123456789" type="text/javascript" '
- 'src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?'
+ 'src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/latest.js?'
'config=TeX-AMS-MML_HTMLorMML"></script>' in content)