Relative path in Org files does not link to raw files #5995

Closed
opened 2025-11-02 06:42:14 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @0Pranav on GitHub (Sep 14, 2020).

Description

In the example repo you can see org file in the master branch has the link https://try.gitea.io/0Pranav/vulkan-tutorial/src/branch/master/demo/vulkan.gif while in markdown the same link links to https://try.gitea.io/0Pranav/vulkan-tutorial/raw/branch/readme-test/demo/vulkan.gif, which results in the gif not being displayed in the org file

Screenshots

Markdown
Screenshot from 2020-09-14 10-49-32

Org
Screenshot from 2020-09-14 10-49-41

Originally created by @0Pranav on GitHub (Sep 14, 2020). - Gitea version (or commit ref): 1.12.4 - Git version: 2.25.1 - Operating system: Ubuntu Server 20.04 LTS - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [X] Yes (https://try.gitea.io/0Pranav/vulkan-tutorial/src/branch/master) - [ ] No - [ ] Not relevant - Log gist: ## Description In the example repo you can see org file in the master branch has the link https://try.gitea.io/0Pranav/vulkan-tutorial/src/branch/master/demo/vulkan.gif while in markdown the same link links to https://try.gitea.io/0Pranav/vulkan-tutorial/raw/branch/readme-test/demo/vulkan.gif, which results in the gif not being displayed in the org file ## Screenshots <!-- **If this issue involves the Web Interface, please include a screenshot** --> Markdown ![Screenshot from 2020-09-14 10-49-32](https://user-images.githubusercontent.com/6195660/93046666-09413c00-f678-11ea-8fe5-156cf3fe8674.png) Org ![Screenshot from 2020-09-14 10-49-41](https://user-images.githubusercontent.com/6195660/93046670-0b0aff80-f678-11ea-8bc2-88792e80e168.png)
GiteaMirror added the type/bug label 2025-11-02 06:42:14 -06:00
Author
Owner

@zeripath commented on GitHub (Sep 14, 2020):

OK the code that deals with orgmode is:

https://github.com/go-gitea/gitea/blob/master/modules/markup/orgmode/orgmode.go

Likely this code:

6a1a6332de/modules/markup/orgmode/orgmode.go (L77-L103)

Probably needs to have changed inspired by:

6a1a6332de/modules/markup/markdown/goldmark.go (L80-L110)

@zeripath commented on GitHub (Sep 14, 2020): OK the code that deals with orgmode is: https://github.com/go-gitea/gitea/blob/master/modules/markup/orgmode/orgmode.go Likely this code: https://github.com/go-gitea/gitea/blob/6a1a6332de5b5000d31ec26efaef6f78a4ee10f0/modules/markup/orgmode/orgmode.go#L77-L103 Probably needs to have changed inspired by: https://github.com/go-gitea/gitea/blob/6a1a6332de5b5000d31ec26efaef6f78a4ee10f0/modules/markup/markdown/goldmark.go#L80-L110
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5995