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

Links in Markdown files are not evaluated relative to the (relevant / main) branch #28904

Closed
MGChecker opened this issue Jan 23, 2024 · 7 comments · Fixed by #28909
Closed

Links in Markdown files are not evaluated relative to the (relevant / main) branch #28904

MGChecker opened this issue Jan 23, 2024 · 7 comments · Fixed by #28909
Assignees
Labels

Comments

@MGChecker
Copy link

Description

If, for example in your README, you have a link on some other files in the repository, they are not relative to the current branch. I.e. doc/test.md and /doc/test.md do not link to https://try.gitea.io/MGChecker/READMEsrc/branch/main/doc/test.md , but to https://try.gitea.io/MGChecker/README/doc/test.md . This is a regression, this worked a few months ago.
See https://try.gitea.io/MGChecker/README/src/branch/main

Gitea Version

1.21.4

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

No response

Git Version

No response

Operating System

No response

How are you running Gitea?

From your downloads, but not relevant

Database

None

@MGChecker MGChecker changed the title Links in iss Links in Markdown files are not evaluated relative to the (relevant / main) branch Jan 23, 2024
@MGChecker
Copy link
Author

It seems plausible that this bug was introduced in #26745.

@camlafit
Copy link
Contributor

Hello

I confirm this regression, we have same trouble.

Thanks

@r10r
Copy link

r10r commented Jan 25, 2024

I have deployed a custom build based on v1.21.4 with #28909 cherry-picked and this fixes the issue for us. It would be really great if the backport of the fix can make it into v1.21.5.

KN4CK3R added a commit that referenced this issue Jan 25, 2024
GiteaBot added a commit to GiteaBot/gitea that referenced this issue Jan 25, 2024
@KN4CK3R
Copy link
Member

KN4CK3R commented Jan 25, 2024

Fix will be in 1.24.5 (#28922)

KN4CK3R added a commit that referenced this issue Jan 25, 2024
@r10r
Copy link

r10r commented Jan 25, 2024

Fix will be in 1.24.5 (#28922)

I wrote v1.24.5 - but it should be v1.21.5 😆

@KN4CK3R
Copy link
Member

KN4CK3R commented Jan 25, 2024

I'm sure the statement is still valid... 😏

henrygoodman pushed a commit to henrygoodman/gitea that referenced this issue Jan 31, 2024
silverwind pushed a commit to silverwind/gitea that referenced this issue Feb 20, 2024
Copy link

Automatically locked because of our CONTRIBUTING guidelines

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants