mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Fixed newlines getting eaten
This commit is contained in:
@ -2400,7 +2400,7 @@ function cleanUpMessage(getMessage, isImpersonate) {
|
|||||||
// trailing invisible whitespace before every newlines, on a multiline string
|
// trailing invisible whitespace before every newlines, on a multiline string
|
||||||
// "trailing whitespace on newlines \nevery line of the string \n?sample text" ->
|
// "trailing whitespace on newlines \nevery line of the string \n?sample text" ->
|
||||||
// "trailing whitespace on newlines\nevery line of the string\nsample text"
|
// "trailing whitespace on newlines\nevery line of the string\nsample text"
|
||||||
getMessage = getMessage.replace(/\s+$/gm, "");
|
getMessage = getMessage.replace(/[^\S\r\n]+$/gm, "");
|
||||||
if (is_pygmalion) {
|
if (is_pygmalion) {
|
||||||
getMessage = getMessage.replace(/<USER>/g, name1);
|
getMessage = getMessage.replace(/<USER>/g, name1);
|
||||||
getMessage = getMessage.replace(/<BOT>/g, name2);
|
getMessage = getMessage.replace(/<BOT>/g, name2);
|
||||||
|
Reference in New Issue
Block a user