mirror of
https://github.com/DS4SD/docling.git
synced 2025-12-11 22:28:31 +00:00
fix(markdown): Setext heading support (#2359)
Signed-off-by: Matvei Smirnov <vdalekesmirnov@gmail.com> Co-authored-by: Matvei Smirnov <matvei.smirnov@vkteam.ru>
This commit is contained in:
@@ -249,7 +249,10 @@ class MarkdownDocumentBackend(DeclarativeDocumentBackend):
|
||||
|
||||
# Iterates over all elements in the AST
|
||||
# Check for different element types and process relevant details
|
||||
if isinstance(element, marko.block.Heading) and len(element.children) > 0:
|
||||
if (
|
||||
isinstance(element, marko.block.Heading)
|
||||
or isinstance(element, marko.block.SetextHeading)
|
||||
) and len(element.children) > 0:
|
||||
self._close_table(doc)
|
||||
_log.debug(
|
||||
f" - Heading level {element.level}, content: {element.children[0].children}" # type: ignore
|
||||
|
||||
Reference in New Issue
Block a user