]> Cypherpunks.ru repositories - gostls13.git/commit
text/template/parse: allow space after continue or break
authorRob Pike <r@golang.org>
Mon, 14 Mar 2022 23:21:08 +0000 (10:21 +1100)
committerRob Pike <r@golang.org>
Tue, 15 Mar 2022 00:19:35 +0000 (00:19 +0000)
commit41a82aa9c36bffab2593d50aa55a462fef4e5bd4
treed23d64317bddd4412f62a5d89c67cbb616f6bec9
parent15728ce950eea43d6f1b9fb29819d006071e843a
text/template/parse: allow space after continue or break

Trivial fix: We must skip space after either of these keywords
before we expect a closing delimiter.

Also delete the stutter-generating extra 'in' in the error message.
(See what I did there?)

Fixes #51670

Change-Id: If5415632c36eaac6699bdc0aa6ce18be956c9b53
Reviewed-on: https://go-review.googlesource.com/c/go/+/392615
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Daniel Martí <mvdan@mvdan.cc>
Trust: Daniel Martí <mvdan@mvdan.cc>
TryBot-Result: Gopher Robot <gobot@golang.org>
src/text/template/parse/parse.go
src/text/template/parse/parse_test.go