MCPcopy Create free account
hub / github.com/modem-dev/hunk / spansText

Function spansText

src/ui/diff/renderRows.tsx:443–447  ·  view source on GitHub ↗

Flatten styled spans to their visible text content.

(spans: RenderSpan[])

Source from the content-addressed store, hash-verified

441
442/** Flatten styled spans to their visible text content. */
443function spansText(spans: RenderSpan[]) {
444 return sanitizeTerminalSpans(spans)
445 .map((span) => span.text)
446 .join("");
447}
448
449/** Return one cell's code text without rail, gutter, sign, or line-number decorations. */
450function cellCodeText(spans: RenderSpan[], horizontalOffset = 0) {

Callers 2

cellCodeTextFunction · 0.85

Calls 1

sanitizeTerminalSpansFunction · 0.90

Tested by

no test coverage detected