X-Git-Url: http://shamusworld.gotdns.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=build.py;h=d7753fe60a31441341bce9136b075d33032dff40;hb=01263a844bbe2fb45c5df31d1c6053d323c69446;hp=775e3f800f76b1966d3a43781ecc8eab34f78cc3;hpb=088646dc023ee75dedb3c19f2fab8a145b821eaa;p=ardour-manual 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 -# -def reheader(txt, delta): - for i in range(6, 0, -1): - txt = txt.replace('->,

->, so that the +# highest hyerarchy level is maxlevel +# +def remapheader(txt, maxlevel): + maxlvl=1 + # find the highest hierarchy level in the content + while maxlvl < 7 and txt.find('' + header['title'] + '\n';