Update kolibri-zip with support for css import statements, fix browser compatibility#14085
Merged
rtibbles merged 2 commits intolearningequality:release-v0.19.xfrom Feb 10, 2026
Merged
Conversation
The cssPathRegex was using a lookbehind assertion which is not supported in Safari <16.4 and older JavaScript engines. This change adds a feature detection at module load and provides both modern and legacy implementations that produce identical results. The legacy regex uses alternation to handle quoted and unquoted URLs separately, with proper escape sequence handling for quoted strings. Both implementations are exported via _internal for testing, and tests now run against both versions using jest.each.
Contributor
Build Artifacts
|
LianaHarris360
approved these changes
Feb 10, 2026
Member
LianaHarris360
left a comment
There was a problem hiding this comment.
Logic looks correct and passing tests cover the behavior, approving!
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.
Summary
References
No open issue, noticed in the process of working on #12805 and browser compatibility testing
Reviewer guidance
I think the test coverage here is sufficient to give assurance, but testing H5Ps on older desktop Safari versions should show the improvement. See the regex look behind caniuse for candidates: https://caniuse.com/js-regexp-lookbehind
Firefox 77 or Safari 16.3 should be old enough!