Cross-repo commit reference gobbles up whitespace #10183

Closed
opened 2025-11-02 09:00:28 -06:00 by GiteaMirror · 0 comments
Owner

Originally created by @drsybren on GitHub (Jan 30, 2023).

Description

#22645 introduced cross-repository commit links. However, it has a bug in that whitespace around the reference is not rendered.

This input:

This issue was referenced by archive/flamenco-manager@a6e5900f0982217a7767b1ef1b42e49a4c29db01 at some point

Produces this output:

<p>This issue was referenced by<a href="/archive/flamenco-manager/commit/a6e5900f0982217a7767b1ef1b42e49a4c29db01" rel="nofollow">archive/flamenco-manager@a6e5900f09</a>at some point</p>

As you can see, there should be a space between by<a and also between </a>at.

Gitea Version

1b53a9e914

Can you reproduce the bug on the Gitea demo site?

No, demo site is too old, doesn't have this feature yet. If it gets upgraded, then check https://try.gitea.io/drSybren/demo/issues/2

Screenshots

image

How are you running Gitea?

Self-built from Git.

Originally created by @drsybren on GitHub (Jan 30, 2023). ### Description #22645 introduced cross-repository commit links. However, it has a bug in that whitespace around the reference is not rendered. This input: ```markdown This issue was referenced by archive/flamenco-manager@a6e5900f0982217a7767b1ef1b42e49a4c29db01 at some point ``` Produces this output: ```html <p>This issue was referenced by<a href="/archive/flamenco-manager/commit/a6e5900f0982217a7767b1ef1b42e49a4c29db01" rel="nofollow">archive/flamenco-manager@a6e5900f09</a>at some point</p> ``` As you can see, there should be a space between `by<a` and also between `</a>at`. ### Gitea Version 1b53a9e91401c931065949981d02e06bbcd745ef ### Can you reproduce the bug on the Gitea demo site? No, demo site is too old, doesn't have this feature yet. If it gets upgraded, then check https://try.gitea.io/drSybren/demo/issues/2 ### Screenshots ![image](https://user-images.githubusercontent.com/122987084/215476707-3aa899f8-2e33-4866-96da-ec9b2c2a70c9.png) ### How are you running Gitea? Self-built from Git.
GiteaMirror added the issue/confirmedtype/bug labels 2025-11-02 09:00:28 -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#10183