Skip to content

Commit

Permalink
Merge pull request #3618 from wainuiomata/regex-redundant-escape
Browse files Browse the repository at this point in the history
Fix escape before comma in regex is redundant
  • Loading branch information
hakimel committed May 15, 2024
2 parents 6b8c64f + 2d273bf commit 15d9b65
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/utils/color.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
return {
r: parseInt( rgba[1], 10 ),
Expand Down

0 comments on commit 15d9b65

Please sign in to comment.