]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.8] text/template: fix handling of empty blocks
authorRob Pike <r@golang.org>
Tue, 21 Mar 2017 17:00:30 +0000 (10:00 -0700)
committerRuss Cox <rsc@golang.org>
Wed, 5 Apr 2017 15:26:12 +0000 (15:26 +0000)
commit6c5abcf21a319e36419ef4b9e147f38ba9c84637
tree05e2402c8ae8befa110cf9fa461cf45a30668edc
parent43fa04c23cb147c4988d4f422f98d30685f2256c
[release-branch.go1.8] text/template: fix handling of empty blocks

This was a subtle bug introduced in the previous release's fix for
issue 16156.

The definition of empty template was broken, causing the answer
to depend on the order of templates in the map.

Fixes #16156 (for real).
Fixes #19294.
Fixes #19204.

Change-Id: I1cd915c94534cad3116d83bd158cbc28700510b9
Reviewed-on: https://go-review.googlesource.com/38420
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Russ Cox <rsc@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-on: https://go-review.googlesource.com/39594
Reviewed-by: Rob Pike <r@golang.org>
src/text/template/multi_test.go
src/text/template/template.go