1.1 --- a/moinformat/parsers/moin.py Fri Jun 30 22:06:08 2023 +0200
1.2 +++ b/moinformat/parsers/moin.py Fri Jun 30 23:48:16 2023 +0200
1.3 @@ -56,15 +56,14 @@
1.4
1.5 formats = ["moin", "wiki"]
1.6
1.7 - def __init__(self, metadata, parsers=None, root=None):
1.8 + # Principal parser methods.
1.9 +
1.10 + def parse(self, s):
1.11
1.12 """
1.13 - Initialise the parser with the given 'metadata' and optional 'parsers'.
1.14 - An optional 'root' indicates the document-level parser.
1.15 + Parse page text 's'. Pages consist of regions delimited by markers.
1.16 """
1.17
1.18 - ParserBase.__init__(self, metadata, parsers, root)
1.19 -
1.20 # Record certain node occurrences for later evaluation.
1.21
1.22 self.macros = []
1.23 @@ -77,13 +76,7 @@
1.24
1.25 self.link_targets = []
1.26
1.27 - # Principal parser methods.
1.28 -
1.29 - def parse(self, s):
1.30 -
1.31 - """
1.32 - Parse page text 's'. Pages consist of regions delimited by markers.
1.33 - """
1.34 + # Obtain the token stream and a region to populate.
1.35
1.36 self.items = self.get_items(s)
1.37 self.region = Region([], type="moin")