1.1 --- a/moinformat/serialisers/moin/moin.py Fri Jun 03 18:42:46 2022 +0200
1.2 +++ b/moinformat/serialisers/moin/moin.py Fri Jun 03 18:43:44 2022 +0200
1.3 @@ -28,7 +28,7 @@
1.4 input_formats = ["moin", "wiki"]
1.5 formats = ["moin", "wiki"]
1.6
1.7 - def start_region(self, level, indent, type, extra):
1.8 + def start_region(self, level, indent, type, args, extra):
1.9 out = self.out
1.10 if level:
1.11 out(" " * indent + "{" * level)
1.12 @@ -36,9 +36,15 @@
1.13 # Produce a header for regions within a top-level region.
1.14
1.15 if type and type != "inline" and level:
1.16 - out("#!%s\n" % type)
1.17 +
1.18 + # Obtain individual arguments, excluding the region type.
1.19
1.20 - def end_region(self, level, indent, type, extra):
1.21 + args = args.split(" ")[1:]
1.22 + args_str = args and (" %s" % " ".join(args)) or ""
1.23 +
1.24 + out("#!%s%s\n" % (type, args_str))
1.25 +
1.26 + def end_region(self, level, indent, type, args, extra):
1.27 out = self.out
1.28 if level:
1.29 out("%s%s" % ("}" * level, extra or ""))