wip: in-dev for HTML tabulations from final result

This commit is contained in:
Cyrille L 2022-11-19 18:05:49 +01:00
parent c841c63218
commit 8664c8babc
1 changed files with 2 additions and 3 deletions

View File

@ -591,7 +591,6 @@ def tab_article(article):
for line in article:
if len(line) == 0: continue
print(line)
if line.startswith('<h'):
tn = line[2]
tab = int(tn) * 3
@ -599,12 +598,12 @@ def tab_article(article):
tab = int(tab) + 3
continue
if line.startswith('<div'):
if line.startswith('<div') or line.startswith('<p'):
wip_tmp = '%s\n%s%s'%(wip_tmp, int(tab)*' ', line)
tab = int(tab) + 3
continue
if line.startswith('</div'):
if line.startswith('</div') or line.startswith('</p'):
tab = int(tab) - 3
wip_tmp = '%s\n%s%s'%(wip_tmp, int(tab)*' ', line)
continue