]> Cypherpunks repositories - gostls13.git/commit
text/template: fix handling of empty blocks
authorRob Pike <r@golang.org>
Tue, 21 Mar 2017 17:00:30 +0000 (10:00 -0700)
committerRob Pike <r@golang.org>
Tue, 4 Apr 2017 15:46:02 +0000 (15:46 +0000)
commitbe5a201e2a59dbe45157b8939a507830206d86fb
treea3febc545e61731779a02f341c8dfee43daa8c38
parentbebfd4ba415cbfee578f64177fe1c59dab5a1df8
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>
src/text/template/multi_test.go
src/text/template/template.go