Relative links to commits/artifacts/badges don't work in .md-files
Summary
Relative Links don't work properly in .md files. The current branch name gets inserted between the specified path and the root of the project (server/user/project
). Adding ../ in the beginning of the link doesn't solve this.
This might be because files belong to branch and 'static' content linke artifacts/link to commits/badges are not.
Steps to reproduce
- Let's take a link to the commits in master: commits on master
- When I copy this to a README.md file it results in the following: commits on master
http://exampleserver.com/user/project/branch/commits/master
Example Project
Markdown-Test includes an issue showing the correct behavior and a README.md file showing the bugged behavior.
What is the current bug behavior?
Clicking the link will result in a 404 error page.
What is the expected correct behavior?
Either the name of the branch name doesn't get inserted ot it is possible to reach the root of the project by adding ../ in the beginning of the link.
Output of checks
This bug happens on gitlab.com and on a selhosted GitLab which I unfortunately can't link here because a VPN is needed to access it. Since I don't have direct access to that server I cannot provide information about the environment but since it happens to gitlab.com as well I think that should be fine.