@@ 104,10 104,6 @@ func (b *Block) recursive_print(builder *strings.Builder, depth int) {
if builder == nil {
builder = &strings.Builder{}
}
- if depth > 0 {
- tab(builder, depth)
- builder.WriteString("<li>\n")
- }
if b.Content != nil {
tab(builder, depth)
// Handle indentation
@@ 115,15 111,11 @@ func (b *Block) recursive_print(builder *strings.Builder, depth int) {
builder.WriteString(string(output))
builder.WriteString("\n")
}
- if depth > 0 {
- tab(builder, depth)
- builder.WriteString("</li>\n")
- }
if len(*b.Children) > 0 {
tab(builder, depth)
builder.WriteString("<li>\n")
tab(builder, depth)
- builder.WriteString("<li><ul>\n")
+ builder.WriteString("<ul>\n")
for _, child := range *b.Children {
child.recursive_print(builder, depth+1)
}