spatie / laravel-mix-purgecss

Zero-config Purgecss for Laravel Mix
https://spatie.be/en/opensource
MIT License
874 stars 38 forks source link

PurgeCSS breaks on BEM like class names #38

Closed wiljanslofstra closed 6 years ago

wiljanslofstra commented 6 years ago

Since version 2.2.2 PurgeCSS breaks my CSS. In projects I frequently use BEM like classnames:

navigation__item

Before 2.2.2 everything worked correctly, but in 2.2.2 this broke. This issue is probably in the Regex change:

[A-z0-9-:/]+

Test case: regexr.com/3tbmg

matched my class correctly, but this one doesn't:

[a-zA-Z0-9-:/]+

Test case: regexr.com/3tbmj

Probably because A-z also matches underscores?

cjmaxik commented 6 years ago

https://github.com/spatie/laravel-mix-purgecss/pull/37

freekmurze commented 6 years ago

We'll continue this in #37