diff --git a/lib/linguist/languages.yml b/lib/linguist/languages.yml index 307bd24d..7e8aecc6 100644 --- a/lib/linguist/languages.yml +++ b/lib/linguist/languages.yml @@ -2013,6 +2013,7 @@ Python: - wscript interpreters: - python + - python2 Python traceback: type: data diff --git a/lib/linguist/samples.rb b/lib/linguist/samples.rb index ca91dc15..2d72296a 100644 --- a/lib/linguist/samples.rb +++ b/lib/linguist/samples.rb @@ -133,10 +133,8 @@ module Linguist script = script == 'env' ? tokens[1] : script - # "python2.6" -> "python" - if script =~ /((?:\d+\.?)+)/ - script.sub! $1, '' - end + # "python2.6" -> "python2" + script.sub! $1, '' if script =~ /(\.\d+)$/ # Check for multiline shebang hacks that call `exec` if script == 'sh' &&