-
-
Notifications
You must be signed in to change notification settings - Fork 7.7k
Fix modulePreloadLinkRE to match non-self-closing link tags #21303
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: sapphi-red <[email protected]>
Co-authored-by: sapphi-red <[email protected]>
|
@copilot use |
Co-authored-by: sapphi-red <[email protected]>
Done! I've updated the test to use
Changes in commit 789ad73. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
The
modulePreloadLinkREregex only matched self-closing<link rel="modulepreload" />tags, failing on valid HTML without the trailing slash:This broke importmap ordering validation in production builds where bundlers often emit non-self-closing tags.
Changes
[\s\S]*?\/>to[^>]*>to match both<link ...>and<link ... />formatsplayground/html/importmapOrder.htmlto include a non-self-closing modulepreload link for testing the regex fixThe fix also resolves the
regexp/optimal-quantifier-concatenationESLint warning by removing the redundant\/?quantifier.Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.