1.1 --- a/moinformat/parsers/html.py Sat Jul 01 18:40:45 2023 +0200
1.2 +++ b/moinformat/parsers/html.py Sat Jul 01 18:43:38 2023 +0200
1.3 @@ -38,10 +38,10 @@
1.4
1.5 doc = Parser(s).parse()
1.6
1.7 - # If a theme is going to be used with the document, find the body node
1.8 - # and return its children in a fragment.
1.9 + # If only a fragment is involved, find the body node and return its
1.10 + # children in a fragment.
1.11
1.12 - if self.metadata.get("theme_name"):
1.13 + if self.metadata.get("fragment") or self.metadata.get("theme_name"):
1.14 body = self._find_body(doc)
1.15
1.16 if body: