1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-27 03:57:21 +00:00

Don't render content or closing tag for void elements

This commit is contained in:
Jeremy Ruston 2013-02-03 17:44:40 +00:00
parent c85acd71fe
commit 5df60aaa3c

View File

@ -142,13 +142,15 @@ ElementRenderer.prototype.render = function(type) {
}
output.push(">\n");
}
$tw.utils.each(this.widget.children,function(node) {
if(node.render) {
output.push(node.render(type));
if($tw.config.htmlVoidElements.indexOf(this.widget.tag) === -1) {
$tw.utils.each(this.widget.children,function(node) {
if(node.render) {
output.push(node.render(type));
}
});
if(isHtml) {
output.push("</",this.widget.tag,">\n");
}
});
if(isHtml) {
output.push("</",this.widget.tag,">\n");
}
return output.join("");
};