Skip to content

Relation Paths in Orgmode don't get the Src Prefix #29668

Closed
@ankitrgadiya

Description

@ankitrgadiya

Description

In the Orgmode file, internal links to some other file in the repository are not rendered with the src link (/src/branch-name/tree-path) causing the links to break.

I was able to reproduce it on Demo instance. This is the link to the repository.
https://try.gitea.io/ankitrgadiya/org-links-bug/src/branch/main

It looks like this is happening because the SrcLink is not appended in the Base path. This is the code for Link Rendering in Markdown.

https://github.com/go-gitea/gitea/blob/main/modules/markup/markdown/goldmark.go#L133-L138

Versus, this is the code for Link Rendering in Orgmode.

https://github.com/go-gitea/gitea/blob/main/modules/markup/orgmode/orgmode.go#L145-L148

Gitea Version

v1.21.7

Can you reproduce the bug on the Gitea demo site?

Yes

Log Gist

No response

Screenshots

Screenshot from 2024-03-08 18-58-21

Screenshot from 2024-03-08 18-58-26

Git Version

2.40.1

Operating System

Debian GNU/Linux 12

How are you running Gitea?

I'm using the official Docker Image and running Gitea using Docker Compose.

Database

SQLite

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions