2
0
mirror of https://github.com/iconify/iconify.git synced 2024-09-19 08:49:02 +00:00

Merge pull request #269 from chenglu4343/fix-sizeMatchError

fix(utils): not match correctly when setting with a decimal
This commit is contained in:
Vjacheslav Trushkin 2023-12-28 10:08:21 +02:00 committed by GitHub
commit 1ed4fab53f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2,8 +2,8 @@ import type { Awaitable } from '@antfu/utils';
import { isUnsetKeyword } from '../svg/build';
import type { IconifyLoaderOptions } from './types';
const svgWidthRegex = /\swidth\s*=\s*["'](\w+)["']/;
const svgHeightRegex = /\sheight\s*=\s*["'](\w+)["']/;
const svgWidthRegex = /\swidth\s*=\s*["']([\w.]+)["']/;
const svgHeightRegex = /\sheight\s*=\s*["']([\w.]+)["']/;
const svgTagRegex = /<svg\s+/;
function configureSvgSize(