Skip to content

Commit 9e242c3

Browse files
committed
Add sphinx_tabs_valid_builders config variable to add valid builders from the config
1 parent 8709047 commit 9e242c3

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

sphinx_tabs/tabs.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -252,9 +252,10 @@ def add_assets(app, pagename, templatename, context, doctree):
252252

253253
def copy_assets(app, exception):
254254
""" Copy asset files to the output """
255-
builders = ('html', 'singlehtml', 'dirhtml',
255+
builders = ['html', 'singlehtml', 'dirhtml',
256256
'readthedocs', 'readthedocsdirhtml',
257-
'readthedocssinglehtml', 'readthedocssinglehtmllocalmedia')
257+
'readthedocssinglehtml', 'readthedocssinglehtmllocalmedia']
258+
builders.extend(app.config['sphinx_tabs_valid_builders'])
258259
if app.builder.name not in builders:
259260
if not app.config['sphinx_tabs_nowarn']:
260261
app.warn(
@@ -284,6 +285,7 @@ def copy_assets(app, exception):
284285
def setup(app):
285286
""" Set up the plugin """
286287
app.add_config_value('sphinx_tabs_nowarn', False, '')
288+
app.add_config_value('sphinx_tabs_valid_builders', [], '')
287289
app.add_directive('tabs', TabsDirective)
288290
app.add_directive('tab', TabDirective)
289291
app.add_directive('group-tab', GroupTabDirective)

0 commit comments

Comments
 (0)