1
0
mirror of https://github.com/hakimel/reveal.js.git synced 2025-08-06 14:47:04 +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

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