diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-04-21 10:17:19 -0500 |
---|---|---|
committer | Toon Claes <toon@gitlab.com> | 2017-04-27 13:22:17 +0200 |
commit | 4f2d6b3e21911ab29ae18dff1be909d94f3127ed (patch) | |
tree | ea7186401f4b0fa02970c55f788b1dabeb2a247a /app/views | |
parent | 05e0f504530a162d4bcb886adf504c12cffd5934 (diff) | |
download | gitlab-ce-4f2d6b3e21911ab29ae18dff1be909d94f3127ed.tar.gz |
Refactor MarkupHelper
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/projects/_readme.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/blob/_markup.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/blob/preview.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/tree/_readme.html.haml | 2 | ||||
-rw-r--r-- | app/views/search/results/_snippet_blob.html.haml | 2 | ||||
-rw-r--r-- | app/views/shared/snippets/_blob.html.haml | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/app/views/projects/_readme.html.haml b/app/views/projects/_readme.html.haml index b4615e084e0..c0d12cbc66e 100644 --- a/app/views/projects/_readme.html.haml +++ b/app/views/projects/_readme.html.haml @@ -4,7 +4,7 @@ - if can?(current_user, :push_code, @project) = link_to icon('pencil'), namespace_project_edit_blob_path(@project.namespace, @project, tree_join(@repository.root_ref, readme.name)), class: 'light edit-project-readme' .file-content.wiki - = markup_postprocess(@repository.rendered_readme) + = markup(readme.name, readme.data, rendered: @repository.rendered_readme) - else .row-content-block.second-block.center %h3.page-title diff --git a/app/views/projects/blob/_markup.html.haml b/app/views/projects/blob/_markup.html.haml index 4ee4b03ff04..0090f7a11df 100644 --- a/app/views/projects/blob/_markup.html.haml +++ b/app/views/projects/blob/_markup.html.haml @@ -1,4 +1,4 @@ - blob.load_all_data!(@repository) .file-content.wiki - = render_markup(blob.name, blob.data) + = markup(blob.name, blob.data) diff --git a/app/views/projects/blob/preview.html.haml b/app/views/projects/blob/preview.html.haml index 5cafb644b40..fb46ccc7933 100644 --- a/app/views/projects/blob/preview.html.haml +++ b/app/views/projects/blob/preview.html.haml @@ -6,7 +6,7 @@ = markdown(@content) - elsif markup?(@blob.name) .file-content.wiki - = raw render_markup(@blob.name, @content) + = raw markup(@blob.name, @content) - else .file-content.code.js-syntax-highlight - unless @diff_lines.empty? diff --git a/app/views/projects/tree/_readme.html.haml b/app/views/projects/tree/_readme.html.haml index 30df6fd50d0..01599060844 100644 --- a/app/views/projects/tree/_readme.html.haml +++ b/app/views/projects/tree/_readme.html.haml @@ -5,4 +5,4 @@ %strong = readme.name .file-content.wiki - = render_markup(readme.name, readme.data) + = markup(readme.name, readme.data) diff --git a/app/views/search/results/_snippet_blob.html.haml b/app/views/search/results/_snippet_blob.html.haml index f84be600df8..f2fe5742c12 100644 --- a/app/views/search/results/_snippet_blob.html.haml +++ b/app/views/search/results/_snippet_blob.html.haml @@ -21,7 +21,7 @@ .file-content.wiki - snippet_chunks.each do |chunk| - unless chunk[:data].empty? - = render_markup(snippet.file_name, chunk[:data]) + = markup(snippet.file_name, chunk[:data]) - else .file-content.code .nothing-here-block Empty file diff --git a/app/views/shared/snippets/_blob.html.haml b/app/views/shared/snippets/_blob.html.haml index 74f71e6cbd1..895c3f1e99d 100644 --- a/app/views/shared/snippets/_blob.html.haml +++ b/app/views/shared/snippets/_blob.html.haml @@ -24,6 +24,6 @@ - if gitlab_markdown?(@snippet.file_name) = preserve(markdown_field(@snippet, :content)) - else - = render_markup(@snippet.file_name, @snippet.content) + = markup(@snippet.file_name, @snippet.content) - else = render 'shared/file_highlight', blob: @snippet |