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

Function tabify

src/ui/diff/pierre.ts:178–180  ·  view source on GitHub ↗

Replace tabs with fixed spaces so terminal cell widths stay predictable.

(text: string)

Source from the content-addressed store, hash-verified

176
177/** Replace tabs with fixed spaces so terminal cell widths stay predictable. */
178function tabify(text: string) {
179 return expandDiffTabs(sanitizeTerminalLine(text));
180}
181
182const EMPTY_STYLE_VALUES = new Map<string, string>();
183// Pierre reuses the same tiny set of inline style strings across many token spans.

Callers 2

visitFunction · 0.85
cleanDiffLineFunction · 0.85

Calls 2

expandDiffTabsFunction · 0.90
sanitizeTerminalLineFunction · 0.90

Tested by

no test coverage detected