ie8linter icon indicating copy to clipboard operation
ie8linter copied to clipboard

More sophisticated regEx

Open davidhund opened this issue 9 years ago • 2 comments

I noticed was that your regular expressions are very naive: e.g. it picked up the following rule:

.some-rule {
    background: #fff url('../img/bg_creme.png') repeat-x 0 0;
}

and —because the regEx simply matches rem in the property value— warned about using REM.

One (still simplistic) way to improve this specific regex would be to check for /\drem/.

This would probably go for most other tests...

davidhund avatar Feb 08 '15 13:02 davidhund

right, that's true.

If you have some spare time and want to submit a Pull Request, it is very straight forward to edit the regex. There is a hash of them here: https://github.com/israelidanny/ie8linter/blob/master/specs/unsupported-css.js

otherwise I'll probably do it over the course of the weeek.

etodanik avatar Feb 08 '15 13:02 etodanik

Yup, I'll see what I can do.

davidhund avatar Feb 08 '15 13:02 davidhund