diff --git a/packages/utils/src/loader/utils.ts b/packages/utils/src/loader/utils.ts index 3cb1c47..7a42194 100644 --- a/packages/utils/src/loader/utils.ts +++ b/packages/utils/src/loader/utils.ts @@ -3,6 +3,7 @@ import type { IconifyLoaderOptions } from './types'; const svgWidthRegex = /width\s*=\s*["'](\w+)["']/; const svgHeightRegex = /height\s*=\s*["'](\w+)["']/; +const svgTagRegex = / p != null); if (propsToAdd.length) { - svg = svg.replace(' { test('FileSystemIconLoader with transform', async () => { const result = await FileSystemIconLoader(fixturesDir, (icon) => { - return icon.replace(' -1).toBeTruthy(); expect(result && result.indexOf('height="1em"') > -1).toBeTruthy(); diff --git a/packages/utils/tests/fixtures/circle.svg b/packages/utils/tests/fixtures/circle.svg index e4e7959..991f43b 100644 --- a/packages/utils/tests/fixtures/circle.svg +++ b/packages/utils/tests/fixtures/circle.svg @@ -1 +1,6 @@ - + + + diff --git a/packages/utils/tests/get-custom-icon-test.ts b/packages/utils/tests/get-custom-icon-test.ts index 697a1bb..8e4a686 100644 --- a/packages/utils/tests/get-custom-icon-test.ts +++ b/packages/utils/tests/get-custom-icon-test.ts @@ -61,7 +61,7 @@ describe('Testing getCustomIcon', () => { }, transform(svg) { return svg.replace( - ' { customizations: { transform(svg) { return svg.replace( - '