Closed
Description
- Gitea version (or commit ref): 1.11.0+rc2-8-g4b11f967b
- Git version: 2.25.0
- Operating system: Debian Sid/Unstable
- Database (use
[x]
):- PostgreSQL
- MySQL
- MSSQL
- SQLite
- Can you reproduce the bug at https://try.gitea.io:
- Yes (https://try.gitea.io/testuser78944/test-markdown/src/branch/master/a/doc.md)
- No
- Not relevant
- Log gist:
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).