Commit 9efdebaf128e88788948efce7e1008783c8fcb79
1 parent
8886b900
Exists in
master
and in
4 other branches
Improve markup detection, fixes #4695
Showing
1 changed file
with
3 additions
and
3 deletions
Show diff stats
app/helpers/tree_helper.rb
... | ... | @@ -39,12 +39,12 @@ module TreeHelper |
39 | 39 | # |
40 | 40 | # Returns boolean |
41 | 41 | def markup?(filename) |
42 | - filename.end_with?(*%w(.textile .rdoc .org .creole | |
43 | - .mediawiki .rst .asciidoc .pod)) | |
42 | + filename.downcase.end_with?(*%w(.textile .rdoc .org .creole | |
43 | + .mediawiki .rst .asciidoc .pod)) | |
44 | 44 | end |
45 | 45 | |
46 | 46 | def gitlab_markdown?(filename) |
47 | - filename.end_with?(*%w(.mdown .md .markdown)) | |
47 | + filename.downcase.end_with?(*%w(.mdown .md .markdown)) | |
48 | 48 | end |
49 | 49 | |
50 | 50 | def plain_text_readme? filename | ... | ... |