Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

text/template: break/continue require no whitespace around them [1.18 backport] #52878

Closed
gopherbot opened this issue May 12, 2022 · 3 comments
Closed
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Milestone

Comments

@gopherbot
Copy link

@ianlancetaylor requested issue #51670 to be considered for backport to the next 1.18 minor release.

@gopherbot Please open a backport to 1.18.

These new text/template features are new in the 1.18 release, but they have a oddity in that don't permit whitespace. It's probably worth fixing that in 1.18 so that they people don't have to slightly contort their new code until 1.19 comes out.

@gopherbot gopherbot added the CherryPickCandidate Used during the release process for point releases label May 12, 2022
@gopherbot gopherbot added this to the Go1.18.3 milestone May 12, 2022
@gopherbot
Copy link
Author

Change https://go.dev/cl/406074 mentions this issue: [release-branch.go1.18] text/template/parse: allow space after continue or break

@toothrot toothrot added the CherryPickApproved Used during the release process for point releases label May 25, 2022
@toothrot
Copy link
Contributor

Approved. This is a serious issue with no workaround.

@gopherbot gopherbot removed the CherryPickCandidate Used during the release process for point releases label May 25, 2022
@gopherbot
Copy link
Author

Closed by merging a08baaa to release-branch.go1.18.

gopherbot pushed a commit that referenced this issue May 26, 2022
…ue 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 41a82aa)
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>
@golang golang locked and limited conversation to collaborators May 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
CherryPickApproved Used during the release process for point releases FrozenDueToAge
Projects
None yet
Development

No branches or pull requests

2 participants