mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2024-12-12 17:36:22 +01:00
Merge pull request #2475 from SillyTavern/fix-trim-macro
Fix trim macro breaking on CRLF
This commit is contained in:
commit
03c9e3f168
@ -437,7 +437,7 @@ export function evaluateMacros(content, env) {
|
|||||||
content = replaceInstructMacros(content, env);
|
content = replaceInstructMacros(content, env);
|
||||||
content = replaceVariableMacros(content);
|
content = replaceVariableMacros(content);
|
||||||
content = content.replace(/{{newline}}/gi, '\n');
|
content = content.replace(/{{newline}}/gi, '\n');
|
||||||
content = content.replace(/\n*{{trim}}\n*/gi, '');
|
content = content.replace(/(?:\r?\n)*{{trim}}(?:\r?\n)*/gi, '');
|
||||||
content = content.replace(/{{noop}}/gi, '');
|
content = content.replace(/{{noop}}/gi, '');
|
||||||
content = content.replace(/{{input}}/gi, () => String($('#send_textarea').val()));
|
content = content.replace(/{{input}}/gi, () => String($('#send_textarea').val()));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user