1
0
mirror of https://github.com/hakimel/reveal.js.git synced 2025-05-31 16:39:36 +02:00

Merge pull request #3618 from wainuiomata/regex-redundant-escape

Fix escape before comma in regex is redundant
This commit is contained in:
Hakim El Hattab 2024-05-15 10:30:23 +02:00 committed by GitHub
commit 15d9b650a5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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 ),