Skip to main content

max / pter

Clarify entity decoding happens in parser, not handle_text Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Author: Max Johnson <me@maxj.phd> · 2026-06-16 17:36 UTC
Commit: b4b621fb0315be14c0ea26580aa838afbedb1979
Parent: 225ea73
1 file changed, +1 insertion, -1 deletion
@@ -10,7 +10,7 @@ pter converts HTML email bodies into readable markdown. It takes an HTML string
10 10 html: &str
11 11 → scraper::Html::parse_document() # html5ever DOM tree
12 12 → walk_children(root) # depth-first traversal
13 - → handle_text() # whitespace collapsing, entity decoding
13 + → handle_text() # whitespace collapsing (entities pre-decoded by parser)
14 14 → handle_element() # classify → skip / transparent / block / inline
15 15 → handle_block() # paragraphs, headings, lists, blockquotes, pre, hr
16 16 → handle_inline() # bold, italic, links, images, code, br