From 008fa3e10e1c1c555c28c1777e9abd3c18d9c78a Mon Sep 17 00:00:00 2001
From: WOLIKIMCHENG <35391914+WOLIKIMCHENG@users.noreply.github.com>
Date: Fri, 24 Jul 2026 16:10:10 +0800
Subject: [PATCH] fix(parser): preserve loose body text in HTMLParser (#17290)
---
internal/parser/parser/html_parser.go | 51 ++++++----
.../parser/parser/parse_with_result_test.go | 95 ++++++++++++++++++-
2 files changed, 124 insertions(+), 22 deletions(-)
diff --git a/internal/parser/parser/html_parser.go b/internal/parser/parser/html_parser.go
index a6c831bdc2..f613528a70 100644
--- a/internal/parser/parser/html_parser.go
+++ b/internal/parser/parser/html_parser.go
@@ -103,11 +103,17 @@ func (p *HTMLParser) ParseWithResult(ctx context.Context, filename string, data
// walkHTMLBlocks emits one normalized item per block-level
// descendant of root. Inline elements (b, i, a, span, …) are
-// collapsed into the parent's text via leafText.
+
+
+Tail text
+