# HG changeset patch # User Paul Boddie # Date 1635195790 -7200 # Node ID 6af6b0d9c9a96f3649f7b609d8ed2c19f1c7f2cb # Parent f24099c58d7867e3c75d30bd30dc5f6696eecc32 Use serialisation of removed break nodes to obtain the appropriate padding text. diff -r f24099c58d78 -r 6af6b0d9c9a9 moinformat/parsers/table.py --- a/moinformat/parsers/table.py Mon Oct 25 01:26:47 2021 +0200 +++ b/moinformat/parsers/table.py Mon Oct 25 23:03:10 2021 +0200 @@ -21,6 +21,7 @@ from moinformat.parsers.common import get_patterns, excl, group from moinformat.parsers.moin import MoinParser +from moinformat.serialisers import serialise from moinformat.tree.moin import Break, Table, TableAttrs, TableCell, \ TableRow, Text from moinformat.tree.table import Continuation @@ -65,7 +66,7 @@ if isinstance(first, Break): cell.remove(first) - cell.padding += "\n" + cell.padding += serialise(first, self.get_serialiser()) # Detect the end of the table.