From 0c17a8bee1da0954bf696226146c8671051fff7d Mon Sep 17 00:00:00 2001 From: Michael McGrath Date: Tue, 1 Apr 2008 16:05:13 -0500 Subject: [PATCH] Added some more table cleanup --- scripts/moin2mw/moin2mw.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/moin2mw/moin2mw.py b/scripts/moin2mw/moin2mw.py index 6f8e603..26d3d9d 100755 --- a/scripts/moin2mw/moin2mw.py +++ b/scripts/moin2mw/moin2mw.py @@ -39,8 +39,9 @@ def _table_xlat(data): newline = re.sub('\', '', newline) newline = re.sub('\', '', newline) + newline = newline.rstrip().rstrip('||').rstrip() result.append(newline) - result.append(u"|-\n") + result.append(u"\n|-\n") else: if in_table: if has_class: @@ -130,8 +131,8 @@ def _remove_toc(line): return (line, {}) -chain = [ _fix_links, _escape, _fix_comments, _find_meta, _studlycaps, _fix_bullets, - _fix_numlists, _fix_pre, _unspace_text, _kill_link_prefixes, _remove_toc ] +chain = [ _remove_toc, _fix_links, _escape, _fix_comments, _find_meta, _studlycaps, _fix_bullets, + _fix_numlists, _fix_pre, _unspace_text, _kill_link_prefixes ] class MoinWiki(object): def __init__(self, wiki_path):