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

Function normalizeTerminalOutput

packages/pi-tui/src/utils.ts:308–311  ·  view source on GitHub ↗
(str: string)

Source from the content-addressed store, hash-verified

306const THAI_LAO_AM_GLOBAL_REGEX = /[\u0e33\u0eb3]/g;
307
308export function normalizeTerminalOutput(str: string): string {
309 if (!THAI_LAO_AM_REGEX.test(str)) return str;
310 return str.replace(THAI_LAO_AM_GLOBAL_REGEX, (char) => (char === "\u0e33" ? "\u0e4d\u0e32" : "\u0ecd\u0eb2"));
311}
312
313/**
314 * Extract ANSI escape sequences from a string at the given position.

Callers 2

applyLineResetsMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected