diff options
author | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2012-09-20 13:00:18 +0300 |
---|---|---|
committer | Dmitriy Zaporozhets <dzaporozhets@sphereconsultinginc.com> | 2012-09-20 13:00:18 +0300 |
commit | 0e524aaea1a98e5f1dff7f7370838116da5ba6f0 (patch) | |
tree | ac65138f13190f1a11c26c64a5fd798b1a31899e /app/views | |
parent | ed899a2f4b50b4370feeea94676502b42383c746 (diff) | |
download | gitlab-ce-0e524aaea1a98e5f1dff7f7370838116da5ba6f0.tar.gz |
Added workaround for github-markup issue with rendering markdown
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/refs/_tree.html.haml | 6 | ||||
-rw-r--r-- | app/views/refs/_tree_file.html.haml | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/app/views/refs/_tree.html.haml b/app/views/refs/_tree.html.haml index ec6dba4ee07..55078718b79 100644 --- a/app/views/refs/_tree.html.haml +++ b/app/views/refs/_tree.html.haml @@ -43,7 +43,11 @@ %i.icon-file = content.name .file_content.wiki - = raw GitHub::Markup.render(content.name, content.data) + - if gitlab_markdown?(content.name) + = preserve do + = markdown(content.data) + - else + = raw GitHub::Markup.render(content.name, content.data) :javascript $(function(){ diff --git a/app/views/refs/_tree_file.html.haml b/app/views/refs/_tree_file.html.haml index f6566ccf5d5..76173e24246 100644 --- a/app/views/refs/_tree_file.html.haml +++ b/app/views/refs/_tree_file.html.haml @@ -9,7 +9,11 @@ = link_to "history", project_commits_path(@project, path: params[:path], ref: @ref), class: "btn very_small" = link_to "blame", blame_file_project_ref_path(@project, @ref, path: params[:path]), class: "btn very_small" - if file.text? - - if markup?(name) + - if gitlab_markdown?(name) + .file_content.wiki + = preserve do + = markdown(file.data) + - elsif markup?(name) .file_content.wiki = raw GitHub::Markup.render(name, file.data) - else |