mirror of
https://github.com/askama-rs/askama.git
synced 2025-10-02 07:20:55 +00:00
Add comment about subtleties of code generation for includes
This commit is contained in:
parent
fdd90a4e1c
commit
9d8e55b24d
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user