Clone WI entries before returning them to evaluator

This commit is contained in:
Cohee
2023-07-05 20:46:30 +03:00
parent 3c64c46daf
commit 935a3d6c35
3 changed files with 8 additions and 3 deletions

View File

@@ -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);