We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
add_javascript
add_js
1 parent c0b6197 commit dee9cb3Copy full SHA for dee9cb3
2 files changed
βcodecov.ymlβ
@@ -0,0 +1,5 @@
1
+coverage:
2
+ status:
3
+ project:
4
+ default:
5
+ threshold: 0.5%
βsphinx_tabs/tabs.pyβ
@@ -4,6 +4,7 @@
import json
import os
6
import posixpath
7
+import sphinx
8
from docutils import nodes
9
from docutils.parsers.rst import Directive, directives
10
from pkg_resources import resource_filename
@@ -346,7 +347,11 @@ def setup(app):
346
347
if "add_script_file" in dir(app):
348
app.add_script_file(path)
349
else:
- app.add_javascript(path)
350
+ # check sphinx version for backward compatibility
351
+ if sphinx.version_info >= (3, 0):
352
+ app.add_js_file(path)
353
+ else:
354
+ app.add_javascript(path)
355
app.connect("html-page-context", update_context)
356
app.connect("build-finished", copy_assets)
357
0 commit comments