You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(html): <br/> element breaks paragraph/document-element #3227
A <br/> element within a block item (e.g. <div>, <p>, etc. causes the element to be closed and a new one started, mid-paragraph.
According to the HTML Standard, a <br/> element is a phrasing (inline) element and indicates a line-break but does not divide the current block item in two.
To Reproduce
fromunstructured.partition.htmlimportpartition_htmlfromunstructured.staging.baseimportelements_to_jsonhtml_text="""<p> Too old to begin<br/> training of young Skywalker.<br/> But teach him, I must.</p>"""elements=partition_html(text=html_text)
print(f"{elements_to_json(elements, indent=2)}")
Expected:
[
{
"element_id": "44c358a19a9d7b9a1c3c9ac999b5bf93",
"metadata": {
"filetype": "text/html",
"languages": ["eng"]
},
"text": "Too old to begin training of young Skywalker. But teach him, I must.",
"type": "NarrativeText"
}
]
Activity
rfctr(html): replace html parser (#3218)