From 6008f32194b55fe5b686b22901c3aef1726d24c4 Mon Sep 17 00:00:00 2001 From: MrHeadwar Date: Wed, 29 Dec 2021 19:04:24 +0100 Subject: [PATCH] PDF : correct content hierarchy on the fly --- build.py | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/build.py b/build.py index 775e3f8..d7753fe 100755 --- a/build.py +++ b/build.py @@ -208,16 +208,22 @@ def GetParent(fs, pos): # -# Change the hierarchy of titles : h1->hn, h2->hn+1, etc... n being delta-1 +# Change the hierarchy of titles :

->,

->, so that the +# highest hyerarchy level is maxlevel # -def reheader(txt, delta): - for i in range(6, 0, -1): - txt = txt.replace('' + header['title'] + '\n';