changeset 3993:e0301e5bf019

fix gui editor line break in list problem MoinMoinBugs/GuiEditorLineBreakInLists
author Byeongweon [tasyblue@gmail.com]
date Sun, 03 Aug 2008 03:56:42 +0900
parents 513613f25bbf
children bdb71fda36eb
files MoinMoin/converter/text_html_text_moin_wiki.py
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/MoinMoin/converter/text_html_text_moin_wiki.py	Sat Aug 02 18:00:41 2008 +0900
+++ b/MoinMoin/converter/text_html_text_moin_wiki.py	Sun Aug 03 03:56:42 2008 +0900
@@ -661,7 +661,10 @@
             self.text.append(indent)
         for i in nodelist:
             if i.nodeType == Node.ELEMENT_NODE:
-                self.process_inline(i)
+                if i.localName == 'br':
+                    self.text.append('<<BR>>')
+                else:
+                    self.process_inline(i)
             elif i.nodeType == Node.TEXT_NODE:
                 self.text.append(i.data.strip('\n').replace('\n', ' '))
         self.text.append(self.new_line)
@@ -700,6 +703,8 @@
                     self.text.append(indent)
                 self.process_table(i)
                 found = True
+            elif name == 'br':
+                pending.append(i)
             else:
                 pending.append(i)