aboutsummaryrefslogtreecommitdiff
path: root/src/bytes/buffer.go
diff options
context:
space:
mode:
authorDaniel Martí <mvdan@mvdan.cc>2018-08-29 07:06:31 -0600
committerDaniel Martí <mvdan@mvdan.cc>2018-08-29 20:36:09 +0000
commit6fa08c0fdbc8435d0a7b0c2576ba2183adfac8f3 (patch)
tree652e3ca1c8ef4fc88da7e7d04bccd8b097fa7669 /src/bytes/buffer.go
parent8f4fd3f34e8e218cb90435b5a8c6ba9be23a1e1e (diff)
downloadgo-6fa08c0fdbc8435d0a7b0c2576ba2183adfac8f3.tar.xz
text/template: fix newline counting in raw strings
lexRawQuote already uses the next method, which keeps track of newlines on a character by character basis. Adding up newlines in emit again results in the newlines being counted twice, which can mean bad position information in error messages. Fix that, and add a test. Fixes #27319. Change-Id: Id803be065c541412dc808d388bc6d8a86a0de41e Reviewed-on: https://go-review.googlesource.com/131996 Run-TryBot: Daniel Martí <mvdan@mvdan.cc> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/bytes/buffer.go')
0 files changed, 0 insertions, 0 deletions