Start of rendering partials.

This commit is contained in:
Tom Alexander 2020-05-08 19:24:32 -04:00
parent ec321a17ca
commit f240b877b8
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 5 additions and 1 deletions

View File

@ -114,7 +114,7 @@ pub struct ParameterizedBlock<'a> {
#[derive(Clone, Debug, PartialEq)] #[derive(Clone, Debug, PartialEq)]
pub struct Partial<'a> { pub struct Partial<'a> {
name: String, pub name: String,
params: Vec<KVPair<'a>>, params: Vec<KVPair<'a>>,
} }

View File

@ -172,6 +172,10 @@ impl<'a> DustRenderer<'a> {
}; };
} }
} }
DustTag::DTPartial(partial) => {
let rendered_content = self.render(&partial.name, breadcrumbs)?;
return Ok(rendered_content);
}
_ => (), // TODO: Implement the rest _ => (), // TODO: Implement the rest
} }
Ok("".to_owned()) Ok("".to_owned())