Add a lateral shift when stripping a space - the total width of the cell must not change. Relates to 1117.
This commit is contained in:
parent
ea3d639836
commit
682060daaf
1 changed files with 2 additions and 2 deletions
|
|
@ -575,9 +575,9 @@ class EvCell(object):
|
||||||
hfill_char = self.hfill_char
|
hfill_char = self.hfill_char
|
||||||
width = self.width
|
width = self.width
|
||||||
if align == "l":
|
if align == "l":
|
||||||
return [(line.lstrip(" ") if line.startswith(" ") and not line.startswith(" ") else line) + hfill_char * (width - m_len(line)) for line in data]
|
return [(line.lstrip(" ") + " " if line.startswith(" ") and not line.startswith(" ") else line) + hfill_char * (width - m_len(line)) for line in data]
|
||||||
elif align == "r":
|
elif align == "r":
|
||||||
return [hfill_char * (width - m_len(line)) + (line.rstrip(" ") if line.endswith(" ") and not line.endswith(" ") else line) for line in data]
|
return [hfill_char * (width - m_len(line)) + (" " + line.rstrip(" ") if line.endswith(" ") and not line.endswith(" ") else line) for line in data]
|
||||||
else: # center, 'c'
|
else: # center, 'c'
|
||||||
return [self._center(line, self.width, self.hfill_char) for line in data]
|
return [self._center(line, self.width, self.hfill_char) for line in data]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue