mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-19 21:50:39 +01:00
Fix trailing stopping strings removal
This commit is contained in:
parent
bb9d302c3a
commit
6b348f6128
@ -4399,7 +4399,7 @@ function cleanUpMessage(getMessage, isImpersonate, isContinue, displayIncomplete
|
||||
|
||||
for (const stoppingString of stoppingStrings) {
|
||||
if (stoppingString.length) {
|
||||
for (let j = stoppingString.length - 1; j > 0; j--) {
|
||||
for (let j = stoppingString.length; j > 0; j--) {
|
||||
if (getMessage.slice(-j) === stoppingString.slice(0, j)) {
|
||||
getMessage = getMessage.slice(0, -j);
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user