diff options
Diffstat (limited to '')
-rw-r--r-- | askama_derive/src/input.rs | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/askama_derive/src/input.rs b/askama_derive/src/input.rs index 45da7f0..ee9b942 100644 --- a/askama_derive/src/input.rs +++ b/askama_derive/src/input.rs @@ -153,13 +153,13 @@ impl TemplateInput<'_> { #[derive(Debug, Default)] pub(crate) struct TemplateArgs { - pub(crate) source: Option<Source>, - pub(crate) print: Print, - pub(crate) escaping: Option<String>, - pub(crate) ext: Option<String>, - pub(crate) syntax: Option<String>, - pub(crate) config: String, - pub(crate) whitespace: Option<String>, + source: Option<Source>, + print: Print, + escaping: Option<String>, + ext: Option<String>, + syntax: Option<String>, + config: String, + whitespace: Option<String>, } impl TemplateArgs { @@ -275,6 +275,10 @@ impl TemplateArgs { Ok(args) } + + pub(crate) fn config(&self) -> Result<Config<'_>, CompileError> { + Config::new(&self.config, self.whitespace.as_ref()) + } } #[inline] |