Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/sphinx-doc/sphinx.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2018-06-13 16:03:32 +0300
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2018-06-13 16:54:01 +0300
commite5ddc36fd1997e2425477d9a9f1379adb6c3cf91 (patch)
tree8b256e050b2bcc62c3f073500de0e03f08a82f67 /sphinx/ext/jsmath.py
parent1c3eadcf61ab2725801218b207640bc7634b0f8f (diff)
Fix mathjax is not loaded
Diffstat (limited to 'sphinx/ext/jsmath.py')
-rw-r--r--sphinx/ext/jsmath.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/sphinx/ext/jsmath.py b/sphinx/ext/jsmath.py
index dc00273a7..809ce0424 100644
--- a/sphinx/ext/jsmath.py
+++ b/sphinx/ext/jsmath.py
@@ -64,7 +64,8 @@ def builder_inited(app):
if not app.config.jsmath_path:
raise ExtensionError('jsmath_path config value must be set for the '
'jsmath extension to work')
- app.add_js_file(app.config.jsmath_path)
+ if app.builder.format == 'html':
+ app.builder.add_js_file(app.config.jsmath_path) # type: ignore
def setup(app):