aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/makespec.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/makespec.py b/tools/makespec.py
index aa75b35..fcd7305 100755
--- a/tools/makespec.py
+++ b/tools/makespec.py
@@ -133,8 +133,9 @@ elif specformat == "html":
template = Template(templatefile.read())
toclines = []
for section in sections:
- indent = ' ' * (section['level'] - 1)
- toclines.append(indent + '* [' + section['number'] + ' ' +
+ if section['level'] <= 2:
+ indent = ' ' * (section['level'] - 1)
+ toclines.append(indent + '* [' + section['number'] + ' ' +
section['contents'] + '](#' + section['ident'] + ')')
toc = '<div id="TOC">\n\n' + '\n'.join(toclines) + '\n\n</div>\n\n'
prog = "cmark --smart"