We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 587e67f commit 26f639dCopy full SHA for 26f639d
docling_core/experimental/serializer/common.py
@@ -70,9 +70,11 @@ def create_ser_result(
70
else:
71
results: list[SerializationResult] = span_source
72
spans = []
73
+ span_ids: set[str] = set()
74
for ser_res in results:
75
for span in ser_res.spans:
- if span not in spans:
76
+ if (span_id := span.item.self_ref) not in span_ids:
77
+ span_ids.add(span_id)
78
spans.append(span)
79
return SerializationResult(
80
text=text,
0 commit comments