cardio icon indicating copy to clipboard operation
cardio copied to clipboard

Color matching is to broad

Open Munter opened this issue 12 years ago • 1 comments

123 will be reported as a color because one.colors parser accepts css shorthand also without a prefixed #. This leads to false positives when using numbers to describe font sizes.

We should probably have a css property whitelist of properties that can contain colors and only run the parser on tokens in these values. Or simply require a #-prefix before a hex shorthand color for it to be a positive match.

Munter avatar Jan 31 '13 10:01 Munter

Attempted a fix in 89175d1. I know it isn't bulletproof, but I think it'll do the trick for now.

papandreou avatar Jan 31 '13 16:01 papandreou