Skip to content

Commit

Permalink
fix: svg search class regex
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagoporto committed Dec 1, 2024
1 parent 846dfe7 commit bc190b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/addClassNames.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export const addClassNames = (
if (!classNamesToAdd || !svgString) {
return svgString
}
const searchClassAttributeRegex = /class="(.*?)"/
const searchClassAttributeRegex = /<svg[^>]+class="(.*?)"/
const extractSVGTagRegex = /(<svg[^>]+)/
const extractSVGUntilClassAttributeRegex = /(<svg[^>]+) class="(.*?)"/

Expand Down

0 comments on commit bc190b0

Please sign in to comment.