Author: bugman Date: Fri Mar 8 17:30:20 2013 New Revision: 18711 URL: http://svn.gna.org/viewcvs/relax?rev=18711&view=rev Log: Fix for lib.text.table.format_table() when more than one multi-column cell per row is encountered. The algorithm for determining the total width of the multi-column cell in _table_line() was not checking if the end of the span was being reached. 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=18711&r1=18710&r2=18711&view=diff ============================================================================== --- trunk/lib/text/table.py (original) +++ trunk/lib/text/table.py Fri Mar 8 17:30:20 2013 @@ -67,6 +67,10 @@ for i in range(len(data)): # Loop over the columns. for j in range(len(data[i])): + # Skip multi-columns. + if data[i][j] == MULTI_COL: + continue + # Default left justification. justification[i][j] = 'l' @@ -159,6 +163,8 @@ for j in range(i+1, num_col): if text[j] == MULTI_COL: width += len(separator) + widths[j] + else: + break # Add the padded text. if justification[i] == 'l':