- Add comprehensive ECMA-48 ANSI pattern to strip escape sequences from output - Fix _truncate_line to strip ANSI before length calculation - Cache PythonLexer instance (was creating new one per call) - Memoize token color lookups to avoid repeated parent chain traversal