MCPcopy Index your code
hub / github.com/prettydiff/prettydiff / end

Function end

beautify/script.ts:220–669  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

218 } while (c > -1);
219 },
220 end = function beautify_script_level_end():void {
221 const ei:number[] = (extraindent[extraindent.length - 1] === undefined)
222 ? []
223 : extraindent[extraindent.length - 1],
224 markupList = function beautify_script_level_end_markupList():void {
225 let aa:number = a,
226 markup:boolean = false;
227 const begin:number = data.begin[aa];
228 do {
229 aa = aa - 1;
230 if (data.lexer[aa] === "markup") {
231 markup = true;
232 break;
233 }
234 if (data.begin[aa] !== begin) {
235 aa = data.begin[aa];
236 }
237 } while (aa > begin);
238 if (markup === true) {
239 aa = a;
240 do {
241 aa = aa - 1;
242 if (data.begin[aa] !== begin) {
243 aa = data.begin[aa];
244 } else if (data.token[aa] === ",") {
245 level[aa] = indent + 1;
246 }
247 } while (aa > begin);
248 level[begin] = indent + 1;
249 level[a - 1] = indent;
250 } else {
251 level[a - 1] = -20;
252 }
253 };
254 if (ctoke === ")" && data.token[a + 1] === "." && ei[ei.length - 1] > -1 && data.token[ei[0]] !== ":") {
255 let c:number = data.begin[a],
256 d:boolean = false,
257 e:boolean = false;
258 do {
259 c = c - 1;
260 } while (c > 0 && level[c] < -9);
261 d = (level[c] === indent);
262 c = a + 1;
263 do {
264 c = c + 1;
265 if (data.token[c] === "{") {
266 e = true;
267 break;
268 }
269 if (data.begin[c] === data.begin[a + 1] && (data.types[c] === "separator" || data.types[c] === "end")) {
270 break;
271 }
272 } while (c < b);
273 if (d === false && e === true && extraindent.length > 1) {
274 extraindent[extraindent.length - 2].push(data.begin[a]);
275 indent = indent + 1;
276 }
277 }

Callers 1

scriptFunction · 0.85

Calls 4

fixchainFunction · 0.85
destructfixFunction · 0.85
endExtraIndFunction · 0.85
markupListFunction · 0.85

Tested by

no test coverage detected