1.1 --- a/moinformat/output/common.py Sun Aug 05 18:46:36 2018 +0200
1.2 +++ b/moinformat/output/common.py Sun Aug 05 19:06:31 2018 +0200
1.3 @@ -33,8 +33,11 @@
1.4
1.5 self.parameters = parameters
1.6 self.encoding = parameters and parameters.get("encoding") or self.default_encoding
1.7 + self.reset()
1.8
1.9 - # Set up an output collector.
1.10 + def reset(self):
1.11 +
1.12 + "Set up an output collector."
1.13
1.14 self.output = []
1.15
1.16 @@ -56,7 +59,9 @@
1.17
1.18 "Return the output as a plain string."
1.19
1.20 - return "".join(self.output)
1.21 + s = "".join(self.output)
1.22 + self.reset()
1.23 + return s
1.24
1.25 # Serialisation methods.
1.26