From aa98f61fa78b2a81e47419feae188308d30bacf6 Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Fri, 3 Mar 2017 16:44:54 +0100 Subject: Discard trailing newlines from templates by default This matches Jinja's behavior, and seems sensible. --- testing/tests/inheritance.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'testing/tests/inheritance.rs') diff --git a/testing/tests/inheritance.rs b/testing/tests/inheritance.rs index 2fd06ba..b3add1c 100644 --- a/testing/tests/inheritance.rs +++ b/testing/tests/inheritance.rs @@ -19,11 +19,11 @@ struct ChildTemplate<'a> { #[test] fn test_use_base_directly() { let t = BaseTemplate { title: "Foo" }; - assert_eq!(t.render(), "Foo\n\nCopyright 2017\n"); + assert_eq!(t.render(), "Foo\n\nCopyright 2017"); } #[test] fn test_simple_extends() { let t = ChildTemplate { _parent: BaseTemplate { title: "Bar" } }; - assert_eq!(t.render(), "Bar\nContent goes here\nCopyright 2017\n"); + assert_eq!(t.render(), "Bar\nContent goes here\nCopyright 2017"); } -- cgit