From 18445e20ffc6a568ba79df5f17615c3f35700dbd Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 23 Mar 2023 16:22:24 +0530 Subject: [PATCH] ... --- tools/cmd/diff/highlight.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/cmd/diff/highlight.go b/tools/cmd/diff/highlight.go index 7ba20839c..9698edcab 100644 --- a/tools/cmd/diff/highlight.go +++ b/tools/cmd/diff/highlight.go @@ -80,10 +80,9 @@ func clear_background(style *chroma.Style) *chroma.Style { return style } -const SGR_PREFIX = "\033[" -const SGR_SUFFIX = "m" - func ansi_formatter(w io.Writer, style *chroma.Style, it chroma.Iterator) error { + const SGR_PREFIX = "\033[" + const SGR_SUFFIX = "m" style = clear_background(style) before, after := make([]byte, 0, 64), make([]byte, 0, 64) nl := []byte{'\n'}