MCPcopy
hub / github.com/chenglou/pretext / getLineTextCache

Function getLineTextCache

src/line-text.ts:54–61  ·  view source on GitHub ↗
(prepared: PreparedTextWithSegments)

Source from the content-addressed store, hash-verified

52}
53
54export function getLineTextCache(prepared: PreparedTextWithSegments): Map<number, string[]> {
55 let cache = sharedLineTextCaches.get(prepared)
56 if (cache !== undefined) return cache
57
58 cache = new Map<number, string[]>()
59 sharedLineTextCaches.set(prepared, cache)
60 return cache
61}
62
63export function buildLineTextFromRange(
64 prepared: PreparedTextWithSegments,

Callers 4

materializeFragmentTextFunction · 0.85
materializeLineRangeFunction · 0.85
layoutNextLineFunction · 0.85
layoutWithLinesFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…