Fix back-to-toc links

This commit is contained in:
Jérôme Petazzoni
2017-11-09 13:41:29 -08:00
parent 87a2051b24
commit 07d99763d3

View File

@@ -124,7 +124,7 @@ def gentoc(tree, path=()):
if len(path) == 0:
return "\n---\n".join(gentoc(subtree, path+(i+1,)) for (i,subtree) in enumerate(tree))
elif len(path) == 1:
chapterslide = "## Chapter {}\n\n".format(path[0])
chapterslide = "name: toc-chapter-{n}\n\n## Chapter {n}\n\n".format(n=path[0])
for (i,subtree) in enumerate(tree):
chapterslide += gentoc(subtree, path+(i+1,)) + "\n\n"
chapterslide += ".debug[(auto-generated TOC)]"