Regex: fix "Alter Outgoing Prompt" applying when unchecked (#3380) * Regex: rework ephemerality options. * Fix ephemeral regex being executed when unwanted * Revert to old code style

a6a7810be2cb3bb7db4dca5a16fdac65e518e97d

Cohee <18619528+Cohee1207@users.noreply.github.com>

Signed
2 files changed, +2 -2Ignore whitespace
public/scripts/extensions/regex/engine.js+1 -1
@@ -95,7 +95,7 @@ function getRegexedString(rawString, placement, { characterOverride, isMarkdown,
9595 // Script applies to Generate and input is Generate
9696 (script.promptOnly && isPrompt) ||
9797 // 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
9898 (!script.markdownOnly && !script.promptOnly && !isMarkdown && !isPrompt)
9999 ) {
100100 if (isEdit && !script.runOnEdit) {
101101 console.debug(`getRegexedString: Skipping script ${script.scriptName} because it does not run on edit`);
public/scripts/extensions/regex/index.js+1 -1
@@ -18,7 +18,7 @@ import { t } from '../../i18n.js';
1818 * @property {string} replaceString - The replace string
1919 * @property {string[]} trimStrings - The trim strings
2020 * @property {string?} findRegex - The find regex
2121 * @property {stringnumber?} substituteRegex - The substitute regex
2222 */
2323
2424/**