1
0
mirror of https://github.com/golang/go synced 2024-10-04 18:31:22 -06:00
go/src/pkg/text
Rob Pike 37cee77ac6 text/template: allow {{else if ... }} to simplify if chains
The method is simple: the parser just parses

        {{if A}}a{{else if B}}b{{end}}

to the same tree that would be produced by

        {{if A}}a{{else}}{{if B}}b{{end}}{{end}}

Thus no changes are required in text/template itself
or in html/template, only in text/template/parse.

Fixes #6085

R=golang-dev, adg
CC=golang-dev
https://golang.org/cl/13327043
2013-08-28 14:43:56 +10:00
..
scanner text/scanner: skip first character if it's a BOM 2012-09-07 17:15:42 -07:00
tabwriter doc: various "the the" and other typos 2012-07-08 11:57:04 +10:00
template text/template: allow {{else if ... }} to simplify if chains 2013-08-28 14:43:56 +10:00