aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar bott <mhpoin@gmail.com>2018-11-07 13:53:30 +0100
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2018-11-07 17:58:13 +0100
commit8224f06f3e900443ee42d75cba30d4b9f5f6fd95 (patch)
treeaf553e6d8c6c434ea96cf33e75369693593a9e8e
parent2e028ed903169c27748e3c717ea5b1311950a615 (diff)
downloadaskama-8224f06f3e900443ee42d75cba30d4b9f5f6fd95.tar.gz
askama-8224f06f3e900443ee42d75cba30d4b9f5f6fd95.tar.bz2
askama-8224f06f3e900443ee42d75cba30d4b9f5f6fd95.zip
Create askama_escape crate
Diffstat (limited to '')
-rw-r--r--Cargo.toml2
-rw-r--r--askama_escape/Cargo.toml16
-rw-r--r--askama_escape/src/lib.rs (renamed from askama_shared/src/escaping.rs)0
-rw-r--r--askama_shared/Cargo.toml1
-rw-r--r--askama_shared/src/filters/mod.rs2
-rw-r--r--askama_shared/src/lib.rs4
6 files changed, 21 insertions, 4 deletions
diff --git a/Cargo.toml b/Cargo.toml
index cce1ee3..286fd1e 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -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;