Commit 80cedf3e authored by Didier Spezia's avatar Didier Spezia Committed by Rob Pike
Browse files

text/template: detect unmatched else at parsing time

An unmatched {{else}} should trigger a parsing error.

The top level parser is able to issue an error in case
of unmatched {{end}}. It does it a posteriori (i.e. after having
parsed the action).

Extend this behavior to also check for unmatched {{else}}

Fixes #10611

Change-Id: I1d4f433cc64e11bea5f4d61419ccc707ac01bb1d
Reviewed-on: https://go-review.googlesource.com/9620


Reviewed-by: default avatarRob Pike <r@golang.org>
parent 8a072ada
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment