Closed latesc closed 1 year ago
The proposed solution has a problem with double "/" characters, for example the folder path Folder//{title}
would still pass the test.
I'm pondering using this solution:
const folderPattern = /^([\w\s().]+\/)*\{title\}$/;
That is true, and your solution looks good to me. Appreciate what you're doing with this extension!
Problem
The current
folderPattern
RegEx does not allow for folder names that Obsidian allows, as well as subdirectories in the folder structure. This prevents users from saving clips effectively. The invalid character alert also prompts that using/
is invalid, which doesn't match the pattern.Directories that
folderPattern
currently does not allow:Proposed Solution
Changing the regex to allow all characters except the ones that are disallowed