generated from obsidianmd/obsidian-sample-plugin
-
-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Fix searching for unescaped paths via regex
This fixes #1037. It turned out that when creating RegExp objects from strings, TypeScript automatically escapes un-escaped forward slashes (/). But the previous validation code in validateAndConstruct() was wrongly truncating queries at the first unescaped forward slash. By removing that validation, it is now possible to use unescaped paths in regular expressions (providing that they don't have any other unescaped special characters, of course). And if the regular expression does have an error, the user will now get a meaningful error message via the exception thrown by the RegExp constructor. Previous searches where '/' characters are escaped will still work, but this escaping is no longer necessary.
- Loading branch information
1 parent
1302cac
commit 1be22e3
Showing
4 changed files
with
12 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters