Commit 1ccaeea
fix: harden compressStyle and drop double compression
compressStyle assumed any fragment containing # ended in six hex
digits: shorter customCSS values panicked on the negative slice and
non-colour uses of # could be silently mangled. It now only
compresses a # followed by exactly six trailing characters. Also,
styleCache.get ran compressStyle twice on the default inline-style
path (!classes and compress both true); compress once if either
applies.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent b359e38 commit 1ccaeea
1 file changed
Lines changed: 4 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
629 | 629 | | |
630 | 630 | | |
631 | 631 | | |
632 | | - | |
633 | | - | |
| 632 | + | |
| 633 | + | |
634 | 634 | | |
635 | | - | |
| 635 | + | |
636 | 636 | | |
637 | 637 | | |
638 | 638 | | |
| |||
681 | 681 | | |
682 | 682 | | |
683 | 683 | | |
684 | | - | |
685 | | - | |
686 | | - | |
687 | | - | |
688 | | - | |
689 | | - | |
| 684 | + | |
690 | 685 | | |
691 | 686 | | |
692 | 687 | | |
| |||
0 commit comments