comparison MoinMoin/converter/text_html_text_moin_wiki.py @ 2901:5cd9d4c041b9

text_html_text_moin_wiki: linebreak in table cell should be written into wiki text as <<BR>>
author Reimar Bauer <rb.proj AT googlemail DOT com>
date Sun, 28 Oct 2007 09:19:40 +0100
parents aea1aadf2cfb
children a900b2f20fb7
comparison
equal deleted inserted replaced
2899:5a3037bd131a 2901:5cd9d4c041b9
1065 self.process_paragraph_item(i) 1065 self.process_paragraph_item(i)
1066 self.text.append(self.white_space) 1066 self.text.append(self.white_space)
1067 found = True 1067 found = True
1068 if not found: 1068 if not found:
1069 for i in node.childNodes: 1069 for i in node.childNodes:
1070 name = i.localName
1070 if i.nodeType == Node.ELEMENT_NODE: 1071 if i.nodeType == Node.ELEMENT_NODE:
1071 if name == 'br': 1072 if name == 'br':
1072 # if we get a br for an empty cell from e.g. cut and paste from OOo 1073 # if we get a br for a cell from e.g. cut and paste from OOo
1073 # to the gui it should be appended as white_space. 1074 # or if someone simulates a list by enter in a cell
1074 self.text.append(self.white_space) 1075 # it should be appended as macro BR.
1076 self.text.append('<<BR>>')
1075 found = True 1077 found = True
1078 continue
1076 else: 1079 else:
1077 self.process_inline(i) 1080 self.process_inline(i)
1078 found = True 1081 found = True
1079 elif i.nodeType == Node.TEXT_NODE: 1082 elif i.nodeType == Node.TEXT_NODE:
1080 data = i.data.strip('\n').replace('\n', ' ') 1083 data = i.data.strip('\n').replace('\n', ' ')