Commit 453b2ae6 authored by randx's avatar randx

Fix plain text readme

parent e8d6c3c1
...@@ -662,3 +662,11 @@ li.note { ...@@ -662,3 +662,11 @@ li.note {
} }
} }
pre {
&.clean {
background:none;
border:none;
margin:0;
padding:0;
}
}
...@@ -51,6 +51,10 @@ module TreeHelper ...@@ -51,6 +51,10 @@ module TreeHelper
filename.end_with?(*%w(.mdown .md .markdown)) filename.end_with?(*%w(.mdown .md .markdown))
end end
def plain_text_readme? filename
filename == 'README'
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,5 +6,8 @@ ...@@ -6,5 +6,8 @@
- 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
- else - else
= raw GitHub::Markup.render(readme.name, readme.data) = raw GitHub::Markup.render(readme.name, 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