restructure title fix (#187)

Signed-off-by: Panos Vagenas <35837085+vagenas@users.noreply.github.com>
This commit is contained in:
Panos Vagenas 2024-10-30 10:19:58 +01:00 committed by GitHub
parent fc12cda82b
commit 14b63a3e7d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -179,10 +179,8 @@ class HTMLDocumentBackend(DeclarativeDocumentBackend):
self.parents[self.level] = doc.add_text(
parent=self.parents[0], label=DocItemLabel.TITLE, text=text
)
return # dont add another heading with the same text!
elif hlevel > self.level:
else:
if hlevel > self.level:
# add invisible group
for i in range(self.level + 1, hlevel):