MCPcopy
hub / github.com/prettier/prettier / printElseIfBlock

Function printElseIfBlock

src/language-handlebars/printer-glimmer.js:590–605  ·  view source on GitHub ↗
(path, print)

Source from the content-addressed store, hash-verified

588}
589
590function printElseIfBlock(path, print) {
591 const { node, grandparent } = path;
592 return group([
593 printInverseBlockOpeningMustache(grandparent),
594 ["else", " ", grandparent.inverse.body[0].path.head.name],
595 indent([
596 line,
597 group(printParams(path, print)),
598 ...(isNonEmptyArray(node.program.blockParams)
599 ? [line, printBlockParams(node.program)]
600 : []),
601 ]),
602 softline,
603 printInverseBlockClosingMustache(grandparent),
604 ]);
605}
606
607function printCloseBlock(path, options, print) {
608 const { node } = path;

Callers 1

printFunction · 0.85

Calls 7

groupFunction · 0.90
indentFunction · 0.90
printParamsFunction · 0.85
isNonEmptyArrayFunction · 0.85
printBlockParamsFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…