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

Css Property regular expression is missing { #5

Closed
ezraroi opened this issue Sep 10, 2014 · 2 comments
Closed

Css Property regular expression is missing { #5

ezraroi opened this issue Sep 10, 2014 · 2 comments

Comments

@ezraroi
Copy link
Contributor

ezraroi commented Sep 10, 2014

If the css property is the first one in the block, e.g:
.test {background-image:url(_____)}

The regular expression will miss it as it is expecting ';' or white space at the beginning.

I fixed it by adding {

var cssPropertyMatcher = /[;\s{]?[a-zA-Z-]+\s_:\s_url(\s_['"]?[^'")\s]+['"]?\s_)[^;}]/g;

@mdedetrich
Copy link

Just to let you know, there is still a corner case where this regex fails, have created a pull request based off @ezraroi to fix this problem here #8

@callumlocke any chance in finally getting this stuff merged?

@callumlocke
Copy link
Owner

fixed after a huge delay, sorry

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

3 participants