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

fix(utils): not match correctly when setting with a decimal

This commit is contained in:
chenglu 2023-12-28 15:41:21 +08:00
parent f39b0806c1
commit 5907633e5b

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(