From b32df6ecfcd4ce50b68c21fc3d1f551109b5e951 Mon Sep 17 00:00:00 2001 From: Haoming Date: Wed, 1 Jan 2025 19:17:18 +0800 Subject: [PATCH] bug fix --- javascript/prompt_format.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/javascript/prompt_format.js b/javascript/prompt_format.js index 564116e..c9507e3 100644 --- a/javascript/prompt_format.js +++ b/javascript/prompt_format.js @@ -146,7 +146,7 @@ class LeFormatter { if (/^\s+$/.test(part)) return part; - if (!this.#cachedCards.includes(part)) + if (!this.#cachedCards.includes(part.trim())) part = part.replaceAll('_', ' '); return part; @@ -225,8 +225,8 @@ onUiLoaded(() => { for (const excl of ["Artist", "Characters", "Character", "Copyright", "Tags", "Tag", "General"]) paste = paste.replace(excl, ""); - paste = paste.replaceAll("(", "\\("); - paste = paste.replaceAll(")", "\\)"); + paste = paste.replace(/(?