Fix CSS service @import hoisting for long Google Fonts URLs with semicolons#109
Merged
Conversation
bcb7ae1 to
2e1656c
Compare
2e1656c to
557ef6d
Compare
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.
Fixes a CSS concat edge case where long
@importURLs (for example Google Fonts URLs containing semicolons inwghtvalues) were split at the first;during service-side import hoisting.The regex-based hoisting logic in
service.phphas been replaced with parser-style handling that finds the true end of each@importrule while respecting quoted strings, comments, andurl(...)parentheses.This preserves full import URLs and prevents broken concatenated CSS output.
Includes regression coverage in
tests/test_css_service_imports.php:test_service_preserves_long_google_fonts_import_with_semicolonstest_service_does_not_false_positive_import_substring_in_url_pathtest_service_hoists_import_without_whitespace_after_keywordImplemented a character level parser with Codex-5.3 and 5.2 pro.