Skip to content

Commit

Permalink
Remove commented code
Browse files Browse the repository at this point in the history
Signed-off-by: Christoph Auer <[email protected]>
  • Loading branch information
cau-git committed Feb 5, 2025
1 parent 4d8eab9 commit c034353
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions docling_core/types/doc/document.py
Original file line number Diff line number Diff line change
Expand Up @@ -2497,8 +2497,6 @@ def _prepare_tag_content(

elif isinstance(item, TextItem) and item.label in [DocItemLabel.TITLE]:
text_inner = _prepare_tag_content(item.text)
# dir = get_text_direction(item.text)
# text = f'<h1 dir="{dir}">{text_inner}</h1>'
text = get_html_tag_with_text_direction(html_tag="h1", text=text_inner)

html_texts.append(text)
Expand All @@ -2507,14 +2505,6 @@ def _prepare_tag_content(

section_level: int = min(item.level + 1, 6)

"""
dir = get_text_direction(item.text)
text = (
f'<h{(section_level)} dir="{dir}">'
f"{_prepare_tag_content(item.text)}</h{(section_level)}>"
)
"""
text = get_html_tag_with_text_direction(
html_tag=f"h{section_level}", text=item.text
)
Expand Down Expand Up @@ -2580,16 +2570,12 @@ def _image_fallback(item: TextItem):
)

elif isinstance(item, ListItem):
# dir = get_text_direction(item.text)
# text = f'<li dir="{dir}">{_prepare_tag_content(item.text)}</li>'
text = get_html_tag_with_text_direction(
html_tag="li", text=_prepare_tag_content(item.text)
)
html_texts.append(text)

elif isinstance(item, TextItem) and item.label in [DocItemLabel.LIST_ITEM]:
# dir = get_text_direction(item.text)
# text = f'<li dir="{dir}">{_prepare_tag_content(item.text)}</li>'
text = get_html_tag_with_text_direction(
html_tag="li", text=_prepare_tag_content(item.text)
)
Expand All @@ -2603,8 +2589,6 @@ def _image_fallback(item: TextItem):
html_texts.append(text)

elif isinstance(item, TextItem):
# dir = get_text_direction(item.text)
# text = f'<p dir="{dir}">{_prepare_tag_content(item.text)}</p>'

text = get_html_tag_with_text_direction(
html_tag="p", text=_prepare_tag_content(item.text)
Expand Down

0 comments on commit c034353

Please sign in to comment.