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

Method getLineNumber

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

* Get the line number for a character index

(index: number)

Source from the content-addressed store, hash-verified

375 * Get the line number for a character index
376 */
377 private getLineNumber(index: number): number {
378 const substring = this.source.substring(0, index);
379 return (substring.match(/\n/g) || []).length + 1;
380 }
381
382 /**
383 * Get the character index of the start of a line

Callers 4

extractSchemaMethod · 0.95
extractAssignmentsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected