Skip to content

Commit

Permalink
fix: backward compatible add_text() (#132)
Browse files Browse the repository at this point in the history
Signed-off-by: Michele Dolfi <[email protected]>
  • Loading branch information
dolfim-ibm authored Jan 21, 2025
1 parent 3e4bf7b commit 7e45817
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docling_core/types/doc/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -1515,6 +1515,9 @@ def add_text(
elif label in [DocItemLabel.SECTION_HEADER]:
return self.add_heading(text=text, orig=orig, prov=prov, parent=parent)

elif label in [DocItemLabel.CODE]:
return self.add_code(text=text, orig=orig, prov=prov, parent=parent)

else:

if not parent:
Expand Down

0 comments on commit 7e45817

Please sign in to comment.