diff options
Diffstat (limited to 'askama_derive')
-rw-r--r-- | askama_derive/src/generator.rs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs index 24370fa..2f6c875 100644 --- a/askama_derive/src/generator.rs +++ b/askama_derive/src/generator.rs @@ -537,6 +537,8 @@ impl<'a> Generator<'a> { let src = get_template_source(&path); let nodes = parser::parse(&src); { + // Since nodes must not outlive the Generator, we instantiate + // a nested Generator here to handle the include's nodes. let mut gen = self.child(); gen.handle(ctx, &nodes, buf, AstLevel::Nested); } |