Skip to content

Commit

Permalink
Reduce acceptable characters in keyword matching regex
Browse files Browse the repository at this point in the history
  • Loading branch information
benmccann authored and Qix- committed Nov 26, 2021
1 parent 6ec8800 commit 09cba37
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ cs.get.rgb = function (string) {
var hex = /^#([a-f0-9]{6})([a-f0-9]{2})?$/i;
var rgba = /^rgba?\(\s*([+-]?\d+)\s*,?\s*([+-]?\d+)\s*,?\s*([+-]?\d+)\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/;
var per = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*,?\s*([+-]?[\d\.]+)\%\s*(?:[,|\/]\s*([+-]?[\d\.]+)(%?)\s*)?\)$/;
var keyword = /(\D+)/;
var keyword = /(\w+)/;

var rgb = [0, 0, 0, 1];
var match;
Expand Down

0 comments on commit 09cba37

Please sign in to comment.