diff options
author | bott <mhpoin@gmail.com> | 2018-10-05 05:51:22 +0200 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2018-10-05 15:55:14 +0200 |
commit | 4bd302c68817fc78ff31594b1175a3b67cece171 (patch) | |
tree | f85361f6dc3d3045576aaae9efaacd0daed2a228 /askama_derive/src/generator.rs | |
parent | af880b3f202d3b94a7a38ec9a8503d3a18d924e6 (diff) | |
download | askama-4bd302c68817fc78ff31594b1175a3b67cece171.tar.gz askama-4bd302c68817fc78ff31594b1175a3b67cece171.tar.bz2 askama-4bd302c68817fc78ff31594b1175a3b67cece171.zip |
Add changing delimiters support
Diffstat (limited to '')
-rw-r--r-- | askama_derive/src/generator.rs | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs index 2a233d5..33fbe4c 100644 --- a/askama_derive/src/generator.rs +++ b/askama_derive/src/generator.rs @@ -1,6 +1,6 @@ use super::{get_template_source, Context, Heritage}; use input::TemplateInput; -use parser::{self, Cond, Expr, MatchParameter, MatchVariant, Node, Target, When, WS}; +use parser::{Cond, Expr, MatchParameter, MatchVariant, Node, Target, When, WS}; use shared::filters; use proc_macro2::Span; @@ -13,6 +13,8 @@ use std::{cmp, hash, str}; use syn; +use parser::parse; + pub(crate) fn generate( input: &TemplateInput, contexts: &HashMap<&PathBuf, Context>, @@ -482,7 +484,7 @@ impl<'a> Generator<'a> { .config .find_template(path, Some(&self.input.path)); let src = get_template_source(&path); - let nodes = parser::parse(&src); + let nodes = parse(&src, self.input.syntax); { // Since nodes must not outlive the Generator, we instantiate // a nested Generator here to handle the include's nodes. |