Commit 38ef603bfbe8b381461e05e7ee6c71dbb97af431
Exists in
master
and in
4 other branches
Merge pull request #4698 from Razer6/improve_markup_detection
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 | ... | ... |