2createStudio / postcss-sprites

Generate sprites from stylesheets.
MIT License
413 stars 50 forks source link

Fix 'getImageUrl' function #78

Closed koppthe closed 7 years ago

koppthe commented 7 years ago

Fix the problem that can not extracts the correct url of image from compressed CSS rule.

If there is another brackets after background rule, the getImageUrl function can't extract the correct url of image.

Input:

.share-container .plane{width:75px;height:75px;background-image:url("../img/other/plane.png");background-repeat:no-repeat;-webkit-transform:scale(0.5);transform:scale(0.5);}

Output:

"../img/other/plane.png);background-repeat:no-repeat;-webkit-transform:scale(0.5);transform:scale(0.5"

Expect:

"../img/other/plane.png"