From 6b92b610249bfb0a025fed085fc1bf891a2551d0 Mon Sep 17 00:00:00 2001 From: Joseph Kato Date: Wed, 30 Sep 2020 14:43:42 -0700 Subject: [PATCH] fix: don't skip empty lines in error contexts This throws off the location. --- core/error.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/error.go b/core/error.go index 7d2b4e0c..d18b48af 100644 --- a/core/error.go +++ b/core/error.go @@ -54,7 +54,7 @@ func annotate(file []byte, target string) (lineError, error) { sb.WriteString( fmt.Sprintf("\033[1;32m%4d\033[0m* %s\n", idx, markup)) - } else if len(strings.TrimSpace(plain)) > 0 { + } else { sb.WriteString( fmt.Sprintf("\033[1;32m%4d\033[0m %s\n", idx, markup)) }