Skip to content

Commit 2db3551

Browse files
authored
🐛 FIX: Remove app.add_javascript use for sphinx v2
It is also available in sphinx 2
1 parent b0f41a1 commit 2db3551

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

sphinx_tabs/tabs.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import json
55
import os
66
import posixpath
7-
import sphinx
7+
88
from docutils import nodes
99
from docutils.parsers.rst import Directive, directives
1010
from pkg_resources import resource_filename
@@ -347,11 +347,7 @@ def setup(app):
347347
if "add_script_file" in dir(app):
348348
app.add_script_file(path)
349349
else:
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)
350+
app.add_js_file(path)
355351
app.connect("html-page-context", update_context)
356352
app.connect("build-finished", copy_assets)
357353

0 commit comments

Comments
 (0)