diff options
author | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2017-08-06 14:56:09 +0200 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2017-08-06 14:56:09 +0200 |
commit | 077c56c00782ff826e46258f678ef0f163f4e3cb (patch) | |
tree | 8bcbb6aa2e835cc742cf19de5e39280b5aa0e326 /askama_derive/src/parser.rs | |
parent | b9cb5b82e6c87bf0f6037d097476d69f5241bf3a (diff) | |
download | askama-077c56c00782ff826e46258f678ef0f163f4e3cb.tar.gz askama-077c56c00782ff826e46258f678ef0f163f4e3cb.tar.bz2 askama-077c56c00782ff826e46258f678ef0f163f4e3cb.zip |
Use one way of finding templates on the path
Diffstat (limited to '')
-rw-r--r-- | askama_derive/src/parser.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/askama_derive/src/parser.rs b/askama_derive/src/parser.rs index ad23cce..767371b 100644 --- a/askama_derive/src/parser.rs +++ b/askama_derive/src/parser.rs @@ -1,5 +1,6 @@ use nom::{self, IResult}; use path; +use std::path::Path; use std::str; #[derive(Debug)] @@ -324,7 +325,7 @@ named!(block_include<Node>, do_parse!( name: ws!(expr_str_lit) >> nws: opt!(tag_s!("-")) >> (Node::Include(WS(pws.is_some(), nws.is_some()), match name { - Expr::StrLit(s) => path::get_template_source(s), + Expr::StrLit(s) => path::get_template_source(Path::new(s)), _ => panic!("include path must be a string literal"), })) )); |