Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
OriolAbril committed Jan 24, 2021
1 parent a6d83a1 commit 10129ef
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions doc/sphinxext/gallery_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ def exec_file(self):
exec(code_text)

def toctree_entry(self):
return " ./%s\n\n" % op.join(op.splitext(self.htmlfilename)[0])
return " ./{}\n\n".format(op.join(op.splitext(self.htmlfilename)[0]))

def contents_entry(self) -> str:
return CONTENTS_ENTRY_TEMPLATE.format(
Expand Down Expand Up @@ -425,7 +425,6 @@ def main(app):
"image_dir": image_dir,
}

toctrees_contents = ""
toctree = "\n\n.. toctree::\n :hidden:\n\n"
contents = "\n\n"

Expand Down Expand Up @@ -466,7 +465,7 @@ def main(app):
toctree += ex.toctree_entry()
contents += ex.contents_entry()

toctrees_contents += "\n".join((toctree, contents))
toctrees_contents = "\n".join((toctree, contents))
toctrees_contents += """.. raw:: html\n\n <div style="clear: both"></div>"""

# write index file
Expand Down

0 comments on commit 10129ef

Please sign in to comment.