Mercurial > public > mercurial-scm > hg-stable
diff mercurial/minirst.py @ 16815:e740746ea557
minirst: generate tables as a list of joined lines
author | Olav Reinert <seroton10@gmail.com> |
---|---|
date | Fri, 01 Jun 2012 11:58:23 +0200 |
parents | ee8f5e4ce7b8 |
children | e7cfe3587ea4 |
line wrap: on
line diff
--- a/mercurial/minirst.py Sat May 26 20:49:51 2012 +0200 +++ b/mercurial/minirst.py Fri Jun 01 11:58:23 2012 +0200 @@ -658,7 +658,7 @@ return lines def maketable(data, indent=0, header=False): - '''Generate an RST table for the given table data''' + '''Generate an RST table for the given table data as a list of lines''' widths = [max(encoding.colwidth(e) for e in c) for c in zip(*data)] indent = ' ' * indent @@ -674,4 +674,4 @@ if header and len(data) > 1: out.insert(2, div) out.append(div) - return ''.join(out) + return out