Skip to content

Commit 2abaf9b

Browse files
authored
feat: add inline groups, revamp Markdown export incl. list groups (#156)
* feat: add inline groups, update markdown export Signed-off-by: Panos Vagenas <[email protected]> * rename parameter for clarity Signed-off-by: Panos Vagenas <[email protected]> * drop redundant `traverse_inline`, use only `visited` Signed-off-by: Panos Vagenas <[email protected]> * update API usage after rebase Signed-off-by: Panos Vagenas <[email protected]> * minor refactor Signed-off-by: Panos Vagenas <[email protected]> * extend nesting logic to list groups Signed-off-by: Panos Vagenas <[email protected]> * (MD export) add inline formulas, placeholders for `KeyValueItem`, `FormItem` Signed-off-by: Panos Vagenas <[email protected]> * include 3rd-level list item in test Signed-off-by: Panos Vagenas <[email protected]> * update test file with more recent conversion result Signed-off-by: Panos Vagenas <[email protected]> * update list construction pattern so that sublists are added to actual ListItems Signed-off-by: Panos Vagenas <[email protected]> --------- Signed-off-by: Panos Vagenas <[email protected]> Signed-off-by: Panos Vagenas <[email protected]>
1 parent 4708f93 commit 2abaf9b

33 files changed

+18195
-3449
lines changed

docling_core/types/doc/document.py

Lines changed: 164 additions & 100 deletions
Large diffs are not rendered by default.

docling_core/types/doc/labels.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ class GroupLabel(str, Enum):
7575
FORM_AREA = "form_area"
7676
KEY_VALUE_AREA = "key_value_area"
7777
COMMENT_SECTION = "comment_section"
78+
INLINE = "inline"
7879

7980
def __str__(self):
8081
"""Get string value."""

docs/DoclingDocument.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,8 @@
655655
"slide",
656656
"form_area",
657657
"key_value_area",
658-
"comment_section"
658+
"comment_section",
659+
"inline"
659660
],
660661
"title": "GroupLabel",
661662
"type": "string"
@@ -1765,7 +1766,7 @@
17651766
"type": "string"
17661767
},
17671768
"version": {
1768-
"default": "1.1.0",
1769+
"default": "1.2.0",
17691770
"pattern": "^(?P<major>0|[1-9]\\d*)\\.(?P<minor>0|[1-9]\\d*)\\.(?P<patch>0|[1-9]\\d*)(?:-(?P<prerelease>(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+(?P<buildmetadata>[0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$",
17701771
"title": "Version",
17711772
"type": "string"

0 commit comments

Comments
 (0)