aboutsummaryrefslogtreecommitdiffstats
path: root/askama_derive/src/generator.rs
diff options
context:
space:
mode:
authorLibravatar Jakub Stachurski <jakub@wilkuu.xyz>2024-01-09 17:24:11 +0100
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2024-01-09 21:23:47 +0100
commit50c64bc8650574d1e9243a50477eb7dbd36e36c4 (patch)
tree6d8d9060fe76f1994062e2c22559501ae66cfd48 /askama_derive/src/generator.rs
parentb8697ba20205c01ac43da4e3054a2d3f3be007b9 (diff)
downloadaskama-50c64bc8650574d1e9243a50477eb7dbd36e36c4.tar.gz
askama-50c64bc8650574d1e9243a50477eb7dbd36e36c4.tar.bz2
askama-50c64bc8650574d1e9243a50477eb7dbd36e36c4.zip
Make the `markdown` filter compatible with `String`
This commit solves issue #719. This is done by making the markdown filter borrow the string and simplifying the filter to accept `&str` instead of `AsRef<str>` Add test for the markdown filter using as input Revert markdown filter changes Revert unnecessary changes Improve test_markdown_owned_string test Use cargo fmt
Diffstat (limited to 'askama_derive/src/generator.rs')
-rw-r--r--askama_derive/src/generator.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs
index df15bdc..760a1f6 100644
--- a/askama_derive/src/generator.rs
+++ b/askama_derive/src/generator.rs
@@ -1200,7 +1200,7 @@ impl<'a> Generator<'a> {
};
buf.write(&format!(
- "::askama::filters::markdown({}, ",
+ "::askama::filters::markdown({}, &",
self.input.escaper
));
self.visit_expr(buf, md)?;