Allow text and HTML children

This commit is contained in:
Aria 2023-06-23 04:03:45 -07:00
parent 15f7613c65
commit 6d84494965

View file

@ -57,14 +57,14 @@ public class HTMLElement {
if ( text != null ) {
builder.append ( text );
}
else {
if ( ! isEmptyElement ) {
for ( HTMLElement child : children ) {
builder.append ( child.generateHTML ( ) );
}
if ( ! isEmptyElement ) {
for ( HTMLElement child : children ) {
builder.append ( child.generateHTML ( ) );
}
}
builder.append ( "</" ).append ( tagName ).append ( ">\n" );
return builder.toString ( );