Skip to content

Relative links broken in preview mode #10131

Closed
@jdesgats

Description

@jdesgats

Description

When editing Markdown, links to other files in the repo are relative to the location of the file. However, when previewing changes, the rendered preview seem to render links from the repository root.

In the linked example, the link works as expected and links to https://try.gitea.io/testuser78944/test-markdown/src/branch/master/a/b/other.md. But try to edit the file and enable the preview mode: the link will be to https://try.gitea.io/testuser78944/test-markdown/src/branch/master/b/other.md instead (the a/ part for the relative link is stripped).

Screenshots

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    issue/confirmedIssue has been reviewed and confirmed to be present or accepted to be implementedtype/bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions