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

Method getLineStart

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

* Get the character index of the start of a line

(lineNumber: number)

Source from the content-addressed store, hash-verified

383 * Get the character index of the start of a line
384 */
385 private getLineStart(lineNumber: number): number {
386 const lines = this.source.split('\n');
387 let index = 0;
388 for (let i = 0; i < lineNumber - 1 && i < lines.length; i++) {
389 index += lines[i]!.length + 1; // +1 for newline
390 }
391 return index;
392 }
393}

Callers 4

extractSchemaMethod · 0.95
extractAssignmentsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected