mirror of
https://github.com/askama-rs/askama.git
synced 2025-09-29 22:11:17 +00:00
Prevent jinja macros to move variables
This commit is contained in:
parent
eb419049bf
commit
6be20d5782
@ -687,6 +687,9 @@ impl<'a> Generator<'a> {
|
||||
names.write(arg);
|
||||
|
||||
values.write("(");
|
||||
if !is_copyable(expr) {
|
||||
values.write("&");
|
||||
}
|
||||
values.write(self.visit_expr_root(ctx, expr)?);
|
||||
values.write(")");
|
||||
self.locals.insert_with_default(Cow::Borrowed(arg));
|
||||
|
Loading…
x
Reference in New Issue
Block a user