Stop hidden-element stripping from eating legitimate content

Diagnostic logging on a real 60KB marketing email showed the
display:none/visibility:hidden matcher was stripping 71% of the HTML
(59266 -> 16769 chars) -- that CSS is also used for dark-mode overrides,
hidden preheader tricks, and mobile/desktop alternate layouts, not just
tiny accessibility labels, and it was nuking those large legitimate blocks
too. Now only treated as a throwaway a11y label when the matched element is
short (<=300 chars); anything longer is left alone. Also removes the
temporary stage-length/parsed-shape debug logging used to diagnose this.
Psalm 25 17committed parent 8ff14d8af91d8431eeda1b66f09597d414d81833d0705a5Browse files
1 file changed+10−2

Rendering diff…