From 137e7887a03e4571ced1371eb1a0a497b1248075 Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sun, 10 May 2020 21:14:51 -0400 Subject: [PATCH] Finish implementing DTHelperEquals. --- src/renderer/renderer.rs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/renderer/renderer.rs b/src/renderer/renderer.rs index a5309f3..a0b8a73 100644 --- a/src/renderer/renderer.rs +++ b/src/renderer/renderer.rs @@ -246,7 +246,21 @@ impl<'a> DustRenderer<'a> { }, }; if left_side == right_side { - panic!("testing"); + match ¶meterized_block.contents { + None => return Ok("".to_owned()), + Some(body) => { + let rendered_content = self.render_body(body, breadcrumbs, blocks)?; + return Ok(rendered_content); + } + } + } else { + match ¶meterized_block.else_contents { + None => return Ok("".to_owned()), + Some(body) => { + let rendered_content = self.render_body(body, breadcrumbs, blocks)?; + return Ok(rendered_content); + } + } } } _ => (), // TODO: Implement the rest