Skip to content

Commit

Permalink
make default text operation smoother
Browse files Browse the repository at this point in the history
  • Loading branch information
kyleclo committed Mar 14, 2024
1 parent d1c6fb5 commit 78e11b7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions papermage/magelib/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -171,10 +171,10 @@ def text(self) -> str:
return maybe_text
# return derived from symbols
if self.symbols_from_spans:
return " ".join(self.symbols_from_spans)
return " ".join(self.symbols_from_spans).replace("\n", " ")
# return derived from boxes and tokens
if self.symbols_from_boxes:
return " ".join(self.symbols_from_boxes)
return " ".join(self.symbols_from_boxes).replace("\n", " ")
return ""

@text.setter
Expand Down

0 comments on commit 78e11b7

Please sign in to comment.