MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / getLineNumber

Method getLineNumber

src/extraction/liquid-extractor.ts:519–522  ·  view source on GitHub ↗

* Get the line number for a character index

(index: number)

Source from the content-addressed store, hash-verified

517 * Get the line number for a character index
518 */
519 private getLineNumber(index: number): number {
520 const substring = this.source.substring(0, index);
521 return (substring.match(/\n/g) || []).length + 1;
522 }
523
524 /**
525 * Get the character index of the start of a line

Callers 5

extractSchemaMethod · 0.95
addVariableMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected