MCPcopy Create free account
hub / github.com/nodejs/node / findLinkNameEnd

Function findLinkNameEnd

test/fixtures/snapshot/typescript.js:128597–128614  ·  view source on GitHub ↗
(text)

Source from the content-addressed store, hash-verified

128595 return text;
128596 }
128597 function findLinkNameEnd(text) {
128598 if (text.indexOf("()") === 0)
128599 return 2;
128600 if (text[0] !== "<")
128601 return 0;
128602 var brackets = 0;
128603 var i = 0;
128604 while (i < text.length) {
128605 if (text[i] === "<")
128606 brackets++;
128607 if (text[i] === ">")
128608 brackets--;
128609 i++;
128610 if (!brackets)
128611 return i;
128612 }
128613 return 0;
128614 }
128615 var carriageReturnLineFeed = "\r\n";
128616 /**
128617 * The default is CRLF.

Callers 1

buildLinkPartsFunction · 0.85

Calls 1

indexOfMethod · 0.45

Tested by

no test coverage detected