Have evtable align arg strip out whitespace along the border that it is aligned with, so that the text is justified.

This commit is contained in:
Tehom 2016-10-20 19:11:46 -04:00
parent 44e4ff4c1d
commit c9a9f145c7

View file

@ -573,9 +573,9 @@ class EvCell(object):
hfill_char = self.hfill_char
width = self.width
if align == "l":
return [line + hfill_char * (width - m_len(line)) for line in data]
return [line.lstrip() + hfill_char * (width - m_len(line)) for line in data]
elif align == "r":
return [hfill_char * (width - m_len(line)) + line for line in data]
return [hfill_char * (width - m_len(line)) + line.rstrip() for line in data]
else: # center, 'c'
return [self._center(line, self.width, self.hfill_char) for line in data]