Integrated the new span class

This commit is contained in:
Tom Alexander
2020-05-03 12:48:02 -04:00
parent b8e8f19724
commit f97bb25ca8
2 changed files with 33 additions and 63 deletions

View File

@@ -85,7 +85,10 @@ impl<'a> DustRenderer<'a> {
let mut output = String::new();
for elem in &body.elements {
match elem {
TemplateElement::TESpan(span) => output.push_str(span.contents),
TemplateElement::TESpan(span) => span
.contents
.iter()
.for_each(|line: &&str| output.push_str(line)),
TemplateElement::TETag(dt) => {
output.push_str(&self.render_tag(dt, context)?);
}