remove .prettify() @ pre_with_pr (bs4);

fix spaces in tables too
This commit is contained in:
Mathieu PATUREL
2017-01-26 10:43:04 +11:00
parent 48c1800065
commit 6f18e8e4a2
4 changed files with 5 additions and 14 deletions

View File

@ -56,7 +56,8 @@ def pre_table(s_table):
text = '<pre class="table"><code>'
for i, row in enumerate(rows):
for j, cell in enumerate(row):
text += '| ' + ''.join(str(node) for node in cell.contents) + ' ' * (cols_width[j] - len(cell.text))
text += '| ' + ''.join(str(node) for node in cell.contents) \
+ ' ' * (cols_width[j] - len(cell.text) + 1)
text += '|\n'
text += '</pre></code>'
return text