Skip to content
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

The regular expression matching in the urlAsRegex() function seems different from the old version, is bug ? #138

Open
2 tasks
jimhug034 opened this issue May 5, 2023 · 0 comments

Comments

@jimhug034
Copy link

Use case: description, code

3.x version:

 function urlAsRegex(urlValue) {
    return new RegExp(`(url\\(['"]?)(${util.escape(urlValue)})(['"]?\\))`, 'g')
}

2.x version

function urlAsRegex(urlValue) {
 return new RegExp(`(url\\([\'"]?)(${util.escape(urlValue)})([\'"]?\\))`, 'g');
 }
  • Chrome 49+
  • Firefox 45+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant