1.1 --- a/moinformat/serialisers/common.py Thu Jul 26 17:05:08 2018 +0200
1.2 +++ b/moinformat/serialisers/common.py Thu Jul 26 20:09:48 2018 +0200
1.3 @@ -25,15 +25,17 @@
1.4
1.5 format = None # defined by subclasses
1.6
1.7 - def __init__(self, out, formats=None):
1.8 + def __init__(self, out=None, formats=None, linker=None):
1.9
1.10 """
1.11 - Initialise the serialiser with an 'out' callable and an optional
1.12 - 'formats' mapping from names to serialiser classes.
1.13 + Initialise the serialiser with an 'out' callable, an optional 'formats'
1.14 + mapping from names to serialiser classes, and an optional 'linker'
1.15 + object for translating links.
1.16 """
1.17
1.18 self.out = out
1.19 self.formats = formats
1.20 + self.linker = linker
1.21 self.init()
1.22
1.23 def init(self):
1.24 @@ -43,7 +45,8 @@
1.25 pass
1.26
1.27 def __repr__(self):
1.28 - return "%s(%r, %r)" % (self.__class__.__name__, self.out, self.formats)
1.29 + return "%s(%r, %r, %r)" % (self.__class__.__name__, self.out,
1.30 + self.formats, self.linker)
1.31
1.32 def escape_attr(s):
1.33