-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Description
Hey! I've been using this for my project postcss-colorblind and I have a slight problem.
If you use the regex test on a URL that has an anchor link that is also a valid hex, the test method would return true.
Example:
var hex = require('hex-color-regex');
hex().test('url(http://www.example.com/index.html#f06d06)'); // returns true
The obvious fix for this is to use ^
and $
. Would it make sense to take in a config object and have a strict
parameter that adds ^
and $
? If not, I'm content to fork this and use my own version. Otherwise, I'm also happy to work up a pull request if it useful.
Metadata
Metadata
Assignees
Labels
No labels