mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix 2.5ism in textwriter.
This commit is contained in:
parent
a7e992a46a
commit
5cb01d68dc
@ -305,7 +305,10 @@ class TextTranslator(nodes.NodeVisitor):
|
||||
cells = []
|
||||
for i, cell in enumerate(line):
|
||||
par = textwrap.wrap(cell, width=colwidths[i])
|
||||
maxwidth = max(map(len, par)) if par else 0
|
||||
if par:
|
||||
maxwidth = max(map(len, par))
|
||||
else:
|
||||
maxwidth = 0
|
||||
realwidths[i] = max(realwidths[i], maxwidth)
|
||||
cells.append(par)
|
||||
fmted_rows.append(cells)
|
||||
|
Loading…
Reference in New Issue
Block a user