mirror of
https://github.com/KevinMidboe/linguist.git
synced 2025-10-29 17:50:22 +00:00
Default to not binary
This commit is contained in:
@@ -88,7 +88,7 @@ module Linguist
|
||||
# Returns true or false
|
||||
def self.binary?(ext_or_mime_type)
|
||||
mime_type = lookup_mime_type_for(ext_or_mime_type)
|
||||
mime_type.nil? || mime_type.binary?
|
||||
mime_type ? mime_type.binary? : false
|
||||
end
|
||||
|
||||
# Internal: Lookup mime type for extension or mime type
|
||||
|
||||
@@ -49,11 +49,43 @@ application/x-wais-source:
|
||||
application/vnd.mozilla.xul+xml:
|
||||
binary: false
|
||||
|
||||
application/vnd.adobe.air-application-installer-package+zip:
|
||||
binary: true
|
||||
extensions:
|
||||
- air
|
||||
|
||||
application/octet-stream:
|
||||
binary: true
|
||||
extensions:
|
||||
- dmg
|
||||
# TODO: Lookup actual content type for these extensions
|
||||
- a
|
||||
- blend
|
||||
- dll
|
||||
- dmg
|
||||
- gem
|
||||
- graffle
|
||||
- ipa
|
||||
- lib
|
||||
- mcz
|
||||
- nib
|
||||
- o
|
||||
- odp
|
||||
- ods
|
||||
- odt
|
||||
- otf
|
||||
- ogv
|
||||
- pfx
|
||||
- pigx
|
||||
- plgx
|
||||
- pptx
|
||||
- psd
|
||||
- sib
|
||||
- so
|
||||
- spl
|
||||
- sqlite3
|
||||
- swc
|
||||
- ucode
|
||||
- xpi
|
||||
|
||||
application/java-archive:
|
||||
binary: true
|
||||
@@ -61,6 +93,16 @@ application/java-archive:
|
||||
- ear
|
||||
- war
|
||||
|
||||
application/x-chrome-extension:
|
||||
binary: true
|
||||
extensions:
|
||||
- crx
|
||||
|
||||
application/x-debian-package:
|
||||
binary: true
|
||||
extensions:
|
||||
- deb
|
||||
|
||||
application/x-shockwave-flash:
|
||||
binary: true
|
||||
extensions:
|
||||
@@ -74,3 +116,18 @@ image/jpeg:
|
||||
|
||||
image/png:
|
||||
attachment: false
|
||||
|
||||
image/x-icns:
|
||||
binary: true
|
||||
extensions:
|
||||
- icns
|
||||
|
||||
text/cache-manifest:
|
||||
extensions:
|
||||
- manifest
|
||||
|
||||
video/quicktime:
|
||||
binary: true
|
||||
extensions:
|
||||
- qt
|
||||
- mov
|
||||
|
||||
Reference in New Issue
Block a user