aboutsummaryrefslogtreecommitdiffstats
path: root/askama_shared
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-09-05 20:39:42 +0200
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-09-05 20:39:42 +0200
commitd6cc51efa0fc7528813f662f1d3db1756d7f6734 (patch)
treeb80c46d88de08cc0f308bda18e016409b348bcdb /askama_shared
parent4154f4ebf33f1cf90ca8b93798baca26813b08d0 (diff)
downloadaskama-d6cc51efa0fc7528813f662f1d3db1756d7f6734.tar.gz
askama-d6cc51efa0fc7528813f662f1d3db1756d7f6734.tar.bz2
askama-d6cc51efa0fc7528813f662f1d3db1756d7f6734.zip
Allow includes to use relative paths
Diffstat (limited to 'askama_shared')
-rw-r--r--askama_shared/src/generator.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/askama_shared/src/generator.rs b/askama_shared/src/generator.rs
index d8b3a42..f2e35ed 100644
--- a/askama_shared/src/generator.rs
+++ b/askama_shared/src/generator.rs
@@ -495,7 +495,7 @@ impl<'a> Generator<'a> {
fn handle_include(&mut self, state: &'a State, ws: &WS, path: &str) {
self.prepare_ws(ws);
- let path = path::find_template_from_path(&path, None);
+ let path = path::find_template_from_path(&path, Some(&state.input.path));
let src = path::get_template_source(&path);
let nodes = parser::parse(&src);
let nested = {