mirror of
				https://github.com/SillyTavern/SillyTavern.git
				synced 2025-06-05 21:59:27 +02:00 
			
		
		
		
	Don't replace {{addvar}} macros with the execution result
This commit is contained in:
		| @@ -102,7 +102,8 @@ export function replaceVariableMacros(str) { | |||||||
|     // Replace {{addvar::name::value}} with empty string and add value to the variable value |     // Replace {{addvar::name::value}} with empty string and add value to the variable value | ||||||
|     str = str.replace(/{{addvar::([^:]+)::([^}]+)}}/gi, (_, name, value) => { |     str = str.replace(/{{addvar::([^:]+)::([^}]+)}}/gi, (_, name, value) => { | ||||||
|         name = name.trim(); |         name = name.trim(); | ||||||
|         return addLocalVariable(name, value);; |         addLocalVariable(name, value);; | ||||||
|  |         return ''; | ||||||
|     }); |     }); | ||||||
|  |  | ||||||
|     // Replace {{getglobalvar::name}} with the value of the global variable name |     // Replace {{getglobalvar::name}} with the value of the global variable name | ||||||
| @@ -121,7 +122,8 @@ export function replaceVariableMacros(str) { | |||||||
|     // Replace {{addglobalvar::name::value}} with empty string and add value to the global variable value |     // Replace {{addglobalvar::name::value}} with empty string and add value to the global variable value | ||||||
|     str = str.replace(/{{addglobalvar::([^:]+)::([^}]+)}}/gi, (_, name, value) => { |     str = str.replace(/{{addglobalvar::([^:]+)::([^}]+)}}/gi, (_, name, value) => { | ||||||
|         name = name.trim(); |         name = name.trim(); | ||||||
|         return addGlobalVariable(name, value); |         addGlobalVariable(name, value); | ||||||
|  |         return ''; | ||||||
|     }); |     }); | ||||||
|  |  | ||||||
|     return str; |     return str; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user