Unverified Commit 5536c1e6 authored by Axel Kohlmeyer's avatar Axel Kohlmeyer
Browse files

make more compact

parent 77789f9e
Loading
Loading
Loading
Loading
+1 −3
Original line number Original line Diff line number Diff line
@@ -4,9 +4,7 @@ def replace_tabs_handler(app, docname, source):
    and replace any 'tab' directive with 'admonition'"""
    and replace any 'tab' directive with 'admonition'"""
    if app.builder.name != 'html':
    if app.builder.name != 'html':
        for i in range(len(source)):
        for i in range(len(source)):
            str = source[i].replace('.. tabs::','')
            source[i] = source[i].replace('.. tabs::','').replace('.. tab::','.. admonition::')
            str = str.replace('.. tab::','.. admonition::')
            source[i] = str


def setup(app):
def setup(app):
    app.connect('source-read', replace_tabs_handler)
    app.connect('source-read', replace_tabs_handler)