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 ...@@ -52,10 +52,6 @@ module TreeHelper
filename.downcase.end_with?(*%w(.mdown .md .markdown)) filename.downcase.end_with?(*%w(.mdown .md .markdown))
end end
def plain_text_readme? filename
filename =~ /^README(.txt)?$/i
end
# Simple shortcut to File.join # Simple shortcut to File.join
def tree_join(*args) def tree_join(*args)
File.join(*args) File.join(*args)
......
...@@ -6,8 +6,7 @@ ...@@ -6,8 +6,7 @@
- if gitlab_markdown?(readme.name) - if gitlab_markdown?(readme.name)
= preserve do = preserve do
= markdown(readme.data) = markdown(readme.data)
- elsif plain_text_readme?(readme.name)
%pre.clean
= readme.data
- elsif markup?(readme.name) - elsif markup?(readme.name)
= render_markup(readme.name, readme.data) = 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