fn parse_code(st)
ug(st,"selectionstart",sele)
ug(st,"text",str)
ss("&"+"lt;",left)
ss("&"+"gt;",right)
// 空格
sr(str,"\t"," ",str)
sr(str," "," ",str)
// 左右尖括号
sr(str,"<",left,str)
sr(str,">",right,str)
// 引号包含内容
se(str,"\"(.*?)\"",0,se_a)
se(se_a,"sral","%%左尖%%span style=%%引号%%color%%冒号%%red%%引号%%%%右尖%%"$1"%%左尖%%/span%%右尖%%",str)
se(str,"'(.*?)'",0,se_a)
se(se_a,"sral","%%左尖%%span style=%%引号%%color%%冒号%%red%%引号%%%%右尖%%'$1'%%左尖%%/span%%右尖%%",str)
// 键名
se(str,"\\n(.*?):",0,se_a)
se(se_a,"sral","\n%%左尖%%span style=%%引号%%color%%冒号%%blue%%引号%%%%右尖%%$1%%冒号%%%%左尖%%/span%%右尖%%",str)
se(str,"^(.*?):",0,se_a)
se(se_a,"sral","%%左尖%%span style=%%引号%%color%%冒号%%blue%%引号%%%%右尖%%$1%%冒号%%%%左尖%%/span%%右尖%%",str)
// 换行
sr(str,"\n","%%左尖%%br%%右尖%%",str)
sr(str,"%%引号%%","\"",str)
sr(str,"%%冒号%%",":",str)
sr(str,"%%左尖%%","<",str)
sr(str,"%%右尖%%",">",str)
ss("(html)" + str,text)
ss keyup = false
us(st,"text",text)
us(st,"selection",sele,pass)
end fn
鹏优创官网