Skip to content

Fixes 67 Relative Markdown Link Relative Root

Fixes relative markdown link under RAILS_RELATIVE_URL_ROOT

Under RAILS_RELATIVE_URL_ROOT, relative links are broken since they omits the relative root. I.E.

[some link](my_resource.md)

would points to http(s)+://hostname/namespace/project/my_resource.md instead of http(s)+://hostname/relative_root/namespace/project/my_resource.md

The proposed patch fixes this issue, and works in the case where Gitlab.config.gitlab.relative_url_root is either :

  • '/foo'
  • 'foo'
  • ''
  • nil

Merge request reports