diff options
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | askama_escape/Cargo.toml | 16 | ||||
-rw-r--r-- | askama_escape/src/lib.rs (renamed from askama_shared/src/escaping.rs) | 0 | ||||
-rw-r--r-- | askama_shared/Cargo.toml | 1 | ||||
-rw-r--r-- | askama_shared/src/filters/mod.rs | 2 | ||||
-rw-r--r-- | askama_shared/src/lib.rs | 4 |
6 files changed, 21 insertions, 4 deletions
@@ -1,2 +1,2 @@ [workspace] -members = ["askama", "askama_derive", "askama_shared", "testing"] +members = ["askama", "askama_derive", "askama_escape", "askama_shared", "testing"] diff --git a/askama_escape/Cargo.toml b/askama_escape/Cargo.toml new file mode 100644 index 0000000..c6af27d --- /dev/null +++ b/askama_escape/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "askama_escape" +version = "0.1.0" +authors = ["Dirkjan Ochtman <dirkjan@ochtman.nl>"] +description = "Escape function for Askama" +homepage = "https://github.com/djc/askama" +repository = "https://github.com/djc/askama" +license = "MIT/Apache-2.0" +workspace = ".." + +[features] +default = [] +serde-json = [] +iron = [] +rocket = [] +actix-web = [] diff --git a/askama_shared/src/escaping.rs b/askama_escape/src/lib.rs index b967f1f..b967f1f 100644 --- a/askama_shared/src/escaping.rs +++ b/askama_escape/src/lib.rs diff --git a/askama_shared/Cargo.toml b/askama_shared/Cargo.toml index c81ab9f..d2499c0 100644 --- a/askama_shared/Cargo.toml +++ b/askama_shared/Cargo.toml @@ -16,6 +16,7 @@ rocket = [] actix-web = [] [dependencies] +askama_escape = { version = "0.1.0", path = "../askama_escape" } num-traits = "0.2.6" serde = "1.0" serde_derive = "1.0" diff --git a/askama_shared/src/filters/mod.rs b/askama_shared/src/filters/mod.rs index d5c4bd0..35166ff 100644 --- a/askama_shared/src/filters/mod.rs +++ b/askama_shared/src/filters/mod.rs @@ -10,13 +10,13 @@ mod json; #[cfg(feature = "serde-json")] pub use self::json::json; +use askama_escape::MarkupDisplay; use error::Error::Fmt; use num_traits::cast::NumCast; use num_traits::Signed; use std::fmt; use super::Result; -use escaping::MarkupDisplay; // This is used by the code generator to decide whether a named filter is part of // Askama or should refer to a local `filters` module. It should contain all the diff --git a/askama_shared/src/lib.rs b/askama_shared/src/lib.rs index 56b7868..9e2ba6c 100644 --- a/askama_shared/src/lib.rs +++ b/askama_shared/src/lib.rs @@ -1,5 +1,6 @@ #![cfg_attr(feature = "cargo-clippy", allow(unused_parens))] +extern crate askama_escape; extern crate num_traits; extern crate serde; #[macro_use] @@ -13,10 +14,9 @@ use std::fs; use std::path::{Path, PathBuf}; mod error; -mod escaping; +pub use askama_escape::MarkupDisplay; pub use error::{Error, Result}; -pub use escaping::MarkupDisplay; use std::collections::BTreeMap; |