Skip to content

Commit

Permalink
fix: don't skip empty lines in error contexts
Browse files Browse the repository at this point in the history
This throws off the location.
  • Loading branch information
jdkato committed Sep 30, 2020
1 parent 8d72304 commit 6b92b61
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/error.go
Expand Up @@ -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))
}
Expand Down

0 comments on commit 6b92b61

Please sign in to comment.