JS代码格式化和语法着色V2

2019-06-03 18:16:39王旭

+"</span>/";
                    i=intNextQuote;
                    lastState="";
                }
                lastState="";
            break;
            case "{":
                outputLn(str);
                str=" ";
                seq=document.createElement("div");
                seq.className="indent";
                curRe.appendChild(seq);
                curRe=seq;
                lastState="rn";
                if(i-glbP>200){
                    glbP=i+1;
                    glbTimer=setTimeout(core_analysis);
                    return;
                }
            break;
            case "}":
                outputLn(str.substring(0,str.length-1));
                str="} ";
                lastState="";
                curRe=curRe.parentNode;
            break;
            default:
                if(c.match(/w/)&&glbStr.charAt(i-1).match(/W/)){intWordStart=i;}