1.1 --- a/moinformat/parsers/table.py Sun Jul 15 14:18:57 2018 +0200
1.2 +++ b/moinformat/parsers/table.py Sun Jul 15 14:19:42 2018 +0200
1.3 @@ -3,7 +3,7 @@
1.4 """
1.5 Moin wiki table parser.
1.6
1.7 -Copyright (C) 2017 Paul Boddie <paul@boddie.org.uk>
1.8 +Copyright (C) 2017, 2018 Paul Boddie <paul@boddie.org.uk>
1.9
1.10 This program is free software; you can redistribute it and/or modify it under
1.11 the terms of the GNU General Public License as published by the Free Software
1.12 @@ -54,14 +54,16 @@
1.13
1.14 # Detect the end of the table.
1.15
1.16 - if self.read_matching() == "regionend":
1.17 + pattern = self.matching_pattern()
1.18 +
1.19 + if pattern == "regionend":
1.20 break
1.21
1.22 - if self.read_matching() == "columnsep":
1.23 + elif pattern == "columnsep":
1.24 cell = TableCell([])
1.25 row.append(cell)
1.26
1.27 - elif self.read_matching() == "rowsep":
1.28 + elif pattern == "rowsep":
1.29 row = TableRow([])
1.30 table.append(row)
1.31 cell = TableCell([])
1.32 @@ -76,7 +78,7 @@
1.33
1.34 "Handle the end of a region within 'cell'."
1.35
1.36 - feature = self.read_match()
1.37 + feature = self.match_group()
1.38 if self.region.have_end(feature):
1.39 raise StopIteration
1.40 else: