mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Conserve ending newlines in story string template
This commit is contained in:
@ -1638,6 +1638,15 @@ function scrollChatToBottom() {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Substitutes {{macro}} parameters in a string.
|
||||
* @param {string} content - The string to substitute parameters in.
|
||||
* @param {*} _name1 - The name of the user. Uses global name1 if not provided.
|
||||
* @param {*} _name2 - The name of the character. Uses global name2 if not provided.
|
||||
* @param {*} _original - The original message for {{original}} substitution.
|
||||
* @param {*} _group - The group members list for {{group}} substitution.
|
||||
* @returns {string} The string with substituted parameters.
|
||||
*/
|
||||
function substituteParams(content, _name1, _name2, _original, _group) {
|
||||
_name1 = _name1 ?? name1;
|
||||
_name2 = _name2 ?? name2;
|
||||
|
Reference in New Issue
Block a user