From 40d7c7eb66c3ebff1e049df9d8d2e3797cb7c6fc Mon Sep 17 00:00:00 2001 From: Alexandre Bourget Date: Tue, 10 Sep 2024 17:10:12 -0400 Subject: [PATCH] Don't highlight JSON when over a meg --- tui2/pages/output/render.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tui2/pages/output/render.go b/tui2/pages/output/render.go index 1ccd0aa1..8b9948bf 100644 --- a/tui2/pages/output/render.go +++ b/tui2/pages/output/render.go @@ -166,6 +166,9 @@ func (o *Output) decodeDynamicMessage(msgDesc *manifest.ModuleDescriptor, anyin } func highlightJSON(in string) string { + if len(in) > 1_000_000 { + return in + } out := &strings.Builder{} profile := "friendly" if lipgloss.HasDarkBackground() {