From f6b8044b1b3da0ff5259f7e66b6cec57f2659d50 Mon Sep 17 00:00:00 2001 From: Palloxin <75091899+Palloxin@users.noreply.github.com> Date: Sat, 14 Nov 2026 12:48:25 +0100 Subject: [PATCH] Faster regexes --- src/lib/fonts.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/fonts.js b/src/lib/fonts.js index af2aec1ad1..82fe22fed9 100644 --- a/src/lib/fonts.js +++ b/src/lib/fonts.js @@ -280,7 +280,7 @@ async function loadFont(name) { } // Get all URL font references - const urls = [...css.matchAll(/url\((.*?)\)/g)].map((match) => match[1]); + const urls = [...css.matchAll(/\burl\(([^)]*)\)/g)].map((match) => match[1]); // Download and replace URLs for (const url of urls) {