Skip to content

Commit

Permalink
fix mypy parsing
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 16bc35f commit dd70bc8
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions docling_core/types/doc/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -2508,15 +2508,10 @@ def _prepare_text(
html_texts.append(text)

elif isinstance(item, CodeItem):
text = (
"<pre><code>"
f"{_prepare_text(
item.text,
do_escape_html=False,
do_replace_newline=False
)}"
"</code></pre>"
code_text = _prepare_text(
item.text, do_escape_html=False, do_replace_newline=False
)
text = f"<pre><code>{code_text}</code></pre>"
html_texts.append(text.strip())

elif isinstance(item, TextItem):
Expand Down

0 comments on commit dd70bc8

Please sign in to comment.