Skip to content

Commit

Permalink
cr
Browse files Browse the repository at this point in the history
  • Loading branch information
mi5q committed Jan 29, 2024
1 parent e377dc2 commit 9ac9dcb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/styleSheetSerializer.js
Expand Up @@ -99,7 +99,7 @@ const getClassNamesFromSelectorsByHashes = (classNames, hashes) => {
const replaceClassNames = (result, classNames, style, classNameFormatter) =>
classNames
.filter((className) => style.includes(className))
.reduce((acc, className, index) => acc.replace(new RegExp(className, 'g'), classNameFormatter(index++)), result);
.reduce((acc, className, index) => acc.replace(new RegExp(className, 'g'), '', result);

const stripUnreferencedClassNames = (result, classNames) =>
classNames.reduce((acc, className) => acc.replace(new RegExp(`${className}\\s?`, 'g'), ''), result);
Expand Down

0 comments on commit 9ac9dcb

Please sign in to comment.