From 4ab2f37daf2f5225dc6f858060c83bbd4185e18d Mon Sep 17 00:00:00 2001 From: Evan Jacobs Date: Thu, 12 Oct 2023 11:44:04 -0400 Subject: [PATCH] refactor: unnecessary capture group --- src/toHaveStyleRule.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/toHaveStyleRule.js b/src/toHaveStyleRule.js index a284b51..09ed64e 100644 --- a/src/toHaveStyleRule.js +++ b/src/toHaveStyleRule.js @@ -48,7 +48,7 @@ const getAtRules = (ast, options) => { }; /** stylis v4 renders descendant selectors without a trailing space sometimes which trips up detection */ -const removeSpaceAfterSelector = input => input.replace(/([>~+])( +)/g, '$1') +const removeSpaceAfterSelector = input => input.replace(/([>~+]) +/g, '$1') const normalizeQuotations = (input) => input.replace(/['"]/g, '"');