From 7885f19e865ec51b4bc4fc292cdf5f7e3b0e8907 Mon Sep 17 00:00:00 2001 From: Deciare <1689220+deciare@users.noreply.github.com> Date: Tue, 27 Feb 2024 05:11:35 -0500 Subject: [PATCH] Perform macro substitution while updating message. This addresses 3 issues: 1. Prompt bias string was not removed from the text of the edited message. 2. Macro substitition was not performed in the prompt bias string. 3. Macro substitution was not performed in the edited message text. --- public/script.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/public/script.js b/public/script.js index a133db8da..ca82b5195 100644 --- a/public/script.js +++ b/public/script.js @@ -5967,7 +5967,11 @@ function updateMessage(div) { text = text.trim(); } - const bias = extractMessageBias(text); + const bias = substituteParams(extractMessageBias(text)); + text = substituteParams(text); + if (bias) { + text = removeMacros(text); + } mes['mes'] = text; if (mes['swipe_id'] !== undefined) { mes['swipes'][mes['swipe_id']] = text;