Links for commit hashes ending in comma are not rendered #6617

Closed
opened 2025-11-02 07:01:36 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @nuno-silva on GitHub (Jan 3, 2021).

Description

When leaving an issue comment containing valid commit hashes, those are not recognised if they are followed by a comma (,).
A workaround is to leave a space between the hash and the comma, but you need to remember to do it when writing the comment or go back and edit it after noticing the commit link was not rendered.
Dots are accepted though. See the screenshot for reference.

Unless there was a specific reason for not accepting commas, this is an easy fix.
I will prepare a pull request in a bit.

Screenshots

raw text rendered text

Originally created by @nuno-silva on GitHub (Jan 3, 2021). - Gitea version (or commit ref): 1.14.0+dev-499-g7576e37a6 - Git version: NA - Operating system: NA - Database: NA - Can you reproduce the bug at https://try.gitea.io: - [x] Yes https://try.gitea.io/nuno-silva/test/issues/8 - [ ] No ## Description When leaving an issue comment containing valid commit hashes, those are not recognised if they are followed by a comma (`,`). A workaround is to leave a space between the hash and the comma, but you need to remember to do it when writing the comment or go back and edit it after noticing the commit link was not rendered. Dots are accepted though. See the screenshot for reference. Unless there was a specific reason for not accepting commas, this is an easy fix. I will prepare a pull request in a bit. ## Screenshots ![raw text](https://user-images.githubusercontent.com/6935057/103478597-abb83300-4dbf-11eb-93f1-6d45764e1ef3.png) ![rendered text](https://user-images.githubusercontent.com/6935057/103478468-d48bf880-4dbe-11eb-9cb8-0857259b8965.png)
GiteaMirror added the type/bug label 2025-11-02 07:01:36 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#6617