HTML = "<html><head><script src=\"google.jp\"></head></html>" assert 0 sdim cv,100 sdim HTML_tag_name,0,0 tabstep=4 sdim indent sdim indent2 HTMLindentLevel = -1 repeat tabstep indent += " " loop repeat strlen(HTML) token = strmid(HTML,cnt,1) if strmid(HTML,cnt,2) == "</" { cv += "</"+HTML_tag_name(HTMLindentLevel)+">"+"\n" HTML_tag_name(HTMLindentLevel) = "" HTMLindentLevel -= 1 } if token == "<" && strmid(HTML,cnt,2) != "</" { HTMLinTag = 1 HTMLindentLevel += 1 } if token == " " && HTMLinTAG : HTMLinTAG = 0 if token != " " && token != "<" && token != ">" && HTMLinTAG { HTML_tag_name(HTMLindentLevel) += token } if token == ">" : { HTMLinTag = 0 repeat HTMLindentLevel indent2 += indent loop logmes "cv += <"+HTML_tag_name(HTMLindentLevel)+">" cv += indent2+"<"+HTML_tag_name(HTMLindentLevel)+">"+"\n" indent2 = indent } if HTMLinTAG == 0 && token != "<" && token != ">" && token != "/" : cv += token loop mes cv
というふうにしたのですがうまく表示されません。
どこを直せばいいのかご教授お願いできますか?