From b1ed8590ebd898567623d4f4a08b81ed8bda0d65 Mon Sep 17 00:00:00 2001 From: Christoph Auer Date: Tue, 22 Oct 2024 13:02:41 +0200 Subject: [PATCH] Fix indentation spaces on markdown lists Signed-off-by: Christoph Auer --- docling_core/types/doc/document.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docling_core/types/doc/document.py b/docling_core/types/doc/document.py index 44a12c6..0f06058 100644 --- a/docling_core/types/doc/document.py +++ b/docling_core/types/doc/document.py @@ -1222,7 +1222,7 @@ def export_to_markdown( # noqa: C901 elif isinstance(item, ListItem) and item.label in [DocItemLabel.LIST_ITEM]: in_list = True # Calculate indent based on list_nesting_level - indent = " " * ( + indent = " " * ( list_nesting_level - 1 ) # -1 because level 1 needs no indent