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

Function templateString

beautify/script.ts:1710–1733  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1708 }
1709 },
1710 templateString = function beautify_script_level_templateString():void {
1711 if (ctype === "template_string_start") {
1712 indent = indent + 1;
1713 level.push(indent);
1714 } else if (ctype === "template_string_else") {
1715 fixchain();
1716 level[a - 1] = indent - 1;
1717 level.push(indent);
1718 } else {
1719 fixchain();
1720 indent = indent - 1;
1721 level[a - 1] = indent;
1722 level.push(-10);
1723 }
1724 if (a > 2 && (data.types[a - 2] === "template_string_else" || data.types[a - 2] === "template_string_start")) {
1725 if (options.brace_padding === true) {
1726 level[a - 2] = -10;
1727 level[a - 1] = -10;
1728 } else {
1729 level[a - 2] = -20;
1730 level[a - 1] = -20;
1731 }
1732 }
1733 },
1734 types = function beautify_script_level_types():void {
1735 if (data.token[a - 1] === "," || (data.token[a - 1] === ":" && data.stack[a - 1] !== "data_type")) {
1736 level[a - 1] = -10;

Callers 1

scriptFunction · 0.85

Calls 1

fixchainFunction · 0.85

Tested by

no test coverage detected