1.1 --- a/moinformat/tree/moin.py Sun Apr 19 21:20:21 2020 +0200
1.2 +++ b/moinformat/tree/moin.py Sun May 03 23:44:19 2020 +0200
1.3 @@ -3,7 +3,7 @@
1.4 """
1.5 Moin wiki format document tree nodes.
1.6
1.7 -Copyright (C) 2017, 2018, 2019 Paul Boddie <paul@boddie.org.uk>
1.8 +Copyright (C) 2017, 2018, 2019, 2020 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 @@ -466,6 +466,15 @@
1.13
1.14 "A collection of table attributes."
1.15
1.16 + def __init__(self, nodes):
1.17 + Container.__init__(self, nodes)
1.18 +
1.19 + # Parsing state flags, inconsequential to any final document tree.
1.20 + # If incomplete remains set, the attributes are discarded.
1.21 +
1.22 + self.incomplete = True
1.23 + self.found_cell = False
1.24 +
1.25 def __repr__(self):
1.26 return "TableAttrs(%r)" % self.nodes
1.27
1.28 @@ -476,7 +485,8 @@
1.29 def to_string(self, out):
1.30 out.start_table_attrs()
1.31 out.table_attrs(self.nodes)
1.32 - out.end_table_attrs()
1.33 + if not self.incomplete:
1.34 + out.end_table_attrs()
1.35
1.36 class Table(Container):
1.37