From 9a95a3c52c2ef3633d03871bd9318d2f088da7ac Mon Sep 17 00:00:00 2001 From: PJ Date: Tue, 19 Sep 2023 01:43:26 -0400 Subject: [PATCH] Update pattern for new /v rules See https://2ality.com/2022/11/regexp-v-flag.html#which-characters-must-be-escaped-inside-%2Fv-character-classes%3F and https://bugs.chromium.org/p/chromium/issues/detail?id=1412729 for background. --- src/renaming.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renaming.js b/src/renaming.js index 3d57916..bc16f88 100644 --- a/src/renaming.js +++ b/src/renaming.js @@ -64,7 +64,7 @@ async function promptForNewName(tagName, newName=tagName) { return await new Prompt() .setTitle(`Renaming #${tagName} (and any sub-tags)`) .setContent("Enter new name (must be a valid Obsidian tag name):\n") - .setPattern("[^\u2000-\u206F\u2E00-\u2E7F'!\"#$%&()*+,.:;<=>?@^`{|}~\\[\\]\\\\\\s]+") + .setPattern("[^\u2000-\u206F\u2E00-\u2E7F'!\"#$%&\\(\\)*+,.:;<=>?@^`\\{\\|\\}~\\[\\]\\\\\\s]+") .onInvalidEntry(t => new Notice(`"${t}" is not a valid Obsidian tag name`)) .setValue(newName) .prompt()