mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
determine image with downcase extname
This commit is contained in:
@@ -20,7 +20,7 @@ module Linguist
|
||||
#
|
||||
# Returns a String
|
||||
def extname
|
||||
File.extname(name.to_s).downcase
|
||||
File.extname(name.to_s)
|
||||
end
|
||||
|
||||
# Internal: Lookup mime type for extension.
|
||||
@@ -139,7 +139,7 @@ module Linguist
|
||||
#
|
||||
# Return true or false
|
||||
def image?
|
||||
['.png', '.jpg', '.jpeg', '.gif'].include?(extname)
|
||||
['.png', '.jpg', '.jpeg', '.gif'].include?(extname.downcase)
|
||||
end
|
||||
|
||||
MEGABYTE = 1024 * 1024
|
||||
|
||||
Reference in New Issue
Block a user