Skip to content

Commit

Permalink
Don't use digits in regex
Browse files Browse the repository at this point in the history
  • Loading branch information
tannerlinsley committed Aug 31, 2015
1 parent 9dee9d6 commit 4a7753e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion color-string.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function getRgba(string) {
hex = /^#([a-fA-F0-9]{6})$/,
rgba = /^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/,
per = /^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/,
keyword = /(\D+)/;
keyword = /(\w+)/;

var rgb = [0, 0, 0],
a = 1,
Expand Down

0 comments on commit 4a7753e

Please sign in to comment.