merge: preserve ti-fw classes for icons - fixes #580 (!575)

View MR for information: https://activitypub.software/TransFem-org/Sharkey/-/merge_requests/575

Closes #580

Approved-by: Marie <marie@kaifa.ch>
Approved-by: Tess K <me@thvxl.se>
This commit is contained in:
dakkar 2024-07-24 15:52:11 +00:00
commit c344705d67

View File

@ -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(?!-)'],
});
}