mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
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
This commit is contained in:
@ -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`);
|
||||
|
Reference in New Issue
Block a user