changeset 2847:dc9048024d49

text_html_text_moin_wiki: reverted changeset 2840
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Thu, 20 Sep 2007 19:20:25 +0200
parents 167c6efea1de
children f9afcb3c8ede
files MoinMoin/converter/text_html_text_moin_wiki.py
diffstat 1 files changed, 4 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/converter/text_html_text_moin_wiki.py	Wed Sep 19 01:26:22 2007 +0200
+++ b/MoinMoin/converter/text_html_text_moin_wiki.py	Thu Sep 20 19:20:25 2007 +0200
@@ -543,9 +543,8 @@
             #    self.text.append("\n")
 
     def process_br(self, node):
-        if node.nodeType == Node.TEXT_NODE:
-            self.text.append(self.new_line) # without this, std multi-line text below some heading misses a whitespace
-                                            # when it gets merged to float text, like word word wordword word word
+        self.text.append(self.new_line) # without this, std multi-line text below some heading misses a whitespace
+                                        # when it gets merged to float text, like word word wordword word word
 
     def process_heading(self, node):
         text = self.node_list_text_only(node.childNodes).strip()
@@ -737,10 +736,6 @@
         if name is None:
             return
 
-        # unsupported tags
-        if name in (u'title', u'meta', u'style'):
-            return
-
         if name in ('h1', 'h2', 'h3', 'h4', 'h5', 'h6', ): # headers are not allowed here (e.g. inside a ul li),
             text = self.node_list_text_only(node.childNodes).strip() # but can be inserted via the editor
             self.text.append(text)                          # so we just drop the header markup and keep the text
@@ -980,7 +975,6 @@
             if i.nodeType == Node.ELEMENT_NODE:
                 name = i.localName
                 if name == 'tr':
-                    self.text.append(self.new_line_dont_remove)
                     self.process_table_record(i, style)
                     style = ""
                 elif name in ('thead', 'tbody', 'tfoot'):
@@ -994,6 +988,7 @@
                     raise ConvertError("process_table: Don't support %s element" % name)
             #else:
             #    raise ConvertError("Unexpected node: %r" % i)
+        self.text.append(self.new_line_dont_remove)
 
     def process_caption(self, table, node, style=""):
         # get first row
@@ -1068,7 +1063,7 @@
                     style = ""
                 else:
                     raise ConvertError("process_table_record: Don't support %s element" % name)
-        self.text += '||'
+        self.text.extend(["||", self.new_line_dont_remove])
 
     def process_a(self, node):
         scriptname = self.request.getScriptname()