1.1 --- a/moinformat/parsers/table.py Tue Jul 17 23:27:57 2018 +0200
1.2 +++ b/moinformat/parsers/table.py Tue Jul 17 23:30:23 2018 +0200
1.3 @@ -22,7 +22,8 @@
1.4 from moinformat.parsers.common import get_patterns, \
1.5 excl, expect, group
1.6 from moinformat.parsers.moin import MoinParser
1.7 -from moinformat.tree import Table, TableAttrs, TableCell, TableRow, Text
1.8 +from moinformat.tree import Continuation, Table, TableAttrs, TableCell, \
1.9 + TableRow, Text
1.10
1.11 join = "".join
1.12
1.13 @@ -73,7 +74,11 @@
1.14 # Parser handler methods.
1.15
1.16 def parse_continuation(self, cell):
1.17 - pass
1.18 +
1.19 + "Handle continuation padding."
1.20 +
1.21 + feature = self.match_group("feature")
1.22 + cell.append(Continuation(feature))
1.23
1.24 def parse_table_end(self, cell):
1.25
1.26 @@ -99,17 +104,16 @@
1.27 excl(r".*==\s*?$"), # not-heading
1.28 expect(r"\N*?"))), # ws-excl-nl
1.29
1.30 - "continuation" : join(("^",
1.31 + "continuation" : group("feature",
1.32 + join(("^",
1.33 group("indent", r"\N*"), # ws... (optional)
1.34 r"\.\.", # ..
1.35 - excl(r"\."), # not-.
1.36 - expect(r"\N"))), # ws
1.37 + excl(r"\.")))), # not-.
1.38
1.39 # Within text:
1.40
1.41 "columnsep" : join((r"\|\|", # ||
1.42 - excl(r"\|"), # not-|
1.43 - expect(r"\N"))), # ws
1.44 + excl(r"\|"))), # not-|
1.45 })
1.46
1.47 patterns = get_patterns(syntax)