Commit 0e3f8ea2 authored by Robert Schilling's avatar Robert Schilling

Use simple_format if we don't have a proper renderer

parent 2fd30cc5
......@@ -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)
......
......@@ -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)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment