*In html you cann't break a tag as into \nstyle> .
*snobol4(V2.24 1998 about 50Kb) hack's output default to 80 char
*csnobol4(V3.11 1975 about 292Kb mingwin P.L.Budne 2004) doesn't hack
beforetag = break('<') . tag
commenttag = ''
endtag =''
tagend = '>'
input(.myfile,,1024,'..\..\mhtml\noord.htm') :f(noexits)
output(.output,,1024,'klad.htm') :f(noexits)
&anchor = 0
* main program
newline html = html trim(myfile) :f(close)
nexttag html beforetag = :f(dummytext)
tag gt(size(tag),0) rem . output
html pos(0) commenttag :s(comment)
html pos(0) endtag :s(closetag)
* default tag is tagend , if not read new line
color = 'blue'
tagagain html break(tagend) . tag '>' = :f(nexttagline)
tag '<' = '<'
output = '
' tag '>' :(nexttag)
* get a next line
nexttagline html = html trim(myfile) :f(close)s(tagagain)
* close tag '' change color
closetag color = 'green' :(tagagain)
* comment text
comment output = '
'
comnext html arb . tag commentendtag = :f(commentnext)
cag tag '<' = '<' :s(cag)
cat tag '>' = '>' :s(cat)
output = tag '-->' :(nexttag)
commentnext
* output = html
html = html trim(myfile) :f(close)s(comnext)
dummytext output = html
html = trim(myfile) :f(close)s(nexttag)
close detach(myfile) :(end)
noexits output = "cann't open file" :(end)
end