From 472879f9b23ead44b435c0660b28c0d8a7d1d4a1 Mon Sep 17 00:00:00 2001 From: Dian Qi Date: Sun, 4 Jun 2023 20:30:03 +0800 Subject: [PATCH] Fix format regex error that will match all inputs --- src/renderer/plugins-manager/options.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/plugins-manager/options.ts b/src/renderer/plugins-manager/options.ts index aeb361d..535d4ff 100644 --- a/src/renderer/plugins-manager/options.ts +++ b/src/renderer/plugins-manager/options.ts @@ -6,7 +6,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); }