Use simple_format if we don't have a proper renderer

This commit is contained in:
Robert Schilling 2014-08-10 14:33:22 +02:00
parent 2fd30cc57f
commit 0e3f8ea2ef
2 changed files with 2 additions and 7 deletions

View File

@ -52,10 +52,6 @@ module TreeHelper
filename.downcase.end_with?(*%w(.mdown .md .markdown))
end
def plain_text_readme? filename
filename =~ /^README(.txt)?$/i
end
# Simple shortcut to File.join
def tree_join(*args)
File.join(*args)

View File

@ -6,8 +6,7 @@
- if gitlab_markdown?(readme.name)
= preserve do
= markdown(readme.data)
- elsif plain_text_readme?(readme.name)
%pre.clean
= readme.data
- elsif markup?(readme.name)
= render_markup(readme.name, readme.data)
- else
= simple_format(readme.data)