mirror of
https://github.com/charmbracelet/crush.git
synced 2025-08-02 05:20:46 +03:00
fix(tui): renderer: replace tabs with spaces in plain content
We need to ensure that tabs in plain text content are replaced with spaces otherwise they will be escaped and displayed as tab unicode picture characters.
This commit is contained in:
@@ -656,6 +656,7 @@ func joinHeaderBody(header, body string) string {
|
||||
func renderPlainContent(v *toolCallCmp, content string) string {
|
||||
t := styles.CurrentTheme()
|
||||
content = strings.ReplaceAll(content, "\r\n", "\n") // Normalize line endings
|
||||
content = strings.ReplaceAll(content, "\t", " ") // Replace tabs with spaces
|
||||
content = strings.TrimSpace(content)
|
||||
lines := strings.Split(content, "\n")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user