you mean like youd rather do it the other way around?
This commit is contained in:
parent
afa0170041
commit
4210f500c4
1 changed files with 7 additions and 2 deletions
|
@ -46,8 +46,13 @@ class ServerSideRenderer(Renderer):
|
||||||
|
|
||||||
for element in puppygirl.elements:
|
for element in puppygirl.elements:
|
||||||
if hasattr(element, "name"):
|
if hasattr(element, "name"):
|
||||||
for tag in tree.find_all(element.name):
|
tags = tree.find_all(element.name)
|
||||||
new_tag = element.render(SingleNode(tag).clone(), templates)
|
tags.reverse()
|
||||||
|
for tag in tags:
|
||||||
|
new_tag = element.render(
|
||||||
|
SingleNode(tag).clone(),
|
||||||
|
templates
|
||||||
|
)
|
||||||
|
|
||||||
if isinstance(new_tag, Iterable):
|
if isinstance(new_tag, Iterable):
|
||||||
tag.extend(new_tag)
|
tag.extend(new_tag)
|
||||||
|
|
Loading…
Add table
Reference in a new issue