Repository navigation
Fix case-insensitive value detection - #1563
Merged
Merged
Conversation
Refactor check method to use a regular expression for name matching.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uppercase and mixed-case
image-set()names are skipped before the existing case-insensitive replacement runs. For example, Safari 9 gets no prefixed declaration forbackground-image: IMAGE-SET(url(Logo.PNG) 1x).Cache a non-global case-insensitive name detector, initialized on the first check so subclasses can normalize their names during construction. Keep the existing value boundaries and original spelling. Tests cover the public image-set path, repeated checks, and quoted-name controls.
Validation: 273 unit tests passed with 100% line coverage; lint, declaration checks, and size checks passed.
A small end-to-end comparison used identical lowercase outputs, 30 compilations per sample and three alternating-order rounds. Median time was 163.45 → 154.74 ms for repeated repository fixtures and 49.38 → 50.53 ms for 77 KB of long negative values. The cached check itself remains slower than the original case-sensitive
includeson long negative strings.For 200,000 detector calls (median of five rounds):
includes/iThe existing replacement expression can also match function-like text inside a quoted URL after a space. Newly recognized uppercase text inherits that edge case: a prefixed clone may be produced, while the original URL declaration remains last. The detector change keeps that replacement logic intact.