summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorSaito <saitowu@gmail.com>2011-12-13 19:25:58 +0800
committerSaito <saitowu@gmail.com>2011-12-13 19:25:58 +0800
commit713802fdf317593f1201cf5dd4c34238ffccca0a (patch)
tree5188d52145355dcfed073cd85ee73723984fa220 /app
parent3dc94ba8eb74caa6f4eae29970fe261f51e1942e (diff)
downloadgitlab-ce-713802fdf317593f1201cf5dd4c34238ffccca0a.tar.gz
add plain text support,keep markdown and plain text in readme
Diffstat (limited to 'app')
-rw-r--r--app/views/refs/_tree.html.haml7
1 files changed, 5 insertions, 2 deletions
diff --git a/app/views/refs/_tree.html.haml b/app/views/refs/_tree.html.haml
index 0c44df58948..07bab2129dc 100644
--- a/app/views/refs/_tree.html.haml
+++ b/app/views/refs/_tree.html.haml
@@ -35,11 +35,14 @@
- contents.select{ |i| i.is_a?(Grit::Blob)}.each do |content|
= render :partial => "refs/tree_item", :locals => { :content => content }
- - if content = contents.select{ |c| c.is_a?(Grit::Blob) and c.name =~ /^readme\.(md|markdown)$/i }.first
+ - if content = contents.select{ |c| c.is_a?(Grit::Blob) and c.name =~ /^readme/i }.first
#tree-readme-holder
%h3= content.name
.readme
- = markdown(encode content.data)
+ - if content.name =~ /\.(md|markdown)$/i
+ = markdown(encode content.data)
+ - else
+ = simple_format(encode content.data)
:javascript
$(function(){