Skip to content

Commit 3fc8de1

Browse files
committed
Use builder.format instead builder.name to skip translators
Suggested by Eric
1 parent bf84d2b commit 3fc8de1

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

hoverxref/extension.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -128,10 +128,8 @@ def setup_translators(app):
128128
app.set_translator(app.builder.name, translator, override=True)
129129
else:
130130
for name, klass in app.registry.translators.items():
131-
# Read the Docs use ``readthedocs`` as the name of the build, so we
132-
# need to replace this as well
133-
if name not in ['html', 'readthedocs', 'readthedocsdirhtml']:
134-
# Skip translator that are not HTML
131+
if app.builder.format != 'html':
132+
# Skip translators that are not HTML
135133
continue
136134

137135
translator = types.new_class(

0 commit comments

Comments
 (0)