From 03b1c31083e905b4abc9d4ffa4f62bccaeed1889 Mon Sep 17 00:00:00 2001 From: acalcutt Date: Fri, 10 Jan 2025 15:27:24 -0500 Subject: [PATCH] fix regex error --- src/utils.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils.js b/src/utils.js index aa1e691..5dab80a 100644 --- a/src/utils.js +++ b/src/utils.js @@ -260,7 +260,7 @@ export function readFile(filename) { */ async function getFontPbf(allowedFonts, fontPath, name, range, fallbacks) { if (!allowedFonts || (allowedFonts[name] && fallbacks)) { - const fontMatch = name?.match(/^[\p{L}\p{N} \-\.~!*\'()@&=+,#$\[\]]+$/u); + const fontMatch = name?.match(/^[\p{L}\p{N} \-\.~!*'()@&=+,#$\[\]]+$/u); const sanitizedName = fontMatch?.[0] || 'invalid'; if (!name || typeof name !== 'string' || name.trim() === '' || !fontMatch) { console.error(