diff options
Diffstat (limited to 'app/helpers/tree_helper.rb')
-rw-r--r-- | app/helpers/tree_helper.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/helpers/tree_helper.rb b/app/helpers/tree_helper.rb index ed3053d8af5..c51ee84a25e 100644 --- a/app/helpers/tree_helper.rb +++ b/app/helpers/tree_helper.rb @@ -24,4 +24,14 @@ module TreeHelper content.name end end + + # Public: Determines if a given filename is compatible with GitHub::Markup. + # + # filename - Filename string to check + # + # Returns boolean + def markup?(filename) + filename.end_with?(*%w(.mdown .md .markdown .textile .rdoc .org .creole + .mediawiki .rst .asciidoc .pod)) + end end |