diff --git a/src/renderer/plugins-manager/options.ts b/src/renderer/plugins-manager/options.ts index 3c062ff..edf23f4 100644 --- a/src/renderer/plugins-manager/options.ts +++ b/src/renderer/plugins-manager/options.ts @@ -8,7 +8,7 @@ import useFocus from './clipboardWatch'; function formatReg(regStr) { const flags = regStr.replace(/.*\/([gimy]*)$/, '$1'); - const pattern = flags.replace(new RegExp('^/(.*?)/' + flags + '$'), '$1'); + const pattern = regStr.replace(new RegExp('^/(.*?)/' + flags + '$'), '$1'); return new RegExp(pattern, flags); }