Use simple_format if we don't have a proper renderer
This commit is contained in:
parent
2fd30cc57f
commit
0e3f8ea2ef
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue