From 61b1b79f95686e651ac9177a9025f6ad261a7f2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sergio=20Mart=C3=ADnez=20Portela?= Date: Wed, 26 Apr 2023 23:52:49 +0200 Subject: [PATCH] Don't draw tables of contents with <2 elements. --- scripts/generate.py | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/scripts/generate.py b/scripts/generate.py index c3365c1..a6d0c3b 100644 --- a/scripts/generate.py +++ b/scripts/generate.py @@ -675,11 +675,16 @@ def render_as_document(headline, doc, headlineLevel, graph, title): return as_document(render(headline, doc, graph=graph, headlineLevel=headlineLevel), title, render_toc(doc)) def render_toc(doc): - acc = ['