aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--askama/src/lib.rs12
-rw-r--r--askama_derive/src/generator.rs2
-rw-r--r--askama_shared/src/lib.rs9
-rw-r--r--testing/tests/rust_macro.rs2
4 files changed, 15 insertions, 10 deletions
diff --git a/askama/src/lib.rs b/askama/src/lib.rs
index 44da388..0c0ff83 100644
--- a/askama/src/lib.rs
+++ b/askama/src/lib.rs
@@ -99,12 +99,12 @@
//!
//! The following keys can currently be used to customize template syntax:
//!
-//! * `block_start`
-//! * `block_end`
-//! * `comment_start`
-//! * `comment_end`
-//! * `expr_start`
-//! * `expr_end`
+//! * `block_start`, defaults to `{%`
+//! * `block_end`, defaults to `%}`
+//! * `comment_start`, defaults to `{#`
+//! * `comment_end`, defaults to `#}`
+//! * `expr_start`, defaults to `{{`
+//! * `expr_end`, defaults to `}}`
//!
//! Values must be 2 characters long and start delimiters must all start with the same
//! character. If a key is omitted, the value from the default syntax is used.
diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs
index 41e1647..2c9fddb 100644
--- a/askama_derive/src/generator.rs
+++ b/askama_derive/src/generator.rs
@@ -644,7 +644,7 @@ impl<'a> Generator<'a> {
Expr::Group(ref inner) => self.visit_group(buf, inner),
Expr::MethodCall(ref obj, method, ref args) => {
self.visit_method_call(buf, obj, method, args)
- },
+ }
Expr::RustMacro(name, ref args) => self.visit_rust_macro(buf, name, args),
}
}
diff --git a/askama_shared/src/lib.rs b/askama_shared/src/lib.rs
index 92b5d28..56b7868 100644
--- a/askama_shared/src/lib.rs
+++ b/askama_shared/src/lib.rs
@@ -41,8 +41,13 @@ impl<'a> Config<'a> {
toml::from_str(&s).expect(&format!("invalid TOML in {}", CONFIG_FILE_NAME));
let (dirs, default_syntax) = match raw.general {
- Some(General { dirs, default_syntax }) => (
- dirs.map_or(default_dirs, |v| v.into_iter().map(|dir| root.join(dir)).collect()),
+ Some(General {
+ dirs,
+ default_syntax,
+ }) => (
+ dirs.map_or(default_dirs, |v| {
+ v.into_iter().map(|dir| root.join(dir)).collect()
+ }),
default_syntax.unwrap_or(DEFAULT_SYNTAX_NAME),
),
None => (default_dirs, DEFAULT_SYNTAX_NAME),
diff --git a/testing/tests/rust_macro.rs b/testing/tests/rust_macro.rs
index a9924db..90f1f3e 100644
--- a/testing/tests/rust_macro.rs
+++ b/testing/tests/rust_macro.rs
@@ -6,7 +6,7 @@ use askama::Template;
macro_rules! hello {
() => {
"world"
- }
+ };
}
#[derive(Template)]