Skip to content

Commit

Permalink
fixed new line bug
Browse files Browse the repository at this point in the history
Signed-off-by: Matteo-Omenetti <[email protected]>
  • Loading branch information
Matteo-Omenetti authored and Matteo-Omenetti committed Feb 3, 2025
1 parent af6f2b9 commit b280410
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docling_core/types/doc/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ def export_to_document_tokens(
if add_content and self.text is not None:
body += self.text.strip()

body += f"</{self.label.value}>{new_line}"
body += f"</{self.label.value}>\n"

return body

Expand Down Expand Up @@ -686,7 +686,7 @@ def export_to_document_tokens(
if add_content and self.text is not None:
body += f"<_{self.code_language.value}_>{self.text}"

body += f"</{self.label.value}>{new_line}"
body += f"</{self.label.value}>\n"

return body

Expand Down Expand Up @@ -736,7 +736,7 @@ def export_to_document_tokens(
if add_content and self.text is not None:
body += self.text.strip()

body += f"</{self.label.value}_level_{self.level}>{new_line}"
body += f"</{self.label.value}_level_{self.level}>\n"

return body

Expand Down Expand Up @@ -974,7 +974,7 @@ def export_to_document_tokens(
body += f"{DocumentToken.END_CAPTION.value}"
body += f"{new_line}"

body += f"{DocumentToken.END_PICTURE.value}{new_line}"
body += f"{DocumentToken.END_PICTURE.value}\n"

return body

Expand Down Expand Up @@ -1263,7 +1263,7 @@ def export_to_document_tokens(
body += f"{DocumentToken.END_CAPTION.value}"
body += f"{new_line}"

body += f"{DocumentToken.END_OTSL.value}{new_line}"
body += f"{DocumentToken.END_OTSL.value}\n"

return body

Expand Down

0 comments on commit b280410

Please sign in to comment.