# HG changeset patch # User Paul Boddie # Date 1354146414 -3600 # Node ID 56acd0f6253d7dea868f1618b711bc151d5abd21 # Parent 964fe9dd9c8f5b356eacb0cfd70ed962a539b66b Fixed unfinished column spans on the final rows of tables. Fixed the cell attributes pattern to avoid matching macros. diff -r 964fe9dd9c8f -r 56acd0f6253d ImprovedTableParser.py --- a/ImprovedTableParser.py Sun Oct 07 00:44:29 2012 +0200 +++ b/ImprovedTableParser.py Thu Nov 29 00:46:54 2012 +0100 @@ -26,7 +26,7 @@ "columns" : (r"\|\|[ \t]*", 0), # || ws-excl-nl # At start of column text: - "column" : (r"^\s*<(.*?)>\s*(.*)", re.DOTALL), # ws < attributes > ws + "column" : (r"^\s*<([^<].*?)>\s*(.*)", re.DOTALL), # ws < not-< attributes > ws } patterns = {} @@ -216,6 +216,7 @@ if columns: extractAttributes(columns, row_attrs, table_attrs) + span_columns(columns, columnnumber) return table_attrs, rows