Skip to content

Fix markdown URL parsing for commit ID #30812

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
May 4, 2024

Conversation

wxiaoguang
Copy link
Contributor

Add some new tests

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label May 2, 2024
@github-actions github-actions bot added the modifies/go Pull requests that update Go code label May 2, 2024
@wxiaoguang wxiaoguang added type/bug backport/v1.22 This PR should be backported to Gitea 1.22 and removed modifies/go Pull requests that update Go code labels May 2, 2024
@wxiaoguang wxiaoguang force-pushed the fix-any-hash-parse branch from d6caea7 to 4a11446 Compare May 2, 2024 02:15
@github-actions github-actions bot added the modifies/go Pull requests that update Go code label May 2, 2024
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels May 2, 2024
@wxiaoguang wxiaoguang marked this pull request as draft May 2, 2024 04:49
@wxiaoguang wxiaoguang changed the title Fix markdown URL parsing for commit ID WIP: Fix markdown URL parsing for commit ID May 2, 2024
@wxiaoguang wxiaoguang force-pushed the fix-any-hash-parse branch 3 times, most recently from 8646d5d to 9147828 Compare May 2, 2024 05:26
@wxiaoguang wxiaoguang changed the title WIP: Fix markdown URL parsing for commit ID Fix markdown URL parsing for commit ID May 2, 2024
@wxiaoguang wxiaoguang marked this pull request as ready for review May 2, 2024 05:27
@wxiaoguang wxiaoguang marked this pull request as draft May 2, 2024 05:36
@wxiaoguang wxiaoguang force-pushed the fix-any-hash-parse branch from 9147828 to 86abfdc Compare May 2, 2024 05:39
@wxiaoguang wxiaoguang marked this pull request as ready for review May 2, 2024 07:18
Comment on lines +431 to +434
"http://a/b/c/d/e/1234567812345678123456781234567812345678123456781234567812345678/sub.": {
CommitID: "1234567812345678123456781234567812345678123456781234567812345678",
SubPath: "/sub",
},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fails with nodes ending with a dot but the ending of a sentence is more likely.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The behavior is kept from old code, I did some rewriting to make the code clearer and added this test 😁

image

@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 May 3, 2024
@KN4CK3R KN4CK3R added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label May 3, 2024
@wxiaoguang wxiaoguang merged commit c7bb3aa into go-gitea:main May 4, 2024
26 checks passed
@GiteaBot GiteaBot added this to the 1.23.0 milestone May 4, 2024
@wxiaoguang wxiaoguang deleted the fix-any-hash-parse branch May 4, 2024 01:48
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request May 4, 2024
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label May 4, 2024
@GiteaBot GiteaBot added the backport/done All backports for this PR have been created label May 4, 2024
wxiaoguang added a commit that referenced this pull request May 4, 2024
zjjhot added a commit to zjjhot/gitea that referenced this pull request May 4, 2024
* giteaofficial/main:
  Update README.md (go-gitea#30856)
  Fix markdown URL parsing for commit ID (go-gitea#30812)
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created backport/v1.22 This PR should be backported to Gitea 1.22 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/go Pull requests that update Go code type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants