1.1 --- a/moinformat/parsers/common.py Mon Nov 26 22:59:52 2018 +0100
1.2 +++ b/moinformat/parsers/common.py Tue Nov 27 22:50:43 2018 +0100
1.3 @@ -356,6 +356,11 @@
1.4
1.5 self.set_region(items, region)
1.6
1.7 + # Only parse directives if the region is transparent.
1.8 +
1.9 + if region.transparent:
1.10 + self.parse_region_directives(region)
1.11 +
1.12 # Parse inline and opaque regions.
1.13
1.14 if not region.transparent:
1.15 @@ -410,11 +415,6 @@
1.16 region.transparent = False
1.17 parser = parser or self.get_parser("moin")
1.18
1.19 - # Only parse directives if the region is transparent.
1.20 -
1.21 - if region.transparent:
1.22 - self.parse_region_directives(region)
1.23 -
1.24 parser.parse_region_content(self.items, region)
1.25
1.26 def parse_region_header(self, region):