From e802da10758b3ca56151e0e22ce1088c9248dd7a Mon Sep 17 00:00:00 2001 From: Waleed Date: Thu, 9 Jul 2026 13:31:16 -0700 Subject: [PATCH] feat(rich-markdown-editor): round-trip gate, VSCode/style paste, highlight, block reorder (#5539) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * fix(rich-markdown-editor): tighten read-only gate for uppercase entities and orphan ref-defs Two silent-corruption cases the idempotency probe can't see: - The HTML-entity safe-list used a case-insensitive regex, so `&`/`<`/`>` were treated as the round-trippable canonical entities and let through as editable, but the serializer only round-trips the lowercase forms and mangles the uppercase ones. Make the safe-list case-sensitive. - An unused link/image reference definition (`[x]: url` with no `[x]` reference) is dropped entirely on serialize, a deletion the idempotency probe misses. Detect orphan definitions and open read-only; used definitions still inline losslessly and stay editable. The use check tolerates bracket-internal padding (`[ x ]`), and GFM footnote definitions (`[^id]: …`) are excluded since they round-trip verbatim. * feat(rich-markdown-editor): VSCode code paste and strip
a
' + const cleaned = transformHtml(editor, gsheets) + expect(cleaned).not.toContain('