Regex for URLs does not handle comma after url()
frankszymanski opened this issue · comments
frankszymanski commented
The spec for the cursor CSS property (https://developer.mozilla.org/en-US/docs/Web/CSS/cursor) has examples where a url is followed by a comma. For example:
.baz {
cursor: url(hyper.cur), auto;
}
The regex appears to need to be updated to include a comma in the final grouping:
url\s*\(\s*(?!["']?data:)(.+?)\)(?=\s+(?!\))|;|})
to
url\s*\(\s*(?!["']?data:)(.+?)\)(?=\s+(?!\))|;|}|,)
Joscha Feth commented
Sounds good, could you create a PR with a test, please?
frankszymanski commented
PR Opened.
Joscha Feth commented
closed via 79da79d