Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add HTMLImage class #2702

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
5 changes: 5 additions & 0 deletions unstructured/documents/html.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
Table,
Text,
Title,
Image,
)
from unstructured.documents.xml import VALID_PARSERS, XMLDocument
from unstructured.logger import logger
Expand Down Expand Up @@ -104,6 +105,10 @@ class HTMLTable(TagsMixin, Table):
"""NarrativeText with tag information"""


class HTMLImage(TagsMixin, Image):
"""Image with tag information"""


def has_table_ancestor(element: TagsMixin) -> bool:
"""Checks to see if an element has ancestors that are table elements. If so, we consider
it to be a table element rather than a section of narrative text."""
Expand Down