Fix #3606: MathJax should be loaded with async attribute

This commit is contained in:
Takeshi KOMIYA
2018-05-23 00:49:27 +09:00
parent f3168d9894
commit 76acc4775a
2 changed files with 3 additions and 1 deletions

View File

@@ -117,6 +117,7 @@ Features added
* #4785: napoleon: Add strings to translation file for localisation
* #4927: Display a warning when invalid values are passed to linenothreshold
option of highlight directive
* #3606: MathJax should be loaded with async attribute
Bugs fixed
----------

View File

@@ -72,7 +72,8 @@ def builder_inited(app):
if not app.config.mathjax_path:
raise ExtensionError('mathjax_path config value must be set for the '
'mathjax extension to work')
app.add_js_file(app.config.mathjax_path)
options = {'async': 'async'}
app.add_js_file(app.config.mathjax_path, **options)
def setup(app):