package main
import "core:strings"
wrap_sections :: proc(html: string) -> string {
H2 :: "
pos {
append(&parts, "")
append(&parts, html[pos:idx])
append(&parts, "")
}
pos = idx
search_pos = idx + len(H2)
}
if pos < len(html) {
append(&parts, "")
append(&parts, html[pos:])
append(&parts, "")
}
if len(parts) == 0 {
return html
}
return strings.join(parts[:], "")
}