Autolinking commit hashes might break some links #2411

Closed
opened 2025-11-02 04:35:07 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @vbrandl on GitHub (Oct 15, 2018).

Description

When posting a link, that ends in something that could be a commit hash, the auto linking feature for commit hashes breaks the actual link. I tried with the link github.com/schemaorg/schemaorg/issues/1912#issuecomment-429827337 but Gitea will detect it as github.com/schemaorg/schemaorg/issues/1912#issuecomment, - and https://[gitea instance]/[user]/[repo]/commit/429827337. An example of this can be seen in https://try.gitea.io/foobar19/foobar-repo/issues/1.

This only happens for auto detected links. Using the Markdown link syntax []() produces a correct link.

Originally created by @vbrandl on GitHub (Oct 15, 2018). - Gitea version (or commit ref): 4090204 - Can you reproduce the bug at https://try.gitea.io: - [x] Yes https://try.gitea.io/foobar19/foobar-repo/issues/1 - [ ] No - [ ] Not relevant ## Description When posting a link, that ends in something that could be a commit hash, the auto linking feature for commit hashes breaks the actual link. I tried with the link [github.com/schemaorg/schemaorg/issues/1912#issuecomment-429827337](https://github.com/schemaorg/schemaorg/issues/1912#issuecomment-429827337) but Gitea will detect it as [github.com/schemaorg/schemaorg/issues/1912#issuecomment](https://github.com/schemaorg/schemaorg/issues/1912#issuecomment), `-` and [https://[gitea instance]/[user]/[repo]/commit/429827337](https://try.gitea.io/foobar19/foobar-repo/commit/429827337). An example of this can be seen in https://try.gitea.io/foobar19/foobar-repo/issues/1. This only happens for auto detected links. Using the Markdown link syntax `[]()` produces a correct link.
GiteaMirror added the issue/duplicate label 2025-11-02 04:35:07 -06:00
Author
Owner

@lunny commented on GitHub (Oct 15, 2018):

duplicated with #5047

@lunny commented on GitHub (Oct 15, 2018): duplicated with #5047
Author
Owner

@ghost commented on GitHub (Oct 16, 2018):

ditto with #4435

@ghost commented on GitHub (Oct 16, 2018): ditto with #4435
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#2411