changeset 1572:f6136eb3b021

Fixed MoinMoinBugs/TableAlignmentProbsWithGUI
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 18 Sep 2006 21:31:27 +0200
parents 8db7120ab81e
children 1453513eaa7e
files MoinMoin/parser/text_moin_wiki.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/parser/text_moin_wiki.py	Mon Sep 18 21:28:30 2006 +0200
+++ b/MoinMoin/parser/text_moin_wiki.py	Mon Sep 18 21:31:27 2006 +0200
@@ -730,7 +730,9 @@
 
             # check for adjacent cell markers
             if word.count("|") > 2:
-                if not attrs.has_key('align'):
+                if not attrs.has_key('align') and \
+                   not (attrs.has_key('style') and 'text-align' in attrs['style'].lower()):
+                    # add center alignment if we don't have some alignment already
                     attrs['align'] = '"center"'
                 if not attrs.has_key('colspan'):
                     attrs['colspan'] = '"%d"' % (word.count("|")/2)