Commit Graph
95 Commits
Author SHA1 Message Date
ldm0 4094579d4f perf(markdown): use native traversal for ordinary documents 2026-11-05 03:29:43 +08:00
ldm0 31b24de220 refactor(markdown): traverse live DOM through child iterators 2026-11-05 03:29:43 +08:00
ldm0 03763e803c fix(html2md): retain hidden JSON in preformatted source 2026-11-03 17:07:17 +08:00
lanyue-llk 851e619ee3 fix(renderer): preserve text flow before display blockification 2026-11-03 17:07:17 +08:00
lanyue-llk 164e8aaec9 fix(renderer): omit empty hidden structures and synthetic control defaults 2026-11-03 17:07:17 +08:00
lanyue-llk 0353303786 fix(fetch): retain document structure across live visibility states 2026-11-03 17:07:17 +08:00
lanyue-llk e357277aad fix(fetch): retain nested disclosures and computed text boundaries 2026-11-03 17:07:17 +08:00
lanyue-llk 79dd8e439b test(fetch): distinguish computed layout from source-only table snapshots 2026-11-03 17:07:17 +08:00
lanyue-llk 919029e577 fix(renderer): preserve source and disclosure boundaries in one style pass 2026-11-03 17:07:17 +08:00
lanyue-llk 6b70341184 fix(markdown): read live textarea values through the DOM adapter 2026-11-03 17:07:17 +08:00
ldm0 051096117f fix(html2md): preserve media links inside placeholder anchors 2026-10-28 03:43:27 +07:00
ldm0 be90da04d7 fix(html2md): break CRLF continuity at MathML content 2026-10-28 03:43:27 +07:00
ldm0 6a5532cad7 fix(html2md): preserve outer formatting around block HTML 2026-10-28 03:43:27 +07:00
ldm0 12071f0891 fix(html2md): encode pipes in raw HTML attributes 2026-10-28 03:43:27 +07:00
ldm0 c61633ad1b fix(html2md): normalize line endings in preformatted inline code 2026-10-28 03:43:27 +07:00
ldm0 448008ebc3 fix(html2md): escape generated text in inline HTML code 2026-10-28 03:43:27 +07:00
ldm0 143bc31e26 fix(html2md): preserve strike elements in HTML fallback 2026-10-28 03:43:27 +07:00
ldm0 251871a96c fix(html2md): retain boundaries of expanded block elements 2026-10-28 03:43:27 +07:00
ldm0 0ac41046e6 fix(html2md): preserve table column group structure 2026-10-28 03:43:27 +07:00
ldm0 a53c7dcb9c fix(html2md): retain referenced targets on expanded elements 2026-10-28 03:43:27 +07:00
ldm0 806f2e57a0 fix(html2md): retain author links around block HTML 2026-10-28 03:43:27 +07:00
ldm0 db410b6891 fix(html2md): keep accessible names out of code text 2026-10-28 03:43:27 +07:00
ldm0 47141015cb fix(html2md): replace invalid UTF-8 in fragment decoding
Use replacement characters for invalid UTF-8 after percent decoding while preserving raw-fragment precedence. Keep the valid UTF-8 buffer reuse path and cover incomplete sequences, valid prefixes and literal ID matches.
2026-10-28 03:43:27 +07:00
ldm0 c1af739587 fix(html2md): filter serialized state before fallback dispatch
Apply the existing serialized-state filter before specialized branches, layout wrappers and target output. Cover hidden textarea and MathML payloads while retaining hidden prose, short JSON and overridden display declarations.
2026-10-28 03:43:27 +07:00
ldm0 b34f9c0d21 fix(html2md): align whitespace-only code content across output paths
Distinguish normal text, inline code and pre blocks when counting readable content. Honor preformatted_code for inline code and keep blank pre content consistent with the Markdown writer, including referenced code that switches output paths.
2026-10-28 03:43:27 +07:00
ldm0 47d5bd03ce fix(html2md): inherit link context for inline HTML fallback
Pass the active writer link into inline HTML fallback while keeping block output outside Markdown formatting. Keep audio resources inline inside code so HTML reparsing preserves author links and unique fragment IDs.
2026-10-28 03:43:27 +07:00
ldm0 cf97a288c4 fix(html2md): preserve open state in HTML fallback
Keep authored open attributes on dialogs and details so retained elements preserve their visibility state. Test boolean attribute presence, including empty and false-valued attributes.
2026-10-28 03:43:27 +07:00
ldm0 4fad5289d2 fix(html2md): separate adjacent input values in HTML fallback
Separate synthesized input values from adjacent values and labels in structural HTML output. Reparse paired numeric and labeled fields across all output paths.
2026-10-28 03:43:27 +07:00
ldm0 9f60e2bc7c fix(html2md): preserve skipped section targets in GFM tables
Queue targets for sections and other omitted table elements at the next converted cell. Preserve trailing empty-group targets after the table without enlarging each cell plan.
2026-10-28 03:43:27 +07:00
ldm0 5ad3054ea8 fix(html2md): expand presentational tables in HTML fallback
Use the same presentational-role policy in both renderers. Scope table expansion so nested data tables keep their structure.
2026-10-28 03:43:27 +07:00
ldm0 ec3962e898 perf(html2md): collect fragment targets in linear time
Remove redundant vector scans during target collection and retain global HashSet deduplication. Cover wide MathML target sets and duplicate IDs without a wall-clock threshold.
2026-10-28 03:43:27 +07:00
ldm0 eb0702a226 fix(html2md): retain IDs referenced by table headers
Collect table header IDREFs independently of fragment navigation, and preserve target IDs on header cells. Validate that each headers reference resolves after HTML reparsing, including adapters that report no fragment links.
2026-10-28 03:43:27 +07:00
ldm0 ee89b88014 fix(html2md): distinguish readable content from empty markup
Track readable content independently of tags and fragment targets in both writers. Propagate child content marks through captures and carry HTML content metadata, so empty wrappers do not suppress accessible names.
2026-10-28 03:43:27 +07:00
ldm0 9e44790756 fix(html2md): share structural block boundaries across output paths
Share structural classifications with the HTML fallback so authored blocks retain boundaries. Cover adjacent sections and related semantic blocks, and retain the authored center wrappers in the layout fixture.
2026-10-28 03:43:27 +07:00
ldm0 0bbb76e243 fix(html2md): preserve author links around media in HTML fallback
Track active HTML links and render nested media destinations as text, matching the Markdown path. Cover video, audio and iframe content in body, GFM and HTML table output.
2026-10-28 03:43:27 +07:00
ldm0 510ffe4e32 fix(html2md): keep fragment targets inside author links
Use inline span markers for synthesized fragment targets so a target inside an author link does not create nested anchors. Check link ownership after rendering and reparsing output.
2026-10-28 03:43:27 +07:00
ldm0 92ccda28ba fix(html2md): align HTML fallback with current DOM helpers
Use the current control-value and accessible-name helpers in structural HTML fallback. Preserve MathML wrappers and surrounding whitespace while filtering visual alternatives.

Cover formatted math links with ordinary and nonbreaking spaces in both Markdown and structural HTML output.
2026-10-28 03:43:27 +07:00
lanyue-llk 3bc01b5456 fix(html2md): finalize list spacing and retain code box boundaries 2026-10-28 03:43:27 +07:00
lanyue-llk 2e972a32a7 fix(html2md): preserve source and structural boundary semantics 2026-10-28 03:43:27 +07:00
lanyue-llk e1f0455675 test(fetch): enforce exact CLI output at the owning layer 2026-10-28 03:43:27 +07:00
lanyue-llk 413bf13007 fix(html2md): share structural boundaries and preserve fallback targets 2026-10-28 03:43:27 +07:00
lanyue-llk 9343290ad6 fix(html2md): preserve unique targets and source in HTML fallback 2026-10-28 03:43:27 +07:00
lanyue-llk d87642ff4d fix(html2md): preserve data structure without promoting layout tables 2026-10-28 03:43:27 +07:00
lanyue-llk 0a3b50e7aa fix(html2md): narrow table fallback to effective structural spans 2026-10-28 03:43:27 +07:00
lanyue-llk 5357212d5d fix(html2md): keep code and presentation semantics across output paths 2026-10-28 03:43:27 +07:00
lanyue-llk 321cd36ecf fix(html2md): retain complex tables and referenced fragments 2026-10-28 03:43:27 +07:00
ldm0 300be94372 test: cover MathML and XML escaping edge cases
Cover literal entity text, attribute whitespace, Unicode, and Markdown-sensitive MathML text without changing the fused serialization paths.
2026-10-26 01:15:17 +08:00
ldm0 dcf798e3ee fix(html2md): classify Unicode emphasis boundaries correctly
Use ICU punctuation and symbol categories with an ASCII fast path. Apply the same non-whitespace, non-punctuation rule to both delimiter boundaries and cover combining marks, format characters, symbols, and adjacent links with rendered round trips.
2026-10-26 01:15:17 +08:00
ldm0 be728f9128 fix(html2md): guard math payloads and inline boundaries 2026-10-25 16:35:14 +07:00
ldm0 c1d7a9071b fix(html2md): normalize textual attribute whitespace 2026-10-25 16:35:14 +07:00