Merge pull request #3618 from wainuiomata/regex-redundant-escape
Fix escape before comma in regex is redundant
This commit is contained in:
commit
15d9b650a5
1 changed files with 1 additions and 1 deletions
|
|
@ -44,7 +44,7 @@ export const colorToRgb = ( color ) => {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
let rgba = color.match( /^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\,\s*([\d]+|[\d]*.[\d]+)\s*\)$/i );
|
let rgba = color.match( /^rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*([\d]+|[\d]*.[\d]+)\s*\)$/i );
|
||||||
if( rgba ) {
|
if( rgba ) {
|
||||||
return {
|
return {
|
||||||
r: parseInt( rgba[1], 10 ),
|
r: parseInt( rgba[1], 10 ),
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue