diff --git a/lib/linguist/blob_helper.rb b/lib/linguist/blob_helper.rb index 37d8597d..5820736a 100644 --- a/lib/linguist/blob_helper.rb +++ b/lib/linguist/blob_helper.rb @@ -135,6 +135,13 @@ module Linguist ['.png', '.jpg', '.jpeg', '.gif'].include?(extname) end + # Public: Is the blob a possible drupal php file? + # + # Return true or false + def drupal_extname? + ['.module', '.install', '.test', '.inc'].include?(extname) + end + MEGABYTE = 1024 * 1024 # Public: Is the blob too big to load? @@ -512,10 +519,13 @@ module Linguist # Internal: Guess language from the first line. # - # Look for leading "