diff --git a/src/templates/getAstroCode.ts b/src/templates/getAstroCode.ts index 869782b..a4b0ed0 100644 --- a/src/templates/getAstroCode.ts +++ b/src/templates/getAstroCode.ts @@ -2,12 +2,12 @@ interface AstroComponentParams { svgContent: string; } -export function getAstroCode({ svgContent }: AstroComponentParams): string { - const cleanedSvg = svgContent +export function getAstroCode(params: AstroComponentParams): string { + const cleanedSvg = params.svgContent .replace(/\s*(width|height)="[^"]*"/gi, "") .replace(/\s*(width|height)='[^']*'/gi, "") .replace(/\s*(width|height)=\{[^}]*\}/gi, "") - .replace(/]*)>/i, (match, attrs) => { + .replace(/]*)>/i, (_, attrs) => { const cleanedAttrs = attrs.replace(/\s*\{?\.\.\.Astro\.props\}?\s*/i, ""); return ``; });