From cdaf7ea35d98b6c2a4d11d57b60abf6c3ff5ccc2 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Mon, 18 Mar 2019 10:06:01 +0100 Subject: Create heritage for extends-only templates (fixes #224) --- askama_derive/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'askama_derive') diff --git a/askama_derive/src/lib.rs b/askama_derive/src/lib.rs index cf5ead9..2c02cb5 100644 --- a/askama_derive/src/lib.rs +++ b/askama_derive/src/lib.rs @@ -54,7 +54,7 @@ fn build_template(ast: &syn::DeriveInput) -> String { } let ctx = &contexts[&input.path]; - let heritage = if !ctx.blocks.is_empty() { + let heritage = if !ctx.blocks.is_empty() || ctx.extends.is_some() { Some(Heritage::new(ctx, &contexts)) } else { None -- cgit