Get rid of the concept of NamedBlock and replace it with a ParameterizedBlock special case that does not support an else block.
This commit is contained in:
@@ -97,7 +97,7 @@ fn extract_inline_partials_from_tag<'a, 'b>(
|
||||
}
|
||||
DustTag::DTPartial(..) => (),
|
||||
DustTag::DTInlinePartial(named_block) => {
|
||||
blocks.insert(&named_block.name, &named_block.contents);
|
||||
blocks.insert(&named_block.path.keys[0], &named_block.contents);
|
||||
}
|
||||
DustTag::DTBlock(..) => (),
|
||||
DustTag::DTHelperEquals(parameterized_block) => {
|
||||
|
||||
@@ -347,7 +347,7 @@ impl<'a> DustRenderer<'a> {
|
||||
None,
|
||||
&named_block.explicit_context,
|
||||
);
|
||||
return match blocks.blocks.get_block(named_block.name) {
|
||||
return match blocks.blocks.get_block(named_block.path.keys[0]) {
|
||||
None => self.render_maybe_body(
|
||||
&named_block.contents,
|
||||
new_breadcrumbs.as_ref().unwrap_or(breadcrumbs),
|
||||
|
||||
Reference in New Issue
Block a user