summaryrefslogtreecommitdiff
path: root/app/views/projects/_readme.html.haml
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2017-04-06 16:47:52 +0200
committerToon Claes <toon@gitlab.com>2017-04-27 13:22:17 +0200
commit05e0f504530a162d4bcb886adf504c12cffd5934 (patch)
treeaeece92fb84421062c919e0c63173718db3577ba /app/views/projects/_readme.html.haml
parentef4d4446e957ecbb086859d96185a27af168d11c (diff)
downloadgitlab-ce-05e0f504530a162d4bcb886adf504c12cffd5934.tar.gz
Cache the rendered README, but post-process on show
Because the post-processing of the rendered README is dependent on the context (i.e. the current user), do the post-processing when the README is being displayed.
Diffstat (limited to 'app/views/projects/_readme.html.haml')
-rw-r--r--app/views/projects/_readme.html.haml3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/views/projects/_readme.html.haml b/app/views/projects/_readme.html.haml
index b6fb08b68e9..b4615e084e0 100644
--- a/app/views/projects/_readme.html.haml
+++ b/app/views/projects/_readme.html.haml
@@ -4,8 +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
- = cache(readme_cache_key) do
- = render_readme(readme)
+ = markup_postprocess(@repository.rendered_readme)
- else
.row-content-block.second-block.center
%h3.page-title