| 2218 | const code:string[] = [], |
| 2219 | optionValue:string = options.jsscope, |
| 2220 | foldstart = function beautify_script_output_scope_foldstart():void { |
| 2221 | let index:number = code.length; |
| 2222 | do { |
| 2223 | index = index - 1; |
| 2224 | } while (index > 0 && code[index] !== "<li>"); |
| 2225 | if (code[index] === "<li>") { |
| 2226 | code[index] = `<li class="fold" title="folds from line ${linecount} to line xxx">`; |
| 2227 | code[index + 1] = `-${code[index + 1]}`; |
| 2228 | foldindex.push([index, a]); |
| 2229 | } |
| 2230 | }, |
| 2231 | foldend = function beautify_script_output_scope_foldend():void { |
| 2232 | const lastfold:[number, number] = foldindex[foldindex.length - 1]; |
| 2233 | if (data.types[a] === "end" && lastfold[1] === data.begin[a]) { |