wip: in-dev for HTML tabulations from final result
This commit is contained in:
parent
c841c63218
commit
8664c8babc
|
@ -591,7 +591,6 @@ def tab_article(article):
|
||||||
for line in article:
|
for line in article:
|
||||||
if len(line) == 0: continue
|
if len(line) == 0: continue
|
||||||
|
|
||||||
print(line)
|
|
||||||
if line.startswith('<h'):
|
if line.startswith('<h'):
|
||||||
tn = line[2]
|
tn = line[2]
|
||||||
tab = int(tn) * 3
|
tab = int(tn) * 3
|
||||||
|
@ -599,12 +598,12 @@ def tab_article(article):
|
||||||
tab = int(tab) + 3
|
tab = int(tab) + 3
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if line.startswith('<div'):
|
if line.startswith('<div') or line.startswith('<p'):
|
||||||
wip_tmp = '%s\n%s%s'%(wip_tmp, int(tab)*' ', line)
|
wip_tmp = '%s\n%s%s'%(wip_tmp, int(tab)*' ', line)
|
||||||
tab = int(tab) + 3
|
tab = int(tab) + 3
|
||||||
continue
|
continue
|
||||||
|
|
||||||
if line.startswith('</div'):
|
if line.startswith('</div') or line.startswith('</p'):
|
||||||
tab = int(tab) - 3
|
tab = int(tab) - 3
|
||||||
wip_tmp = '%s\n%s%s'%(wip_tmp, int(tab)*' ', line)
|
wip_tmp = '%s\n%s%s'%(wip_tmp, int(tab)*' ', line)
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in New Issue