Skip to content

Commit

Permalink
markdown placeholder
Browse files Browse the repository at this point in the history
Signed-off-by: Michele Dolfi <[email protected]>
  • Loading branch information
dolfim-ibm committed Jan 31, 2025
1 parent 9563dfe commit 65519b0
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions docling_core/types/doc/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -2227,11 +2227,18 @@ def _append_text(text: str, do_escape_html=True, do_escape_underscores=True):

elif isinstance(item, TextItem) and item.label in [DocItemLabel.FORMULA]:
in_list = False
_append_text(
f"$${item.text}$$\n",
do_escape_underscores=False,
do_escape_html=False,
)
if item.text != "":
_append_text(
f"$${item.text}$$\n",
do_escape_underscores=False,
do_escape_html=False,
)
elif item.orig != "":
_append_text(
"<!-- formula-not-decoded -->\n",
do_escape_underscores=False,
do_escape_html=False,
)

elif isinstance(item, TextItem) and item.label in labels:
in_list = False
Expand Down

0 comments on commit 65519b0

Please sign in to comment.