diff --git a/public/scripts/extensions/regex/engine.js b/public/scripts/extensions/regex/engine.js index 08de07d6a..f6e22d249 100644 --- a/public/scripts/extensions/regex/engine.js +++ b/public/scripts/extensions/regex/engine.js @@ -95,7 +95,7 @@ function getRegexedString(rawString, placement, { characterOverride, isMarkdown, // Script applies to Generate and input is Generate (script.promptOnly && isPrompt) || // Script applies to all cases when neither "only"s are true, but there's no need to do it when `isMarkdown`, the as source (chat history) should already be changed beforehand - (!script.markdownOnly && !script.promptOnly && !isMarkdown) + (!script.markdownOnly && !script.promptOnly && !isMarkdown && !isPrompt) ) { if (isEdit && !script.runOnEdit) { console.debug(`getRegexedString: Skipping script ${script.scriptName} because it does not run on edit`); diff --git a/public/scripts/extensions/regex/index.js b/public/scripts/extensions/regex/index.js index 73538e4ed..8ac6ae6d6 100644 --- a/public/scripts/extensions/regex/index.js +++ b/public/scripts/extensions/regex/index.js @@ -18,7 +18,7 @@ import { t } from '../../i18n.js'; * @property {string} replaceString - The replace string * @property {string[]} trimStrings - The trim strings * @property {string?} findRegex - The find regex - * @property {string?} substituteRegex - The substitute regex + * @property {number?} substituteRegex - The substitute regex */ /**