changeset 2855:f003d451be90

text_html_text_moin_wiki: br for empty cell of OOo to gui replaced by whitespace at process_table_data
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sun, 23 Sep 2007 08:19:55 +0200
parents 97c5fba1c6ae
children 604b5181385d
files MoinMoin/converter/text_html_text_moin_wiki.py
diffstat 1 files changed, 8 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/converter/text_html_text_moin_wiki.py	Thu Sep 20 20:57:29 2007 +0200
+++ b/MoinMoin/converter/text_html_text_moin_wiki.py	Sun Sep 23 08:19:55 2007 +0200
@@ -745,11 +745,6 @@
             self.text.append(text)                          # so we just drop the header markup and keep the text
             return
 
-        # if we get br from e.g. cut and paste from OOo to the gui it should be appended as <<BR>>
-        if name == 'br':
-            self.text.append(' <<BR>> ')
-            return
-
         func = getattr(self, "process_%s" % name, None)
         if func:
             func(node)
@@ -1048,8 +1043,14 @@
         if not found:
             for i in node.childNodes:
                 if i.nodeType == Node.ELEMENT_NODE:
-                    self.process_inline(i)
-                    found = True
+                    if name == 'br':
+                        # if we get a br for an empty cell from e.g. cut and paste from OOo
+                        # to the gui it should be appended as white_space.
+                        self.text.append(self.white_space)
+                        found = True
+                    else:
+                        self.process_inline(i)
+                        found = True
                 elif i.nodeType == Node.TEXT_NODE:
                     data = i.data.strip('\n').replace('\n', ' ')
                     if data: