summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2017-04-26 23:16:59 +0200
committerToon Claes <toon@gitlab.com>2017-04-27 13:22:18 +0200
commitc398f40e5fa5d580e66b07862eceb18e783b13cc (patch)
tree7b15bfac2d506c7f889fa23ce70cd302b73e54fd /app
parent35fd7e6c530fc4f6b0a11814652962ffb2beedb5 (diff)
downloadgitlab-ce-c398f40e5fa5d580e66b07862eceb18e783b13cc.tar.gz
Remove superfluous if/else branching26585-remove-readme-view-caching
The `MarkupHelper#markup` method does everything we need here.
Diffstat (limited to 'app')
-rw-r--r--app/views/projects/blob/preview.html.haml8
1 files changed, 2 insertions, 6 deletions
diff --git a/app/views/projects/blob/preview.html.haml b/app/views/projects/blob/preview.html.haml
index fb46ccc7933..e87b73c9a34 100644
--- a/app/views/projects/blob/preview.html.haml
+++ b/app/views/projects/blob/preview.html.haml
@@ -1,12 +1,8 @@
.diff-file
.diff-content
- - if gitlab_markdown?(@blob.name)
+ - if markup?(@blob.name)
.file-content.wiki
- = preserve do
- = markdown(@content)
- - elsif markup?(@blob.name)
- .file-content.wiki
- = raw markup(@blob.name, @content)
+ = markup(@blob.name, @content)
- else
.file-content.code.js-syntax-highlight
- unless @diff_lines.empty?