restructure title fix

Signed-off-by: Panos Vagenas <35837085+vagenas@users.noreply.github.com>
This commit is contained in:
Panos Vagenas 2024-10-29 17:18:26 +01:00
parent 5c8e06fbde
commit e11bbc8b0b

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):