mirror of
https://github.com/Unstructured-IO/unstructured.git
synced 2025-08-18 13:45:45 +00:00

Closes #2362. Previously, when an HTML contained a `div` with a nested tag e.g. a `<b>` or `<span>`, the element created from the `div` contained only the text up to the inline element. This PR adds support for extracting text from tag tails in HTML. ### Testing ``` html_text = """ <html> <body> <div> the Company issues shares at $<div style="display:inline;"><span>5.22</span></div> per share. There is more text </div> </body> </html> """ elements = partition_html(text=html_text) print(''.join([str(el).strip() for el in elements])) ``` **Expected behavior** ``` the Company issues shares at $5.22per share. There is more text ```