fix: improve HTML layer detection, various MD fixes (#1241)

Markdown fixes:
- properly propagate section header levels
- improve handling of list subroots without text

Signed-off-by: Panos Vagenas <pva@zurich.ibm.com>
This commit is contained in:
Panos Vagenas
2025-03-26 16:07:14 +01:00
committed by GitHub
parent 85c4df887b
commit 9210812bfa
8 changed files with 560 additions and 465 deletions

View File

@@ -206,9 +206,9 @@ class HTMLDocumentBackend(DeclarativeDocumentBackend):
hlevel = int(element.name.replace("h", ""))
text = element.text.strip()
if hlevel == 1:
self.content_layer = ContentLayer.BODY
self.content_layer = ContentLayer.BODY
if hlevel == 1:
for key in self.parents.keys():
self.parents[key] = None