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

Cross-repo commit reference gobbles up whitespace #22666

Closed
drsybren opened this issue Jan 30, 2023 · 0 comments · Fixed by #22672
Closed

Cross-repo commit reference gobbles up whitespace #22666

drsybren opened this issue Jan 30, 2023 · 0 comments · Fixed by #22672
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/bug

Comments

@drsybren
Copy link
Contributor

drsybren commented 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

1b53a9e

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.

@yardenshoham yardenshoham added the issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented label Jan 30, 2023
KN4CK3R added a commit that referenced this issue Jan 31, 2023
Fixes #22666 (Replace #22668)

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
Co-authored-by: zeripath <art27@cantab.net>
@go-gitea go-gitea locked and limited conversation to collaborators May 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
issue/confirmed Issue has been reviewed and confirmed to be present or accepted to be implemented type/bug
Projects
None yet
2 participants