1.1 --- a/moinformat/__init__.py Wed May 03 18:16:06 2017 +0200
1.2 +++ b/moinformat/__init__.py Thu May 04 16:04:52 2017 +0200
1.3 @@ -19,6 +19,7 @@
1.4 this program. If not, see <http://www.gnu.org/licenses/>.
1.5 """
1.6
1.7 +from moinformat.serialisers import serialise
1.8 from moinformat.tree import Block, Break, DefItem, DefTerm, FontStyle, Heading, \
1.9 Larger, ListItem, Monospace, Region, Rule, Smaller, \
1.10 Subscript, Superscript, TableAttr, TableAttrs, \
1.11 @@ -478,15 +479,9 @@
1.12 # If the cell was started but not finished, convert the row into text.
1.13
1.14 if not row.nodes or not cell.empty():
1.15 - region.append_inline(Text("||"))
1.16 -
1.17 - # Convert all cells.
1.18 -
1.19 for node in row.nodes:
1.20 - region.append_inline_many(node.nodes)
1.21 - region.append_inline(Text("||"))
1.22 -
1.23 - region.append_inline_many(cell.nodes)
1.24 + region.append_inline(Text(serialise(node)))
1.25 + region.append_inline(Text(serialise(cell)))
1.26 region.append_inline(Text(trailing))
1.27
1.28 new_block(region)
2.1 --- a/moinformat/serialisers.py Wed May 03 18:16:06 2017 +0200
2.2 +++ b/moinformat/serialisers.py Thu May 04 16:04:52 2017 +0200
2.3 @@ -133,16 +133,18 @@
2.4 self.out(">")
2.5
2.6 def start_table_cell(self, attrs):
2.7 + self.out("||")
2.8 if attrs and not attrs.empty():
2.9 attrs.to_string(self)
2.10
2.11 def end_table_cell(self):
2.12 - self.out("||")
2.13 + pass
2.14
2.15 def start_table_row(self):
2.16 - self.out("||")
2.17 + pass
2.18
2.19 def end_table_row(self, trailing):
2.20 + self.out("||")
2.21 self.out(trailing)
2.22
2.23 def start_underline(self):