Links in markdown should be absolute to the repository not the server #15088

Merged
lunny merged 6 commits from fix-15075-fix-reference-link-relative-paths into master 2021-04-10 16:26:28 +00:00
Contributor

Currently Gitea will render links like:

![/capybara.jpg/capybara-train.jpg](/capybara.jpg/capybara-train.jpg)
![capybara][capybara-train-jpg]

  [capybara-train-jpg]: /capybara.jpg/capybara-train.jpg

as being absolute with respect to the server when they should be relative to the repository prefix in order to be github compatible.

Fix #15075

⚠️ BREAKING ⚠️

This represents a change in the rendering of these links - however, it makes them match Github so the previous behaviour was a bug.

Signed-off-by: Andrew Thornton art27@cantab.net

Currently Gitea will render links like: ``` ![/capybara.jpg/capybara-train.jpg](/capybara.jpg/capybara-train.jpg) ![capybara][capybara-train-jpg] [capybara-train-jpg]: /capybara.jpg/capybara-train.jpg ``` as being absolute with respect to the server when they should be relative to the repository prefix in order to be github compatible. Fix #15075 ## :warning: BREAKING :warning: This represents a change in the rendering of these links - however, it makes them match Github so the previous behaviour was a bug. Signed-off-by: Andrew Thornton <art27@cantab.net>
6543 (Migrated from github.com) approved these changes 2021-04-10 12:47:22 +00:00
silverwind (Migrated from github.com) approved these changes 2021-04-10 16:25:35 +00:00
This repo is archived. You cannot comment on pull requests.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: lunny/gitea#15088
No description provided.