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

Do not render truncated links in markdown #32980

Merged
merged 1 commit into from
Dec 25, 2024

Conversation

wxiaoguang
Copy link
Contributor

@wxiaoguang wxiaoguang commented Dec 25, 2024

No description provided.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Dec 25, 2024
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Dec 25, 2024
@github-actions github-actions bot added the modifies/go Pull requests that update Go code label Dec 25, 2024
@wxiaoguang wxiaoguang added type/bug backport/v1.23 This PR should be backported to Gitea 1.23 labels Dec 25, 2024
@wxiaoguang wxiaoguang added this to the 1.24.0 milestone Dec 25, 2024
@@ -14,6 +14,10 @@ const (
asciiEllipsis = "..."
)

func IsLikelySplitLeftPart(s string) bool {
Copy link
Member

Choose a reason for hiding this comment

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

IsLikelyTruncated?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Nope, "Truncated" doesn't have such "..."

It matches the original function below "SplitStringAtByteN"

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we can refactor these "truncate" related function in the future together, while keep this PR simple to backport

Copy link
Contributor Author

Choose a reason for hiding this comment

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

-> Refactor "string truncate" #32984

@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 Dec 25, 2024
@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 Dec 25, 2024
@wxiaoguang wxiaoguang merged commit 594edad into go-gitea:main Dec 25, 2024
26 checks passed
@wxiaoguang wxiaoguang deleted the fix-link-truncate branch December 25, 2024 16:33
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request Dec 25, 2024
@GiteaBot GiteaBot added the backport/done All backports for this PR have been created label Dec 25, 2024
wxiaoguang added a commit that referenced this pull request Dec 25, 2024
zjjhot added a commit to zjjhot/gitea that referenced this pull request Dec 26, 2024
* giteaofficial/main:
  Do not render truncated links in markdown (go-gitea#32980)
  Use `CloseIssue` and `ReopenIssue` instead of `ChangeStatus` (go-gitea#32467)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/done All backports for this PR have been created backport/v1.23 This PR should be backported to Gitea 1.23 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 size/M Denotes a PR that changes 30-99 lines, ignoring generated files. type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants