applyStyleWithTTY conditionally applies styling based on a provided TTY check.
(style lipgloss.Style, text string, ttyCheck func() bool)
| 35 | |
| 36 | // applyStyleWithTTY conditionally applies styling based on a provided TTY check. |
| 37 | func applyStyleWithTTY(style lipgloss.Style, text string, ttyCheck func() bool) string { |
| 38 | if ttyCheck() { |
| 39 | return style.Render(text) |
| 40 | } |
| 41 | return text |
| 42 | } |
| 43 | |
| 44 | // FormatError formats a CompilerError with Rust-like rendering |
| 45 | func FormatError(err CompilerError) string { |
no test coverage detected