Commit 0cc4c297 authored by Alexandre Maari's avatar Alexandre Maari Committed by Rob Pike

text/template: removed truncation of context in error message

Fixes #27930

Change-Id: I31ad3fdb74d74152268c59ae4c651cc4c8c1716d
Reviewed-on: https://go-review.googlesource.com/c/142217Reviewed-by: 's avatarRob Pike <r@golang.org>
Run-TryBot: Rob Pike <r@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
parent cc558fed
......@@ -148,9 +148,6 @@ func (t *Tree) ErrorContext(n Node) (location, context string) {
}
lineNum := 1 + strings.Count(text, "\n")
context = n.String()
if len(context) > 20 {
context = fmt.Sprintf("%.20s...", context)
}
return fmt.Sprintf("%s:%d:%d", tree.ParseName, lineNum, byteNum), context
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment