MCPcopy
hub / github.com/prettier/prettier / getEndLocation

Function getEndLocation

src/language-html/print/children.js:30–43  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

28} from "./tag.js";
29
30function getEndLocation(node) {
31 const endLocation = locEnd(node);
32
33 // Element can be unclosed
34 if (
35 node.kind === "element" &&
36 !node.endSourceSpan &&
37 isNonEmptyArray(node.children)
38 ) {
39 return Math.max(endLocation, getEndLocation(node.children.at(-1)));
40 }
41
42 return endLocation;
43}
44
45function printChild(path, options, print) {
46 const child = path.node;

Callers 1

printChildFunction · 0.85

Calls 3

locEndFunction · 0.90
isNonEmptyArrayFunction · 0.85
atMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…