change html_minify to recursive function