mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Clone WI entries before returning them to evaluator
This commit is contained in:
@@ -1501,7 +1501,7 @@ function substituteParams(content, _name1, _name2, _original) {
|
||||
}
|
||||
|
||||
function randomReplace(input, emptyListPlaceholder = '') {
|
||||
const randomPattern = /{{random:([^}]+)}}/g;
|
||||
const randomPattern = /{{random:([^}]+)}}/gi;
|
||||
|
||||
return input.replace(randomPattern, (match, listString) => {
|
||||
const list = listString.split(',').map(item => item.trim()).filter(item => item.length > 0);
|
||||
|
Reference in New Issue
Block a user