-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Auto generated URL of commit SHA references link to wrong address #6300
Comments
Thanks for the feedback!
Please do so. |
emm.... try.gogs.io has the same issue. |
i can't paste the screenshot, please visit https://try.gogs.io/liyuan/issues-6300 |
@liyuan-rey Thank you! Note: The correct link should be: -https://try.gogs.io/liyuan/issues-6300/src/master/commit/b5be65c1381188fb2f589504cafb115cdec6ab43
+https://try.gogs.io/liyuan/issues-6300/commit/b5be65c1381188fb2f589504cafb115cdec6ab43 I think the problem is here: gogs/internal/markup/markup.go Lines 142 to 150 in 23ff182
Where |
gogs/internal/route/repo/view.go Lines 85 to 101 in 23ff182
Not sure if changing line 90 to, p = markup.Markdown(p, c.Repo.RepoLink, c.Repo.Repository.ComposeMetas()) is a proper solution or if it will have any undesirable effect somewhere else. If it is the proper solution probably 93 should be changed too, p = markup.OrgMode(p, c.Repo.RepoLink, c.Repo.Repository.ComposeMetas()) |
@manfer Thanks for looking! I think relative links to a file will break, e.g. link to another Markdown, display an image. Another option seems achievable would be adding something like |
The patch will be included in 0.12.3. |
The 0.12.3 has been released. |
Describe the bug
Auto generated URL of commit SHA references in markdown link to wrong address
Gogs version and commit
Gogs 0.11.91.0811
Git version
Git 2.24.1.windows.2
Operating system
Windows 10 Home (Chinese) 19041.450
Database
Unknown
To Reproduce
Steps to reproduce the behavior:
Can you reproduce the bug at https://try.gogs.io?
No try yet
Expected behavior
A link with correct URL to commit SHA references.
Actual behavior
A link with wrong URL, unnecessary 'src/develop' path in the URL.
Screenshots
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: