MoinLight

Changeset

310:6af6b0d9c9a9
2021-10-25 Paul Boddie raw files shortlog changelog graph Use serialisation of removed break nodes to obtain the appropriate padding text.
moinformat/parsers/table.py (file)
     1.1 --- a/moinformat/parsers/table.py	Mon Oct 25 01:26:47 2021 +0200
     1.2 +++ b/moinformat/parsers/table.py	Mon Oct 25 23:03:10 2021 +0200
     1.3 @@ -21,6 +21,7 @@
     1.4  
     1.5  from moinformat.parsers.common import get_patterns, excl, group
     1.6  from moinformat.parsers.moin import MoinParser
     1.7 +from moinformat.serialisers import serialise
     1.8  from moinformat.tree.moin import Break, Table, TableAttrs, TableCell, \
     1.9                                   TableRow, Text
    1.10  from moinformat.tree.table import Continuation
    1.11 @@ -65,7 +66,7 @@
    1.12  
    1.13              if isinstance(first, Break):
    1.14                  cell.remove(first)
    1.15 -                cell.padding += "\n"
    1.16 +                cell.padding += serialise(first, self.get_serialiser())
    1.17  
    1.18              # Detect the end of the table.
    1.19