mirror of
https://github.com/askama-rs/askama.git
synced 2025-09-29 05:51:32 +00:00
derive: don't write empty string
This commit is contained in:
parent
871215b529
commit
68327f1a36
@ -2284,7 +2284,7 @@ impl Buffer {
|
||||
const OPEN: &str = r#"writer.write_str(""#;
|
||||
const CLOSE: &str = r#"")?;"#;
|
||||
|
||||
if !self.discard {
|
||||
if !s.is_empty() && !self.discard {
|
||||
if !self.last_was_write_str {
|
||||
self.last_was_write_str = true;
|
||||
self.buf.push_str(OPEN);
|
||||
|
Loading…
x
Reference in New Issue
Block a user