diff --git a/test_unstructured/partition/html/test_parser.py b/test_unstructured/partition/html/test_parser.py
index 37014f18f3..fe18e38936 100644
--- a/test_unstructured/partition/html/test_parser.py
+++ b/test_unstructured/partition/html/test_parser.py
@@ -1595,6 +1595,15 @@ def it_is_used_for_elements_whose_content_is_not_rendered_as_text(self, html_tex
assert isinstance(div[0], RemovedPhrasing)
assert [e.text for e in div.iter_elements()] == ["Before after."]
+ def and_it_is_used_for_ruby_text_so_it_is_not_glued_to_the_base_text(self):
+ html = (
+ "
首都は東京です。"
+ "漢字
"
+ )
+ p = etree.fromstring(html, html_parser).xpath(".//p")[0]
+
+ assert [e.text for e in p.iter_elements()] == ["首都は東京です。漢字"]
+
def and_it_is_used_for_head_which_is_only_reached_when_there_is_no_body(self):
root = etree.fromstring("Metadata", html_parser)
diff --git a/unstructured/partition/html/parser.py b/unstructured/partition/html/parser.py
index 30c45e836e..9a693ab9bd 100644
--- a/unstructured/partition/html/parser.py
+++ b/unstructured/partition/html/parser.py
@@ -1218,6 +1218,8 @@ def derive_element_type_from_text(text: str) -> type[Text] | None:
"noembed": RemovedPhrasing, # -- obsolete; fallback content for `