diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2016-02-01 11:07:59 -0500 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-02-12 17:20:59 +0100 |
commit | e919b5a4e9dd5e09628daf28b7b96424b764863b (patch) | |
tree | 0557a7a903b32becc1772f5bcf22e993d648b163 /app/helpers/gitlab_markdown_helper.rb | |
parent | 0d866d89ec26bf05f2777ac5e5cb3f23f90f0a8c (diff) | |
download | gitlab-ce-e919b5a4e9dd5e09628daf28b7b96424b764863b.tar.gz |
Fix relative links in other markup formatsben.boeckel/gitlab-ce-fixup-links-in-generic-docs
- Apply the RelativeLinkFilter filter to other formats, e.g.,
reStructuredText so links from the Files view or the Project view work
- Remove the AsciidocPipeline pipeline
Fixes #3533.
Diffstat (limited to 'app/helpers/gitlab_markdown_helper.rb')
-rw-r--r-- | app/helpers/gitlab_markdown_helper.rb | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/helpers/gitlab_markdown_helper.rb b/app/helpers/gitlab_markdown_helper.rb index 1a226252251..89d2a648494 100644 --- a/app/helpers/gitlab_markdown_helper.rb +++ b/app/helpers/gitlab_markdown_helper.rb @@ -78,6 +78,21 @@ module GitlabMarkdownHelper ) end + def other_markup(file_name, text) + Gitlab::OtherMarkup.render( + file_name, + text, + project: @project, + current_user: (current_user if defined?(current_user)), + + # RelativeLinkFilter + project_wiki: @project_wiki, + requested_path: @path, + ref: @ref, + commit: @commit + ) + end + # Return the first line of +text+, up to +max_chars+, after parsing the line # as Markdown. HTML tags in the parsed output are not counted toward the # +max_chars+ limit. If the length limit falls within a tag's contents, then |