1.1 --- a/moinformat/parsers/moin.py Thu Jul 26 17:05:08 2018 +0200
1.2 +++ b/moinformat/parsers/moin.py Thu Jul 26 20:09:48 2018 +0200
1.3 @@ -21,7 +21,6 @@
1.4
1.5 # Document transformations.
1.6
1.7 -from moinformat.links import get_linker
1.8 from moinformat.macros import get_macro
1.9
1.10 # Parser functionality and pattern definition.
1.11 @@ -68,7 +67,6 @@
1.12 # Record certain node occurrences for later evaluation.
1.13
1.14 self.macros = []
1.15 - self.links = []
1.16
1.17 # Principal parser methods.
1.18
1.19 @@ -119,31 +117,6 @@
1.20 macro = macro_cls(node, self.region)
1.21 macro.evaluate()
1.22
1.23 - # Link translation.
1.24 -
1.25 - def translate_links(self, scheme, pagename):
1.26 -
1.27 - """
1.28 - Translate the link nodes in the document for the given 'scheme' and
1.29 - employing the given document 'pagename'.
1.30 - """
1.31 -
1.32 - # Obtain a class for the named linker.
1.33 -
1.34 - linker_cls = get_linker(scheme)
1.35 - if not linker_cls:
1.36 - return
1.37 -
1.38 - # Instantiate the class with document metadata.
1.39 -
1.40 - linker = linker_cls(pagename)
1.41 -
1.42 - for node in self.links:
1.43 -
1.44 - # Translate the link.
1.45 -
1.46 - node.target = linker.translate(node.target)
1.47 -
1.48
1.49
1.50 # Parser methods supporting different page features.
1.51 @@ -518,10 +491,6 @@
1.52 link = Link(text and [Text(text)], target)
1.53 region.append_inline(link)
1.54
1.55 - # Record the link for later processing.
1.56 -
1.57 - self.root.links.append(link)
1.58 -
1.59 def parse_macro(self, region):
1.60 name = self.match_group("name")
1.61 args = self.match_group("args")