Cross reference doesn't render as a link if followed by punctuation signs (colon, semicolon, question, ...) #4757

Closed
opened 2025-11-02 06:01:59 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @InExtremaRes on GitHub (Jan 30, 2020).

Description

When a message references another issue with #number syntax the reference doesn't show as a link if there is a colon, semicolon, question sign or others punctuation signs just after it. I didn't test more but I thinks these are very common and should be supported.

Screenshots

image

Originally created by @InExtremaRes on GitHub (Jan 30, 2020). <!-- 1. Please speak English, this is the language all maintainers can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/gitea) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): 1.12.0+dev-220-gd7f4f87aa (current at try.gitea.io) - Git version: - Operating system: - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [x] Yes https://try.gitea.io/inextremares/testing/issues/5 - [ ] No - [ ] Not relevant - Log gist: ## Description When a message references another issue with `#number` syntax the reference doesn't show as a link if there is a colon, semicolon, question sign or others punctuation signs just after it. I didn't test more but I thinks these are very common and should be supported. ## Screenshots ![image](https://user-images.githubusercontent.com/1635491/73452003-bb293380-4347-11ea-991e-cb5caf65356f.png)
Author
Owner

@guillep2k commented on GitHub (Jan 31, 2020):

For context, this was enabled for mentions (@user) in #8889, but there was no discussion about what characters are allowed following an issue or pr reference. It's tricky business because issue references can take a lot of shapes. For simple numeric references, currently only ), ], : and . are supported; the latter only if it's immediately followed by space or EOL. I think ; and , could follow the same rule as well.

@guillep2k commented on GitHub (Jan 31, 2020): For context, this was enabled for mentions (`@user`) in #8889, but there was no discussion about what characters are allowed following an issue or pr reference. It's tricky business because issue references can take [a lot of shapes](https://docs.gitea.io/en-us/automatically-linked-references/#issues-and-pull-requests-references-summary). For simple numeric references, currently only `)`, `]`, `:` and `.` are supported; the latter only if it's immediately followed by space or EOL. I think `;` and `,` could follow the same rule as well.
Author
Owner

@InExtremaRes commented on GitHub (Jan 31, 2020):

Yes, you're right that it's tricky. Support for ; and , with the same rules that : and . would be great.

Can ? and ! be supported as well? I think if the rule is the same (space or EOL immediately after) then it isn't ambiguous, but I can say nothing about the troubles to implement that.

@InExtremaRes commented on GitHub (Jan 31, 2020): Yes, you're right that it's tricky. Support for `;` and `,` with the same rules that `:` and `.` would be great. Can `?` and `!` be supported as well? I think if the rule is the same (space or EOL immediately after) then it isn't ambiguous, but I can say nothing about the troubles to implement that.
Author
Owner

@guillep2k commented on GitHub (Feb 1, 2020):

This can be closed as per #10091

@guillep2k commented on GitHub (Feb 1, 2020): This can be closed as per #10091
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#4757