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

Function template

beautify/script.ts:1676–1709  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1674 }
1675 },
1676 template = function beautify_script_level_template():void {
1677 if (ctype === "template_else") {
1678 level[a - 1] = indent - 1;
1679 level.push(indent);
1680 } else if (ctype === "template_start") {
1681 indent = indent + 1;
1682 if (data.lines[a - 1] < 1) {
1683 level[a - 1] = -20;
1684 }
1685 if (data.lines[a] > 0) {
1686 level.push(indent);
1687 } else {
1688 level.push(-20);
1689 }
1690 } else if (ctype === "template_end") {
1691 indent = indent - 1;
1692 if (ltype === "template_start" || data.lines[a - 1] < 1) {
1693 level[a - 1] = -20;
1694 } else {
1695 level[a - 1] = indent;
1696 }
1697 if (data.lines[a] > 0) {
1698 level.push(indent);
1699 } else {
1700 level.push(-20);
1701 }
1702 } else if (ctype === "template") {
1703 if (data.lines[a] > 0) {
1704 level.push(indent);
1705 } else {
1706 level.push(-20);
1707 }
1708 }
1709 },
1710 templateString = function beautify_script_level_templateString():void {
1711 if (ctype === "template_string_start") {
1712 indent = indent + 1;

Callers 1

scriptFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected