mirror of
https://github.com/hectorqin/reader.git
synced 2026-11-11 13:31:09 +08:00
Novels saved from a site keep the page's <div>, <br/> and in the TXT. Escaped, the tags were drawn as text and the chapter ran together as one paragraph. cleanTextMarkup turns block tags into line breaks, drops inline tags, decodes common entities and treats whitespace-only lines as blank, before paragraphs and the chapter heading are inferred. Only real tag names match; other markup is still escaped as text. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>