Skip to content
This repository was archived by the owner on Apr 9, 2025. It is now read-only.

Commit a6325ec

Browse files
authored
Don't disconnect html-page-context event from sphinx-tabs (#318)
We are disconnecting the html-page-context event from sphinx-tabs, which was used to delete the static files from html files that didn't use sphinx-tabs. But in executablebooks/sphinx-tabs#198 this was changed to instead decide if the page should have the static files or not. Since we are removing that event, sphinx-tabs never gets to inject the static files, this breaks sphinx-tabs for projects using hoverxref. We no longer need to disconnect that signal, since we are overriding the html assets policy to `always`, which sphnx-tabs respects already executablebooks/sphinx-tabs#132 (more than 3 years ago).
1 parent 89feea8 commit a6325ec

File tree

1 file changed

+0
-14
lines changed

1 file changed

+0
-14
lines changed

hoverxref/extension.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -144,19 +144,6 @@ def setup_domains(app, config):
144144
app.add_domain(domain, override=True)
145145

146146

147-
def setup_sphinx_tabs(app, config):
148-
"""
149-
Disconnect ``update_context`` function from ``sphinx-tabs``.
150-
151-
Sphinx Tabs removes the CSS/JS from pages that does not use the directive.
152-
Although, we need them to use inside the tooltip.
153-
"""
154-
for listener in app.events.listeners.get('html-page-context'):
155-
module_name = inspect.getmodule(listener.handler).__name__
156-
if module_name == 'sphinx_tabs.tabs':
157-
app.disconnect(listener.id)
158-
159-
160147
def setup_intersphinx(app, config):
161148
"""
162149
Disconnect ``missing-reference`` from ``sphinx.ext.intershinx``.
@@ -365,7 +352,6 @@ def setup(app):
365352
app.connect('config-inited', deprecated_configs_warning)
366353

367354
app.connect('config-inited', setup_domains)
368-
app.connect('config-inited', setup_sphinx_tabs)
369355
app.connect('config-inited', setup_intersphinx)
370356
app.connect('config-inited', setup_theme)
371357
app.connect('config-inited', setup_assets_policy)

0 commit comments

Comments
 (0)