# HG changeset patch # User Paul Boddie # Date 1688229818 -7200 # Node ID a0652d04aedba2bd69753404e86fbbbd9587944f # Parent 5e329963eb17598f6d85f7c0d79baaf3b8ed3d81 Introduced more explicit document fragment selection. diff -r 5e329963eb17 -r a0652d04aedb moinconvert --- a/moinconvert Sat Jul 01 18:40:45 2023 +0200 +++ b/moinconvert Sat Jul 01 18:43:38 2023 +0200 @@ -283,6 +283,7 @@ "bundle" : bundle, "common_attachments": common, "document_index" : getvalue(document_indexes), + "fragment" : fragment, "input_context" : input_dir and \ getvalue(input_dir_types, "directory") or \ "standalone", diff -r 5e329963eb17 -r a0652d04aedb moinformat/parsers/html.py --- a/moinformat/parsers/html.py Sat Jul 01 18:40:45 2023 +0200 +++ b/moinformat/parsers/html.py Sat Jul 01 18:43:38 2023 +0200 @@ -38,10 +38,10 @@ doc = Parser(s).parse() - # If a theme is going to be used with the document, find the body node - # and return its children in a fragment. + # If only a fragment is involved, find the body node and return its + # children in a fragment. - if self.metadata.get("theme_name"): + if self.metadata.get("fragment") or self.metadata.get("theme_name"): body = self._find_body(doc) if body: