diff options
author | Robert Schilling <rschilling@student.tugraz.at> | 2014-08-11 08:50:56 +0200 |
---|---|---|
committer | Robert Schilling <rschilling@student.tugraz.at> | 2014-08-11 08:50:56 +0200 |
commit | 99eb283101108f1f95e95ade8c1352f547578b26 (patch) | |
tree | ed682bc2303d6862af4f2dbd5dd764d7c1e36f31 /app/views/projects | |
parent | 0e3f8ea2ef2a7d6cc51ccb5d7ae854c6244b40eb (diff) | |
download | gitlab-ce-99eb283101108f1f95e95ade8c1352f547578b26.tar.gz |
Use readme we support to render if there are multiple readmes
Diffstat (limited to 'app/views/projects')
-rw-r--r-- | app/views/projects/blob/_text.html.haml | 4 | ||||
-rw-r--r-- | app/views/projects/edit_tree/preview.html.haml | 4 | ||||
-rw-r--r-- | app/views/projects/tree/_readme.html.haml | 8 |
3 files changed, 5 insertions, 11 deletions
diff --git a/app/views/projects/blob/_text.html.haml b/app/views/projects/blob/_text.html.haml index 7cbea7c3eb6..fb6af1127f8 100644 --- a/app/views/projects/blob/_text.html.haml +++ b/app/views/projects/blob/_text.html.haml @@ -1,8 +1,8 @@ -- if gitlab_markdown?(blob.name) +- if Gitlab::MarkdownHelper.gitlab_markdown?(blob.name) .file-content.wiki = preserve do = markdown(blob.data) -- elsif markup?(blob.name) +- elsif Gitlab::MarkdownHelper.markup?(blob.name) .file-content.wiki = render_markup(blob.name, blob.data) - else diff --git a/app/views/projects/edit_tree/preview.html.haml b/app/views/projects/edit_tree/preview.html.haml index 340f68cc05c..65ceafbba86 100644 --- a/app/views/projects/edit_tree/preview.html.haml +++ b/app/views/projects/edit_tree/preview.html.haml @@ -1,10 +1,10 @@ .diff-file .diff-content - - if gitlab_markdown?(@blob.name) + - if Gitlab::MarkdownHelper.gitlab_markdown?(@blob.name) .file-content.wiki = preserve do = markdown(@content) - - elsif markup?(@blob.name) + - elsif Gitlab::MarkdownHelper.markup?(@blob.name) .file-content.wiki = raw GitHub::Markup.render(@blob.name, @content) - else diff --git a/app/views/projects/tree/_readme.html.haml b/app/views/projects/tree/_readme.html.haml index 6257ba8c09a..9d0292059d6 100644 --- a/app/views/projects/tree/_readme.html.haml +++ b/app/views/projects/tree/_readme.html.haml @@ -3,10 +3,4 @@ %i.icon-file = readme.name .wiki - - if gitlab_markdown?(readme.name) - = preserve do - = markdown(readme.data) - - elsif markup?(readme.name) - = render_markup(readme.name, readme.data) - - else - = simple_format(readme.data) + = render_readme(readme) |