kriswallsmith / assetic

Asset Management for PHP
MIT License
3.75k stars 559 forks source link

Problem in comment regex match #758

Open oradwell opened 8 years ago

oradwell commented 8 years ago
@import "sprites/*.png";

/* some comment */
.this-class {
    background-color: #666;
}

Assetic\Util\CssUtils::filterCommentless() returns:

@import "sprites
.this-class {
    background-color: #666;
}

Assetic\Util\CssUtils::filterCommentless() should ignore comment start (/*) if it is inside a string

dhopkalo commented 8 years ago

Original regex: https://regex101.com/r/wV0aB8/6

Fixed: https://regex101.com/r/yU7rT3/5

pls review