Skip to content

Commit

Permalink
Fix up TOC nested lists for GitHub Wiki flavored Markdown.
Browse files Browse the repository at this point in the history
  • Loading branch information
Garth Minette committed Feb 20, 2021
1 parent 87b0dca commit 1b0cc14
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions openscad_docsgen/blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -773,12 +773,12 @@ def write_toc_file(self):
for sect in fblock.children:
if isinstance(sect,SectionBlock):
snum += 1
out.append(block_link(sect, srcfile=filename, prefix=" {}.{}. ".format(fnum,snum)))
out.append(block_link(sect, srcfile=filename, prefix=" {}. ".format(snum)))
inum = 0
for item in sect.children:
if isinstance(item,ItemBlock):
inum += 1
out.append(block_link(item, srcfile=filename, prefix=" {}.{}.{}. ".format(fnum,snum,inum)))
out.append(block_link(item, srcfile=filename, prefix=" - "))
outfile = os.path.join(self.docs_dir, "TOC.md")
print("Writing {}...".format(outfile))
with open(outfile, "w") as f:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from setuptools import setup

VERSION = "1.0.5"
VERSION = "1.0.6"


with open('README.rst') as f:
Expand Down

0 comments on commit 1b0cc14

Please sign in to comment.