Author: bugman Date: Fri Mar 8 12:48:26 2013 New Revision: 18695 URL: http://svn.gna.org/viewcvs/relax?rev=18695&view=rev Log: Fix for calculating column widths when multi-column cells are present in lib.text.table.format_table(). Modified: trunk/lib/text/table.py Modified: trunk/lib/text/table.py URL: http://svn.gna.org/viewcvs/relax/trunk/lib/text/table.py?rev=18695&r1=18694&r2=18695&view=diff ============================================================================== --- trunk/lib/text/table.py (original) +++ trunk/lib/text/table.py Fri Mar 8 12:48:26 2013 @@ -167,7 +167,7 @@ for i in range(num_head_rows): for j in range(num_cols): # Skip multicolumn entries. - if j < num_cols-1 and headings[i][j+1] == MULTI_COL: + if headings[i][j] == MULTI_COL or (j < num_cols-1 and headings[i][j+1] == MULTI_COL): continue # The element is larger than the previous. @@ -178,7 +178,7 @@ for i in range(num_rows): for j in range(num_cols): # Skip multicolumn entries. - if j < num_cols-1 and contents[i][j+1] == MULTI_COL: + if contents[i][j] == MULTI_COL or (j < num_cols-1 and contents[i][j+1] == MULTI_COL): continue # The element is larger than the previous.