mirror of
https://github.com/askama-rs/askama.git
synced 2025-10-01 06:51:15 +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);
|
names.write(arg);
|
||||||
|
|
||||||
values.write("(");
|
values.write("(");
|
||||||
|
if !is_copyable(expr) {
|
||||||
|
values.write("&");
|
||||||
|
}
|
||||||
values.write(self.visit_expr_root(ctx, expr)?);
|
values.write(self.visit_expr_root(ctx, expr)?);
|
||||||
values.write(")");
|
values.write(")");
|
||||||
self.locals.insert_with_default(Cow::Borrowed(arg));
|
self.locals.insert_with_default(Cow::Borrowed(arg));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user