diff options
author | khm <khm@sciops.net> | 2019-04-29 11:31:28 +0000 |
---|---|---|
committer | James Lopez <james@gitlab.com> | 2019-04-29 11:31:28 +0000 |
commit | 2f36efa0871b61df2aa5f8c7546ac95148ecf4de (patch) | |
tree | f99cb9317506812f4ccbd9a4ffa4a023c2505137 /app/views/search | |
parent | 33d5ec5b56b680f299ddd2b2f5bd666141eafefc (diff) | |
download | gitlab-ce-2f36efa0871b61df2aa5f8c7546ac95148ecf4de.tar.gz |
Fix links to wiki pages with subdirectories
This commit contains the patch suggested by @fjsanpedro in the issue
covering broken links in wiki search results.
Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/56234
Diffstat (limited to 'app/views/search')
-rw-r--r-- | app/views/search/results/_wiki_blob.html.haml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/search/results/_wiki_blob.html.haml b/app/views/search/results/_wiki_blob.html.haml index b351ecd4edf..5847751b268 100644 --- a/app/views/search/results/_wiki_blob.html.haml +++ b/app/views/search/results/_wiki_blob.html.haml @@ -1,5 +1,5 @@ - project = find_project_for_result_blob(projects, wiki_blob) - wiki_blob = parse_search_result(wiki_blob) -- wiki_blob_link = project_wiki_path(project, wiki_blob.basename) +- wiki_blob_link = project_wiki_path(project, Pathname.new(wiki_blob.filename).sub_ext('')) = render partial: 'search/results/blob_data', locals: { blob: wiki_blob, project: project, file_name: wiki_blob.filename, blob_link: wiki_blob_link } |