diff --git a/rinja_derive/src/config.rs b/rinja_derive/src/config.rs index 9c45b6e3..c1178e2b 100644 --- a/rinja_derive/src/config.rs +++ b/rinja_derive/src/config.rs @@ -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() ), diff --git a/rinja_derive/src/input.rs b/rinja_derive/src/input.rs index eb743dca..13b7a919 100644 --- a/rinja_derive/src/input.rs +++ b/rinja_derive/src/input.rs @@ -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() { diff --git a/testing/tests/ui/no-such-escaper.stderr b/testing/tests/ui/no-such-escaper.stderr index a212f63c..96c9a236 100644 --- a/testing/tests/ui/no-such-escaper.stderr +++ b/testing/tests/ui/no-such-escaper.stderr @@ -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")]