Fixed problem with erroneous rendering of empty HTML tags

We were doing things like `<div />`, which HTML doesn't like
print-window-tiddler
Jeremy Ruston 2013-01-23 12:36:08 +00:00
rodzic bae48d5526
commit 83900b0230
1 zmienionych plików z 6 dodań i 11 usunięć

Wyświetl plik

@ -140,20 +140,15 @@ ElementRenderer.prototype.render = function(type) {
}
}
}
if(!this.widget.children || this.widget.children.length === 0) {
output.push("/");
}
output.push(">");
}
if(this.widget.children && this.widget.children.length > 0) {
$tw.utils.each(this.widget.children,function(node) {
if(node.render) {
output.push(node.render(type));
}
});
if(isHtml) {
output.push("</",this.widget.tag,">");
$tw.utils.each(this.widget.children,function(node) {
if(node.render) {
output.push(node.render(type));
}
});
if(isHtml) {
output.push("</",this.widget.tag,">");
}
return output.join("");
};