mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-16 19:57:52 +01:00
editor: fix search-replace regex
This commit is contained in:
committed by
Abdullah Atta
parent
eb35d41321
commit
fc10e957fb
@@ -85,7 +85,7 @@ const regex = (s: string, settings: SearchSettings): RegExp => {
|
||||
console.log(boundary);
|
||||
return RegExp(
|
||||
boundary +
|
||||
(enableRegex ? s : s.replace(/[-/\\^$*+?.()|[\]{}]/g, "\\$&")) +
|
||||
(enableRegex ? s : s.replace(/[/\\^$*+?.()|[\]]/g, "\\$&")) +
|
||||
boundary,
|
||||
matchCase ? "gu" : "gui"
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user