mirror of
https://github.com/askama-rs/askama.git
synced 2025-09-28 13:30:59 +00:00
Merge pull request #321 from Kijewski/pr-ext-askama
derive: add ".askama" to list of HTML extensions
This commit is contained in:
commit
836046a8c5
@ -369,7 +369,7 @@ static DEFAULT_SYNTAX_NAME: &str = "default";
|
||||
static DEFAULT_ESCAPERS: &[(&[&str], &str)] = &[
|
||||
(
|
||||
&[
|
||||
"html", "htm", "j2", "jinja", "jinja2", "rinja", "svg", "xml",
|
||||
"askama", "html", "htm", "j2", "jinja", "jinja2", "rinja", "svg", "xml",
|
||||
],
|
||||
"Html",
|
||||
),
|
||||
@ -649,7 +649,7 @@ mod tests {
|
||||
(str_set(&["js"]), "::my_filters::Js".into()),
|
||||
(
|
||||
str_set(&[
|
||||
"html", "htm", "j2", "jinja", "jinja2", "rinja", "svg", "xml"
|
||||
"askama", "html", "htm", "j2", "jinja", "jinja2", "rinja", "svg", "xml"
|
||||
]),
|
||||
"rinja::filters::Html".into()
|
||||
),
|
||||
|
@ -865,7 +865,7 @@ const _: () = {
|
||||
};
|
||||
|
||||
#[cfg(feature = "code-in-doc")]
|
||||
const JINJA_EXTENSIONS: &[&str] = &["j2", "jinja", "jinja2", "rinja"];
|
||||
const JINJA_EXTENSIONS: &[&str] = &["askama", "j2", "jinja", "jinja2", "rinja"];
|
||||
|
||||
#[test]
|
||||
fn get_source() {
|
||||
|
@ -1,4 +1,4 @@
|
||||
error: invalid escaper 'latex' for `escape` filter. The available extensions are: "", "htm", "html", "j2", "jinja", "jinja2", "md", "none", "rinja", "svg", "txt", "xml", "yml"
|
||||
error: invalid escaper 'latex' for `escape` filter. The available extensions are: "", "askama", "htm", "html", "j2", "jinja", "jinja2", "md", "none", "rinja", "svg", "txt", "xml", "yml"
|
||||
--> LocalEscaper.html:1:38
|
||||
"text|escape(\"latex\")}}`."
|
||||
--> tests/ui/no-such-escaper.rs:6:14
|
||||
@ -6,13 +6,13 @@ error: invalid escaper 'latex' for `escape` filter. The available extensions are
|
||||
6 | source = r#"In LaTeX you write `{{text}}` like `{{text|escape("latex")}}`."#,
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
||||
error: no escaper defined for extension 'tex'. You can define an escaper in the config file (named `rinja.toml` by default). The available extensions are: "", "htm", "html", "j2", "jinja", "jinja2", "md", "none", "rinja", "svg", "txt", "xml", "yml"
|
||||
error: no escaper defined for extension 'tex'. You can define an escaper in the config file (named `rinja.toml` by default). The available extensions are: "", "askama", "htm", "html", "j2", "jinja", "jinja2", "md", "none", "rinja", "svg", "txt", "xml", "yml"
|
||||
--> tests/ui/no-such-escaper.rs:14:11
|
||||
|
|
||||
14 | ext = "tex",
|
||||
| ^^^^^
|
||||
|
||||
error: no escaper defined for extension 'tex'. You can define an escaper in the config file (named `rinja.toml` by default). The available extensions are: "", "htm", "html", "j2", "jinja", "jinja2", "md", "none", "rinja", "svg", "txt", "xml", "yml"
|
||||
error: no escaper defined for extension 'tex'. You can define an escaper in the config file (named `rinja.toml` by default). The available extensions are: "", "askama", "htm", "html", "j2", "jinja", "jinja2", "md", "none", "rinja", "svg", "txt", "xml", "yml"
|
||||
--> tests/ui/no-such-escaper.rs:22:19
|
||||
|
|
||||
22 | #[template(path = "latex-file.tex")]
|
||||
|
Loading…
x
Reference in New Issue
Block a user