make more compact

This commit is contained in:
Axel Kohlmeyer 2020-09-06 06:10:39 -04:00
parent 77789f9ed8
commit 5536c1e6ee
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
1 changed files with 1 additions and 3 deletions

View File

@ -4,9 +4,7 @@ def replace_tabs_handler(app, docname, source):
and replace any 'tab' directive with 'admonition'"""
if app.builder.name != 'html':
for i in range(len(source)):
str = source[i].replace('.. tabs::','')
str = str.replace('.. tab::','.. admonition::')
source[i] = str
source[i] = source[i].replace('.. tabs::','').replace('.. tab::','.. admonition::')
def setup(app):
app.connect('source-read', replace_tabs_handler)