mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-13 08:28:22 +08:00
fix(deepdoc): parse bodyless HTML fragments (#16423)
This commit is contained in:
@@ -140,3 +140,11 @@ def test_small_blocks_are_merged_unchanged():
|
||||
|
||||
assert "Alpha Beta" in "".join(chunks)
|
||||
assert "Gamma" in "".join(chunks)
|
||||
|
||||
|
||||
def test_parser_txt_extracts_bodyless_html_fragment():
|
||||
chunks = RAGFlowHtmlParser.parser_txt("<h1>Title</h1><p>Fragment text</p>", chunk_token_num=512)
|
||||
|
||||
joined = "\n".join(chunks)
|
||||
assert "# Title" in joined
|
||||
assert "Fragment text" in joined
|
||||
|
||||
Reference in New Issue
Block a user