1.1 --- a/moinformat/macros/toc.py Sat Apr 13 22:41:54 2019 +0200
1.2 +++ b/moinformat/macros/toc.py Sat Apr 13 23:25:33 2019 +0200
1.3 @@ -127,7 +127,7 @@
1.4
1.5 else:
1.6 new_items = []
1.7 - new_list = List(new_items, indent, marker, num)
1.8 + new_list = List(new_items)
1.9
1.10 # Add the list to the current item, if any.
1.11
2.1 --- a/moinformat/parsers/moin.py Sat Apr 13 22:41:54 2019 +0200
2.2 +++ b/moinformat/parsers/moin.py Sat Apr 13 23:25:33 2019 +0200
2.3 @@ -327,7 +327,7 @@
2.4
2.5 "Create a list, starting with 'item'."
2.6
2.7 - list = List([item], item.indent, item.marker, item.num)
2.8 + list = List([item])
2.9 self.parse_region_details(list, self.list_pattern_names, True)
2.10 return list
2.11
3.1 --- a/moinformat/tree/moin.py Sat Apr 13 22:41:54 2019 +0200
3.2 +++ b/moinformat/tree/moin.py Sat Apr 13 23:25:33 2019 +0200
3.3 @@ -3,7 +3,7 @@
3.4 """
3.5 Moin wiki format document tree nodes.
3.6
3.7 -Copyright (C) 2017, 2018 Paul Boddie <paul@boddie.org.uk>
3.8 +Copyright (C) 2017, 2018, 2019 Paul Boddie <paul@boddie.org.uk>
3.9
3.10 This program is free software; you can redistribute it and/or modify it under
3.11 the terms of the GNU General Public License as published by the Free Software
3.12 @@ -404,14 +404,15 @@
3.13
3.14 "A list."
3.15
3.16 - def __init__(self, nodes, indent, marker, num):
3.17 + def __init__(self, nodes):
3.18 Container.__init__(self, nodes)
3.19 - self.indent = indent
3.20 - self.marker = marker
3.21 - self.num = num
3.22 + first = nodes and nodes[0] or None
3.23 + self.indent = first and first.indent
3.24 + self.marker = first and first.marker
3.25 + self.num = first and first.num
3.26
3.27 def __repr__(self):
3.28 - return "List(%r, %r, %r, %r)" % (self.nodes, self.indent, self.marker, self.num)
3.29 + return "List(%r)" % self.nodes
3.30
3.31 def prettyprint(self, indent=""):
3.32 l = ["%sList: indent=%d marker=%r num=%r" % (indent, self.indent, self.marker, self.num)]