File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -83,6 +83,10 @@ def setup_translators(app: Sphinx):
83
83
behavior and configuration, and _only_ add the extra bootstrap rules.
84
84
If we don't detect an HTML-based translator, then we do nothing.
85
85
"""
86
+ # Do not add the mixin if the builder format is not HTML:
87
+ if app .builder .format != "html" :
88
+ return
89
+
86
90
if not app .registry .translators .items ():
87
91
try :
88
92
default_translator_class = app .builder .default_translator_class
@@ -101,10 +105,6 @@ def setup_translators(app: Sphinx):
101
105
app .set_translator (app .builder .name , translator , override = True )
102
106
else :
103
107
for name , klass in app .registry .translators .items ():
104
- if app .builder .format != "html" :
105
- # Skip translators that are not HTML
106
- continue
107
-
108
108
translator = types .new_class (
109
109
"BootstrapHTML5Translator" ,
110
110
(
You can’t perform that action at this time.
0 commit comments