# HG changeset patch # User Paul Boddie # Date 1543341496 -3600 # Node ID 9009a657d7533b931d8aac89d66105b084916140 # Parent a39662607f245813249ea65ddf74452f279c18a1 Make sure that the appropriate parser is used to parse directives. diff -r a39662607f24 -r 9009a657d753 moinformat/parsers/common.py --- a/moinformat/parsers/common.py Tue Nov 27 16:19:49 2018 +0100 +++ b/moinformat/parsers/common.py Tue Nov 27 18:58:16 2018 +0100 @@ -315,6 +315,11 @@ self.set_region(items, region) + # Only parse directives if the region is transparent. + + if region.transparent: + self.parse_region_directives(region) + # Parse inline and opaque regions. if not region.transparent: @@ -369,11 +374,6 @@ region.transparent = False parser = parser or self.get_parser("moin") - # Only parse directives if the region is transparent. - - if region.transparent: - self.parse_region_directives(region) - parser.parse_region_content(self.items, region) def parse_region_header(self, region):