diff --git a/src/plugins/_api/badges/index.tsx b/src/plugins/_api/badges/index.tsx index 354eae6d1..8169aaaae 100644 --- a/src/plugins/_api/badges/index.tsx +++ b/src/plugins/_api/badges/index.tsx @@ -146,7 +146,7 @@ export default definePlugin({ replace: "...$1.props,$&" }, { - match: /(?<="aria-label":(\i)\.description,.{0,200})children:/, + match: /(?<="aria-label":(\i)\.description,.{0,200}?)children:/g, replace: "children:$1.component?$self.renderBadgeComponent({...$1}) :" }, // handle onClick and onContextMenu diff --git a/src/plugins/fakeNitro/index.tsx b/src/plugins/fakeNitro/index.tsx index 345ae0273..2c567c1ed 100644 --- a/src/plugins/fakeNitro/index.tsx +++ b/src/plugins/fakeNitro/index.tsx @@ -301,7 +301,7 @@ export default definePlugin({ { // Patch the rendered message content to add fake nitro emojis or remove sticker links predicate: () => settings.store.transformEmojis || settings.store.transformStickers, - match: /(?=return\{hasSpoilerEmbeds:\i,content:(\i))/, + match: /(?=return{hasSpoilerEmbeds:\i,content:(\i))/, replace: (_, content) => `${content}=$self.patchFakeNitroEmojisOrRemoveStickersLinks(${content},arguments[2]?.formatInline);` } ]