Skip to content

Commit

Permalink
Merge pull request #184 from qidian99/master
Browse files Browse the repository at this point in the history
Fix regex match error
  • Loading branch information
muwoo authored Jun 12, 2024
2 parents c3bc0bd + 472879f commit e128d01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/renderer/plugins-manager/options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit e128d01

Please sign in to comment.