mirror of
https://github.com/askama-rs/askama.git
synced 2025-09-29 22:11:17 +00:00
derive: add ".askama" to list of HTML extensions
This commit is contained in:
parent
cae09c50f4
commit
94288391b3
@ -369,7 +369,7 @@ static DEFAULT_SYNTAX_NAME: &str = "default";
|
|||||||
static DEFAULT_ESCAPERS: &[(&[&str], &str)] = &[
|
static DEFAULT_ESCAPERS: &[(&[&str], &str)] = &[
|
||||||
(
|
(
|
||||||
&[
|
&[
|
||||||
"html", "htm", "j2", "jinja", "jinja2", "rinja", "svg", "xml",
|
"askama", "html", "htm", "j2", "jinja", "jinja2", "rinja", "svg", "xml",
|
||||||
],
|
],
|
||||||
"Html",
|
"Html",
|
||||||
),
|
),
|
||||||
@ -649,7 +649,7 @@ mod tests {
|
|||||||
(str_set(&["js"]), "::my_filters::Js".into()),
|
(str_set(&["js"]), "::my_filters::Js".into()),
|
||||||
(
|
(
|
||||||
str_set(&[
|
str_set(&[
|
||||||
"html", "htm", "j2", "jinja", "jinja2", "rinja", "svg", "xml"
|
"askama", "html", "htm", "j2", "jinja", "jinja2", "rinja", "svg", "xml"
|
||||||
]),
|
]),
|
||||||
"rinja::filters::Html".into()
|
"rinja::filters::Html".into()
|
||||||
),
|
),
|
||||||
|
@ -865,7 +865,7 @@ const _: () = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
#[cfg(feature = "code-in-doc")]
|
#[cfg(feature = "code-in-doc")]
|
||||||
const JINJA_EXTENSIONS: &[&str] = &["j2", "jinja", "jinja2", "rinja"];
|
const JINJA_EXTENSIONS: &[&str] = &["askama", "j2", "jinja", "jinja2", "rinja"];
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn get_source() {
|
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
|
--> LocalEscaper.html:1:38
|
||||||
"text|escape(\"latex\")}}`."
|
"text|escape(\"latex\")}}`."
|
||||||
--> tests/ui/no-such-escaper.rs:6:14
|
--> 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")}}`."#,
|
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
|
--> tests/ui/no-such-escaper.rs:14:11
|
||||||
|
|
|
|
||||||
14 | ext = "tex",
|
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
|
--> tests/ui/no-such-escaper.rs:22:19
|
||||||
|
|
|
|
||||||
22 | #[template(path = "latex-file.tex")]
|
22 | #[template(path = "latex-file.tex")]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user