MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / normalizeText

Method normalizeText

packages/pi-tui/src/components/editor.ts:1137–1139  ·  view source on GitHub ↗

* Normalize text for editor storage: * - Normalize line endings (\r\n and \r -> \n) * - Expand tabs to 4 spaces

(text: string)

Source from the content-addressed store, hash-verified

1135 * - Expand tabs to 4 spaces
1136 */
1137 private normalizeText(text: string): string {
1138 return text.replace(/\r\n/g, "\n").replace(/\r/g, "\n").replace(/\t/g, " ");
1139 }
1140
1141 /**
1142 * Internal text insertion at cursor. Handles single and multi-line text.

Callers 3

setTextMethod · 0.95
handlePasteMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected