Skip to content

Commit 487a02d

Browse files
committed
Apply hoverxref if defined in hoverxref_roles
1 parent f02c06f commit 487a02d

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

hoverxref/extension.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
from sphinx.writers.html import HTMLTranslator
1010

1111
from . import version
12-
from .registry import registry
1312
from .utils import get_ref_xref_data, get_ref_obj_data
1413

1514
ASSETS_FILES = [
@@ -113,7 +112,7 @@ def _resolve_obj_xref(self, env, fromdocname, builder, typ, target, node, contno
113112
if refnode is None:
114113
return
115114

116-
if typ in registry.object_types:
115+
if typ in env.config.hoverxref_roles:
117116
docname, labelid = get_ref_obj_data(self, node, typ, target)
118117
if self._is_hoverxref_configured(env):
119118
self._inject_hoverxref_data(env, refnode, docname, labelid)

0 commit comments

Comments
 (0)