docling-core 2.23.2__py3-none-any.whl → 2.23.3__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of docling-core might be problematic. Click here for more details.
- docling_core/experimental/serializer/markdown.py +10 -2
- {docling_core-2.23.2.dist-info → docling_core-2.23.3.dist-info}/METADATA +1 -1
- {docling_core-2.23.2.dist-info → docling_core-2.23.3.dist-info}/RECORD +6 -6
- {docling_core-2.23.2.dist-info → docling_core-2.23.3.dist-info}/LICENSE +0 -0
- {docling_core-2.23.2.dist-info → docling_core-2.23.3.dist-info}/WHEEL +0 -0
- {docling_core-2.23.2.dist-info → docling_core-2.23.3.dist-info}/entry_points.txt +0 -0
|
@@ -310,9 +310,17 @@ class MarkdownListSerializer(BaseModel, BaseListSerializer):
|
|
|
310
310
|
is_inline_scope=is_inline_scope,
|
|
311
311
|
visited=my_visited,
|
|
312
312
|
)
|
|
313
|
+
sep = "\n"
|
|
314
|
+
my_parts: list[SerializationResult] = []
|
|
315
|
+
for p in parts:
|
|
316
|
+
if p.text and p.text[0] == " " and my_parts:
|
|
317
|
+
my_parts[-1].text = sep.join([my_parts[-1].text, p.text]) # update last
|
|
318
|
+
else:
|
|
319
|
+
my_parts.append(p)
|
|
320
|
+
|
|
313
321
|
indent_str = list_level * self.indent * " "
|
|
314
322
|
is_ol = isinstance(item, OrderedList)
|
|
315
|
-
text_res =
|
|
323
|
+
text_res = sep.join(
|
|
316
324
|
[
|
|
317
325
|
# avoid additional marker on already evaled sublists
|
|
318
326
|
(
|
|
@@ -320,7 +328,7 @@ class MarkdownListSerializer(BaseModel, BaseListSerializer):
|
|
|
320
328
|
if c.text and c.text[0] == " "
|
|
321
329
|
else f"{indent_str}{f'{i + 1}.' if is_ol else '-'} {c.text}"
|
|
322
330
|
)
|
|
323
|
-
for i, c in enumerate(
|
|
331
|
+
for i, c in enumerate(my_parts)
|
|
324
332
|
]
|
|
325
333
|
)
|
|
326
334
|
return SerializationResult(text=text_res)
|
|
@@ -5,7 +5,7 @@ docling_core/experimental/__init__.py,sha256=XnAVSUHbA6OFhNSpoYqSD3u83-xVaUaki1D
|
|
|
5
5
|
docling_core/experimental/serializer/__init__.py,sha256=CECQlMoCDUxkg4RAUdC3itA3I3qFhKhe2HcYghN6_xw,105
|
|
6
6
|
docling_core/experimental/serializer/base.py,sha256=3rMQajYerAMMBJpW7dzzmRvGJ9LTdjpu0ucrK75KTVY,5142
|
|
7
7
|
docling_core/experimental/serializer/common.py,sha256=AbIYG2Dh5C2KtAKaqLHfffOFlKa4MYNNxqVjO1rQx8o,11615
|
|
8
|
-
docling_core/experimental/serializer/markdown.py,sha256=
|
|
8
|
+
docling_core/experimental/serializer/markdown.py,sha256=J0enJuW7oGVHs038CSME5KBSaFylrCCh1rdpS6EIfzc,14764
|
|
9
9
|
docling_core/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
10
10
|
docling_core/resources/schemas/doc/ANN.json,sha256=04U5j-PU9m5w7IagJ_rHcAx7qUtLkUuaWZO9GuYHnTA,4202
|
|
11
11
|
docling_core/resources/schemas/doc/DOC.json,sha256=9tVKpCqDGGq3074Nn5qlUCdTN-5k1Q0ri_scJblwnLE,6686
|
|
@@ -62,8 +62,8 @@ docling_core/utils/generate_jsonschema.py,sha256=uNX1O5XnjyB5nA66XqZXTt3YbGuR2ty
|
|
|
62
62
|
docling_core/utils/legacy.py,sha256=SqNQAxl97aHfoJEsC9vZcMJg5FNkmqKPFi-wdSrnfI0,24442
|
|
63
63
|
docling_core/utils/validate.py,sha256=aQ11UbFyl8iD_N7yTTZmm_VVeXz8KcCyn3GLXgkfYRM,2049
|
|
64
64
|
docling_core/utils/validators.py,sha256=azcrndLzhNkTWnbFSu9shJ5D3j_znnLrIFA5R8hzmGU,2798
|
|
65
|
-
docling_core-2.23.
|
|
66
|
-
docling_core-2.23.
|
|
67
|
-
docling_core-2.23.
|
|
68
|
-
docling_core-2.23.
|
|
69
|
-
docling_core-2.23.
|
|
65
|
+
docling_core-2.23.3.dist-info/LICENSE,sha256=2M9-6EoQ1sxFztTOkXGAtwUDJvnWaAHdB9BYWVwGkIw,1087
|
|
66
|
+
docling_core-2.23.3.dist-info/METADATA,sha256=JSY_qNdtZqYS_9pflWQncaxDlisQdzq_DtTiaCTfcWY,5843
|
|
67
|
+
docling_core-2.23.3.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
68
|
+
docling_core-2.23.3.dist-info/entry_points.txt,sha256=oClcdb2L2RKx4jdqUykY16Kum_f0_whwWhGzIodyidc,216
|
|
69
|
+
docling_core-2.23.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|