Merge remote-tracking branch 'refs/remotes/github/master'

Conflicts:
	.gitmodules
	grammars.yml
This commit is contained in:
Ahmad Salim Al-Sibahi
2016-12-07 08:36:48 +01:00
30 changed files with 413 additions and 86 deletions

View File

@@ -63,7 +63,7 @@ module Linguist
#
# Returns an Array
def extensions
_, *segments = name.downcase.split(".")
_, *segments = name.downcase.split(".", -1)
segments.map.with_index do |segment, index|
"." + segments[index..-1].join(".")

View File

@@ -275,16 +275,14 @@ module Linguist
return lines[0].include?("Generated by the protocol buffer compiler. DO NOT EDIT!")
end
APACHE_THRIFT_EXTENSIONS = ['.rb', '.py', '.go', '.js', '.m', '.java', '.h', '.cc', '.cpp']
APACHE_THRIFT_EXTENSIONS = ['.rb', '.py', '.go', '.js', '.m', '.java', '.h', '.cc', '.cpp', '.php']
# Internal: Is the blob generated by Apache Thrift compiler?
#
# Returns true or false
def generated_apache_thrift?
return false unless APACHE_THRIFT_EXTENSIONS.include?(extname)
return false unless lines.count > 1
return lines[0].include?("Autogenerated by Thrift Compiler") || lines[1].include?("Autogenerated by Thrift Compiler")
return lines.first(6).any? { |l| l.include?("Autogenerated by Thrift Compiler") }
end
# Internal: Is the blob a C/C++ header generated by the Java JNI tool javah?

View File

@@ -110,6 +110,12 @@ module Linguist
end
end
disambiguate ".cls" do |data|
if /\\\w+{/.match(data)
Language["TeX"]
end
end
disambiguate ".cs" do |data|
if /![\w\s]+methodsFor: /.match(data)
Language["Smalltalk"]

View File

@@ -1141,9 +1141,9 @@ Emacs Lisp:
- ".gnus"
- ".spacemacs"
- ".viper"
- "Project.ede"
- "_emacs"
- "abbrev_defs"
- Project.ede
- _emacs
- abbrev_defs
extensions:
- ".el"
- ".emacs"
@@ -1473,6 +1473,8 @@ Gnuplot:
Go:
type: programming
color: "#375eab"
aliases:
- golang
extensions:
- ".go"
ace_mode: golang
@@ -1659,13 +1661,16 @@ HTML+Django:
tm_scope: text.html.django
group: HTML
extensions:
- ".mustache"
- ".jinja"
- ".mustache"
- ".njk"
aliases:
- django
- html+django/jinja
- html+jinja
- htmldjango
- njk
- nunjucks
ace_mode: django
codemirror_mode: django
codemirror_mime_type: text/x-django
@@ -1959,6 +1964,8 @@ JSON5:
type: data
extensions:
- ".json5"
filenames:
- ".babelrc"
tm_scope: source.js
ace_mode: javascript
codemirror_mode: javascript
@@ -2953,6 +2960,15 @@ OpenSCAD:
- ".scad"
tm_scope: none
ace_mode: scad
language_id: 431
OpenType Feature File:
type: data
aliases:
- AFDKO
extensions:
- ".fea"
tm_scope: source.opentype
ace_mode: text
language_id: 266
Org:
type: prose
@@ -3172,7 +3188,7 @@ Perl6:
Pic:
type: markup
group: Groff
tm_scope: "source.pic"
tm_scope: source.pic
extensions:
- ".pic"
- ".chem"
@@ -3694,6 +3710,7 @@ Ruby:
- Berksfile
- Brewfile
- Buildfile
- Dangerfile
- Deliverfile
- Fastfile
- Gemfile
@@ -4034,6 +4051,13 @@ SourcePawn:
- ".sma"
tm_scope: source.sp
ace_mode: text
language_id: 432
Spline Font Database:
type: data
extensions:
- ".sfd"
tm_scope: text.sfd
ace_mode: yaml
language_id: 354
Squirrel:
type: programming
@@ -4265,6 +4289,7 @@ Text:
- ".no"
filenames:
- COPYING
- FONTLOG
- INSTALL
- LICENSE
- NEWS

View File

@@ -50,6 +50,9 @@
# Go dependencies
- Godeps/_workspace/
# GNU indent profiles
- .indent.pro
# Minified JavaScript and CSS
- (\.|-)min\.(js|css)$