1.1 --- a/moinconvert Sat Jul 01 18:40:45 2023 +0200
1.2 +++ b/moinconvert Sat Jul 01 18:43:38 2023 +0200
1.3 @@ -283,6 +283,7 @@
1.4 "bundle" : bundle,
1.5 "common_attachments": common,
1.6 "document_index" : getvalue(document_indexes),
1.7 + "fragment" : fragment,
1.8 "input_context" : input_dir and \
1.9 getvalue(input_dir_types, "directory") or \
1.10 "standalone",
2.1 --- a/moinformat/parsers/html.py Sat Jul 01 18:40:45 2023 +0200
2.2 +++ b/moinformat/parsers/html.py Sat Jul 01 18:43:38 2023 +0200
2.3 @@ -38,10 +38,10 @@
2.4
2.5 doc = Parser(s).parse()
2.6
2.7 - # If a theme is going to be used with the document, find the body node
2.8 - # and return its children in a fragment.
2.9 + # If only a fragment is involved, find the body node and return its
2.10 + # children in a fragment.
2.11
2.12 - if self.metadata.get("theme_name"):
2.13 + if self.metadata.get("fragment") or self.metadata.get("theme_name"):
2.14 body = self._find_body(doc)
2.15
2.16 if body: