From ded459304ef8b10ce3469883235cd06126a2dd12 Mon Sep 17 00:00:00 2001 From: dakkar Date: Mon, 15 Jul 2024 16:33:10 +0100 Subject: [PATCH] preserve `ti-fw` classes for icons - fixes #580 I thought that `ti-fw` was mostly useless, but it turns out that: - it affects the alignment of icons in many places - it's set separately in some places (e.g. `packages/frontend/src/ui/_common_/navbar.ts` has ``) so we have to keep it around. --- packages/frontend/vite.replaceIcons.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/frontend/vite.replaceIcons.ts b/packages/frontend/vite.replaceIcons.ts index 3212c9a38a..494a327477 100644 --- a/packages/frontend/vite.replaceIcons.ts +++ b/packages/frontend/vite.replaceIcons.ts @@ -5,10 +5,9 @@ function iconsReplace(opts: RollupReplaceOptions) { return pluginReplace({ ...opts, preventAssignment: false, - // only replace these strings at the start of strings, remove a - // `ti-fw` it if happens to be just after, and make sure they're - // followed by a word-boundary that's not a dash - delimiters: ['(?<=["\'`])', '(?: ti-fw)?\\b(?!-)'], + // only replace these strings at the start of strings, and make + // sure they're followed by a word-boundary that's not a dash + delimiters: ['(?<=["\'`])', '\\b(?!-)'], }); }