]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.18] 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)
committerAlex Rakoczy <alex@golang.org>
Thu, 26 May 2022 17:27:08 +0000 (17:27 +0000)
commita08baaad1a7c8e88b5a521ae12666b0aa3dc252a
tree720cff2776f5dcf3b42c9b97d410cc800552faa6
parente1b14f53c13c7ab809ea1a33d2ec7f787efdafa8
[release-branch.go1.18] 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?)

For #51670
Fixes #52878

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>
(cherry picked from commit 41a82aa9c36bffab2593d50aa55a462fef4e5bd4)
Reviewed-on: https://go-review.googlesource.com/c/go/+/406074
Reviewed-by: Alex Rakoczy <alex@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/text/template/parse/parse.go
src/text/template/parse/parse_test.go