Skip to content

Make Clone in VSCode link get updated correctly (#21225) #21226

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

Merged
merged 5 commits into from
Sep 23, 2022

Conversation

wxiaoguang
Copy link
Contributor

@wxiaoguang wxiaoguang commented Sep 21, 2022

Backport #21225, fix for #21128 (also in 1.17.3), close #21224

The indent was incorrect before, so this PR did some formatting work.

Bypass Golang's template bug for JS string interpolation. And since there are JS lint rules for templates, so the string interpolation is also a must.

Compare with ignoring white spaces

@wxiaoguang wxiaoguang added type/bug skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. labels Sep 21, 2022
@wxiaoguang wxiaoguang added this to the 1.17.3 milestone Sep 21, 2022
@wxiaoguang wxiaoguang linked an issue Sep 22, 2022 that may be closed by this pull request
@lunny lunny requested review from silverwind and wolfogre and removed request for silverwind September 22, 2022 03:34
@GiteaBot GiteaBot added the lgtm/need 1 This PR needs approval from one additional maintainer to be merged. label Sep 22, 2022
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Sep 22, 2022
@silverwind
Copy link
Member

Any reference to mentioned Golang bug?

@wxiaoguang
Copy link
Contributor Author

Any reference to mentioned Golang bug?

Now here it is: https://github.com/golang/go/issues/55341

@silverwind
Copy link
Member

Thanks, we should definitely remove this script and move this localStorage setting to backend database, then we will no longer need inline scripts and the headaches they bring.

@tyroneyeh
Copy link
Contributor

If it's a go bug, why is there no problem with v1.18?

@wxiaoguang
Copy link
Contributor Author

If it's a go bug, why is there no problem with v1.18?

Because Gitea 1.18 doesn't use string interpolation, there is no lint rule for templates, and the code has been tested carefully.

But when it's backported to 1.17-dev, the lint rule in 1.17 forced to use string interpolation, then no one tested it, then bug occurs.

@wxiaoguang wxiaoguang merged commit be5411d into go-gitea:release/v1.17 Sep 23, 2022
@wxiaoguang wxiaoguang deleted the backport-clone-vsc branch September 23, 2022 04:10
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The js-clone-url-vsc element is located below the script
6 participants