Fix plain text readme
This commit is contained in:
parent
e8d6c3c1b6
commit
453b2ae68b
3 changed files with 16 additions and 1 deletions
|
@ -662,3 +662,11 @@ li.note {
|
|||
}
|
||||
}
|
||||
|
||||
pre {
|
||||
&.clean {
|
||||
background:none;
|
||||
border:none;
|
||||
margin:0;
|
||||
padding:0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -51,6 +51,10 @@ module TreeHelper
|
|||
filename.end_with?(*%w(.mdown .md .markdown))
|
||||
end
|
||||
|
||||
def plain_text_readme? filename
|
||||
filename == 'README'
|
||||
end
|
||||
|
||||
# Simple shortcut to File.join
|
||||
def tree_join(*args)
|
||||
File.join(*args)
|
||||
|
|
|
@ -6,5 +6,8 @@
|
|||
- if gitlab_markdown?(readme.name)
|
||||
= preserve do
|
||||
= markdown(readme.data)
|
||||
- elsif plain_text_readme?(readme.name)
|
||||
%pre.clean
|
||||
= readme.data
|
||||
- else
|
||||
= raw GitHub::Markup.render(readme.name, readme.data)
|
||||
= raw GitHub::Markup.render(readme.name, readme.data)
|
||||
|
|
Loading…
Reference in a new issue