diff options
author | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2018-10-08 09:49:24 +0200 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2018-10-08 09:49:24 +0200 |
commit | a6a36343e9ffad6fe0001e68e689664997d805b3 (patch) | |
tree | 41d2c519c9c7bca86fa0399c95dce5916c441fde | |
parent | 833983ffe1420d4db1409c5c9ad224911eafef77 (diff) | |
download | askama-a6a36343e9ffad6fe0001e68e689664997d805b3.tar.gz askama-a6a36343e9ffad6fe0001e68e689664997d805b3.tar.bz2 askama-a6a36343e9ffad6fe0001e68e689664997d805b3.zip |
Tweak custom syntax documentation some more
-rw-r--r-- | askama/src/lib.rs | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/askama/src/lib.rs b/askama/src/lib.rs index c5cb962..44da388 100644 --- a/askama/src/lib.rs +++ b/askama/src/lib.rs @@ -64,8 +64,7 @@ //! At compile time, Askama will read optional configuration values from //! `askama.toml` in the crate root (the directory where `Cargo.toml` can //! be found). Currently, this covers the directories to search for templates, -//! as well as the of customization syntax. -//! +//! as well as custom syntax configuration. //! //! This example file demonstrates the default configuration: //! @@ -75,12 +74,10 @@ //! dirs = ["templates"] //! ``` //! -//! Syntax consists of at least the attribute `name` which uniquely names -//! this syntax in the project. -//! -//! This example file demonstrate a personalized syntax configuration "foo": +//! Here is an example that defines two custom syntaxes: //! //! ```toml +//! [general] //! default_syntax = "foo" //! //! [[syntax]] @@ -97,9 +94,19 @@ //! expr_start = "%{" //! ``` //! -//! The following keys can currently be used to customize template syntax: `block_start`, -//! `block_end`, `comment_start`, `comment_end`, `expr_start` and `expr_end`; Must be -//! exactly 2 characters long and start delimiters must all start or end with the same +//! A syntax block consists of at least the attribute `name` which uniquely +//! names this syntax in the project. +//! +//! The following keys can currently be used to customize template syntax: +//! +//! * `block_start` +//! * `block_end` +//! * `comment_start` +//! * `comment_end` +//! * `expr_start` +//! * `expr_end` +//! +//! 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. //! //! ## Variables |