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

Function fixchain

beautify/script.ts:720–743  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

718 level.push(indent - 1);
719 },
720 fixchain = function beautify_script_level_fixchain():void {
721 let bb:number = a - 1,
722 cc:number = data.begin[a];
723 if (indent < 1) {
724 return;
725 }
726 do {
727 if (cc !== data.begin[bb]) {
728 bb = data.begin[bb];
729 } else {
730 if (data.types[bb] === "separator" || data.types[bb] === "operator") {
731 if (data.token[bb] === "." && level[bb - 1] > 0) {
732 if (data.token[cc - 1] === "if") {
733 indent = indent - 2;
734 } else {
735 indent = indent - 1;
736 }
737 }
738 break;
739 }
740 }
741 bb = bb - 1;
742 } while (bb > 0 && bb > cc);
743 },
744 markup = function beautify_script_level_markup():void {
745 if ((data.token[a + 1] !== "," && ctoke.indexOf("/>") !== ctoke.length - 2) || (data.token[a + 1] === "," && data.token[data.begin[a] - 3] !== "React")) {
746 destructfix(false, false);

Callers 4

endFunction · 0.85
operatorFunction · 0.85
separatorFunction · 0.85
templateStringFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected