# HG changeset patch # User Paul Boddie # Date 1342134788 -7200 # Node ID bb1e664a32b9aa5c2a1868338881ceba7e7a7d1f # Parent d08ffb65157d7abf25602c72ed699338620e4809 Consume space after row markers, avoiding indentation for text on the same line. diff -r d08ffb65157d -r bb1e664a32b9 ImprovedTableParser.py --- a/ImprovedTableParser.py Fri Jul 13 01:03:11 2012 +0200 +++ b/ImprovedTableParser.py Fri Jul 13 01:13:08 2012 +0200 @@ -18,12 +18,12 @@ syntax = { # At start of line: - "rows" : (r"^==(?!.*?==$)", re.MULTILINE), # == not-heading + "rows" : (r"^==(?!.*?==$)[ \t]?", re.MULTILINE), # == not-heading ws-excl-nl + "continuations" : (r"^\s*\.\.(?!\.)[ \t]?", re.MULTILINE), # .. ws-excl-nl or .. not-dot # Within text: "markers" : (r"([{]{3,}|[}]{3,})", re.MULTILINE | re.DOTALL), # {{{... or }}}... "columns" : (r"\|\|[ \t]*", 0), # || ws-excl-nl - "continuations" : (r"^\s*\.\.(?!\.)[ \t]?", re.MULTILINE), # .. ws-excl-nl or .. not-dot # At start of column text: "column" : (r"^\s*<(.*?)>\s*(.*)", re.DOTALL), # ws < attributes > ws