From a90be8d8da2b95f38a55569e95521096bd774141 Mon Sep 17 00:00:00 2001 From: Zyie <24736175+Zyie@users.noreply.github.com> Date: Tue, 22 Oct 2024 09:34:01 +0100 Subject: [PATCH] fix: font family including tags --- packages/assetpack/src/webfont/webfont.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/assetpack/src/webfont/webfont.ts b/packages/assetpack/src/webfont/webfont.ts index 4ed2471..92af36c 100644 --- a/packages/assetpack/src/webfont/webfont.ts +++ b/packages/assetpack/src/webfont/webfont.ts @@ -1,4 +1,4 @@ -import { checkExt, createNewAssetAt, path } from '../core/index.js'; +import { checkExt, createNewAssetAt, path, stripTags } from '../core/index.js'; import { fonts } from './fonts.js'; import type { Asset, AssetPipe } from '../core/index.js'; @@ -44,7 +44,7 @@ export function webfont(): AssetPipe newAsset.buffer = buffer; // set the family name to the filename if it doesn't exist - asset.metaData.family ??= path.trimExt(asset.filename); + asset.metaData.family ??= stripTags(path.trimExt(asset.filename)); return [newAsset]; }