mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	Merge branch 'master' into 1049
Conflicts: lib/linguist/samples.json
This commit is contained in:
		@@ -28,6 +28,9 @@ module Linguist
 | 
			
		||||
        if languages.all? { |l| ["Common Lisp", "OpenCL"].include?(l) }
 | 
			
		||||
          disambiguate_cl(data, languages)
 | 
			
		||||
        end
 | 
			
		||||
        if languages.all? { |l| ["Rebol", "R"].include?(l) }
 | 
			
		||||
          disambiguate_r(data, languages)
 | 
			
		||||
        end
 | 
			
		||||
      end
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
@@ -73,6 +76,13 @@ module Linguist
 | 
			
		||||
      matches
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    def self.disambiguate_r(data, languages)
 | 
			
		||||
      matches = []
 | 
			
		||||
      matches << Language["Rebol"] if /\bRebol\b/i.match(data)
 | 
			
		||||
      matches << Language["R"] if data.include?("<-")
 | 
			
		||||
      matches
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    def self.active?
 | 
			
		||||
      !!ACTIVE
 | 
			
		||||
    end
 | 
			
		||||
 
 | 
			
		||||
@@ -485,7 +485,7 @@ module Linguist
 | 
			
		||||
    #
 | 
			
		||||
    # Returns html String
 | 
			
		||||
    def colorize(text, options = {})
 | 
			
		||||
      lexer.highlight(text, options = {})
 | 
			
		||||
      lexer.highlight(text, options)
 | 
			
		||||
    end
 | 
			
		||||
 | 
			
		||||
    # Public: Return name as String representation
 | 
			
		||||
 
 | 
			
		||||
@@ -10,7 +10,7 @@
 | 
			
		||||
# ace_mode          - A String name of Ace Mode (if available)
 | 
			
		||||
# wrap              - Boolean wrap to enable line wrapping (default: false)
 | 
			
		||||
# extension         - An Array of associated extensions
 | 
			
		||||
# interpreter       - An Array of associated interpreters
 | 
			
		||||
# interpreters      - An Array of associated interpreters
 | 
			
		||||
# primary_extension - A String for the main extension associated with
 | 
			
		||||
#                     the language. Must be unique. Used when a Language is picked
 | 
			
		||||
#                     from a dropdown and we need to automatically choose an
 | 
			
		||||
@@ -86,6 +86,12 @@ Agda:
 | 
			
		||||
  color: "#467C91"
 | 
			
		||||
  primary_extension: .agda
 | 
			
		||||
 | 
			
		||||
Alloy:
 | 
			
		||||
  type: programming  # 'modeling' would be more appropiate
 | 
			
		||||
  lexer: Text only
 | 
			
		||||
  color: "#cc5c24"
 | 
			
		||||
  primary_extension: .als
 | 
			
		||||
 | 
			
		||||
ApacheConf:
 | 
			
		||||
  type: markup
 | 
			
		||||
  aliases:
 | 
			
		||||
@@ -129,6 +135,12 @@ AsciiDoc:
 | 
			
		||||
  - .adoc
 | 
			
		||||
  - .asc
 | 
			
		||||
 | 
			
		||||
AspectJ:
 | 
			
		||||
  type: programming
 | 
			
		||||
  lexer: AspectJ
 | 
			
		||||
  color: "#1957b0"
 | 
			
		||||
  primary_extension: .aj
 | 
			
		||||
 | 
			
		||||
Assembly:
 | 
			
		||||
  type: programming
 | 
			
		||||
  lexer: NASM
 | 
			
		||||
@@ -261,6 +273,7 @@ C++:
 | 
			
		||||
  - .hh
 | 
			
		||||
  - .hpp
 | 
			
		||||
  - .hxx
 | 
			
		||||
  - .inl
 | 
			
		||||
  - .tcc
 | 
			
		||||
  - .tpp
 | 
			
		||||
 | 
			
		||||
@@ -300,7 +313,7 @@ COBOL:
 | 
			
		||||
 | 
			
		||||
CSS:
 | 
			
		||||
  ace_mode: css
 | 
			
		||||
  color: "#1f085e"
 | 
			
		||||
  color: "#563d7c"
 | 
			
		||||
  primary_extension: .css
 | 
			
		||||
 | 
			
		||||
Ceylon:
 | 
			
		||||
@@ -488,6 +501,12 @@ DCPU-16 ASM:
 | 
			
		||||
Diff:
 | 
			
		||||
  primary_extension: .diff
 | 
			
		||||
 | 
			
		||||
Dogescript:
 | 
			
		||||
  type: programming
 | 
			
		||||
  lexer: Text only
 | 
			
		||||
  color: "#cca760"
 | 
			
		||||
  primary_extension: .djs
 | 
			
		||||
 | 
			
		||||
Dylan:
 | 
			
		||||
  type: programming
 | 
			
		||||
  color: "#3ebc27"
 | 
			
		||||
@@ -510,6 +529,14 @@ ECL:
 | 
			
		||||
  extensions:
 | 
			
		||||
  - .eclxml
 | 
			
		||||
 | 
			
		||||
Eagle:
 | 
			
		||||
  type: markup
 | 
			
		||||
  color: "#3994bc"
 | 
			
		||||
  lexer: XML
 | 
			
		||||
  primary_extension: .sch
 | 
			
		||||
  extensions:
 | 
			
		||||
  - .brd
 | 
			
		||||
 | 
			
		||||
Eiffel:
 | 
			
		||||
  type: programming
 | 
			
		||||
  lexer: Text only
 | 
			
		||||
@@ -606,7 +633,7 @@ Fancy:
 | 
			
		||||
  - .fancypack
 | 
			
		||||
  filenames:
 | 
			
		||||
  - Fakefile
 | 
			
		||||
  
 | 
			
		||||
 | 
			
		||||
Fantom:
 | 
			
		||||
  type: programming
 | 
			
		||||
  color: "#dbded5"
 | 
			
		||||
@@ -620,6 +647,27 @@ Forth:
 | 
			
		||||
  extensions:
 | 
			
		||||
  - .4th
 | 
			
		||||
 | 
			
		||||
Frege:
 | 
			
		||||
  type: programming
 | 
			
		||||
  color: "#00cafe"
 | 
			
		||||
  lexer: Haskell
 | 
			
		||||
  primary_extension: .fr
 | 
			
		||||
 | 
			
		||||
Game Maker Language:
 | 
			
		||||
  type: programming
 | 
			
		||||
  lexer: JavaScript
 | 
			
		||||
  primary_extension: .gml
 | 
			
		||||
 | 
			
		||||
GAP:
 | 
			
		||||
  type: programming
 | 
			
		||||
  lexer: Text only
 | 
			
		||||
  primary_extension: .g
 | 
			
		||||
  extensions:
 | 
			
		||||
  - .g
 | 
			
		||||
  - .gap
 | 
			
		||||
  - .gd
 | 
			
		||||
  - .gi
 | 
			
		||||
 | 
			
		||||
GAS:
 | 
			
		||||
  type: programming
 | 
			
		||||
  group: Assembly
 | 
			
		||||
@@ -667,6 +715,17 @@ Glyph:
 | 
			
		||||
  lexer: Tcl
 | 
			
		||||
  primary_extension: .glf
 | 
			
		||||
 | 
			
		||||
Gnuplot:
 | 
			
		||||
  type: programming
 | 
			
		||||
  color: "#f0a9f0"
 | 
			
		||||
  lexer: Gnuplot
 | 
			
		||||
  primary_extension: .gp
 | 
			
		||||
  extensions:
 | 
			
		||||
  - .gnu
 | 
			
		||||
  - .gnuplot
 | 
			
		||||
  - .plot
 | 
			
		||||
  - .plt
 | 
			
		||||
 | 
			
		||||
Go:
 | 
			
		||||
  type: programming
 | 
			
		||||
  color: "#a89b4d"
 | 
			
		||||
@@ -677,6 +736,16 @@ Gosu:
 | 
			
		||||
  color: "#82937f"
 | 
			
		||||
  primary_extension: .gs
 | 
			
		||||
 | 
			
		||||
Grammatical Framework:
 | 
			
		||||
  type: programming
 | 
			
		||||
  lexer: Haskell
 | 
			
		||||
  aliases:
 | 
			
		||||
  - gf
 | 
			
		||||
  wrap: false
 | 
			
		||||
  primary_extension: .gf
 | 
			
		||||
  searchable: true
 | 
			
		||||
  color: "#ff0000"
 | 
			
		||||
 | 
			
		||||
Groff:
 | 
			
		||||
  primary_extension: .man
 | 
			
		||||
  extensions:
 | 
			
		||||
@@ -871,6 +940,12 @@ JSONLD:
 | 
			
		||||
  lexer: JavaScript
 | 
			
		||||
  primary_extension: .jsonld
 | 
			
		||||
 | 
			
		||||
JSONiq:
 | 
			
		||||
  type: programming
 | 
			
		||||
  ace_mode: jsoniq
 | 
			
		||||
  lexer: XQuery
 | 
			
		||||
  primary_extension: .jq
 | 
			
		||||
 | 
			
		||||
Jade:
 | 
			
		||||
  group: HTML
 | 
			
		||||
  type: markup
 | 
			
		||||
@@ -893,7 +968,7 @@ Java Server Pages:
 | 
			
		||||
JavaScript:
 | 
			
		||||
  type: programming
 | 
			
		||||
  ace_mode: javascript
 | 
			
		||||
  color: "#f15501"
 | 
			
		||||
  color: "#f7df1e"
 | 
			
		||||
  aliases:
 | 
			
		||||
  - js
 | 
			
		||||
  - node
 | 
			
		||||
@@ -913,6 +988,8 @@ JavaScript:
 | 
			
		||||
  - .ssjs
 | 
			
		||||
  filenames:
 | 
			
		||||
  - Jakefile
 | 
			
		||||
  interpreters:
 | 
			
		||||
  - node
 | 
			
		||||
 | 
			
		||||
Julia:
 | 
			
		||||
  type: programming
 | 
			
		||||
@@ -1066,10 +1143,17 @@ Mask:
 | 
			
		||||
  ace_mode: scss
 | 
			
		||||
  primary_extension: .mask
 | 
			
		||||
 | 
			
		||||
Mathematica:
 | 
			
		||||
  type: programming
 | 
			
		||||
  primary_extension: .mathematica
 | 
			
		||||
  lexer: Text only
 | 
			
		||||
 | 
			
		||||
Matlab:
 | 
			
		||||
  type: programming
 | 
			
		||||
  color: "#bb92ac"
 | 
			
		||||
  primary_extension: .matlab
 | 
			
		||||
  extensions:
 | 
			
		||||
  - .m
 | 
			
		||||
 | 
			
		||||
Max:
 | 
			
		||||
  type: programming
 | 
			
		||||
@@ -1202,8 +1286,14 @@ Objective-C:
 | 
			
		||||
  - obj-c
 | 
			
		||||
  - objc
 | 
			
		||||
  primary_extension: .m
 | 
			
		||||
  extensions:
 | 
			
		||||
  - .mm
 | 
			
		||||
 | 
			
		||||
Objective-C++:
 | 
			
		||||
  type: programming
 | 
			
		||||
  color: "#4886FC"
 | 
			
		||||
  aliases:
 | 
			
		||||
  - obj-c++
 | 
			
		||||
  - objc++
 | 
			
		||||
  primary_extension: .mm
 | 
			
		||||
 | 
			
		||||
Objective-J:
 | 
			
		||||
  type: programming
 | 
			
		||||
@@ -1406,6 +1496,12 @@ Pure Data:
 | 
			
		||||
  lexer: Text only
 | 
			
		||||
  primary_extension: .pd
 | 
			
		||||
 | 
			
		||||
PureScript:
 | 
			
		||||
  type: programming
 | 
			
		||||
  color: "#f3ce45"
 | 
			
		||||
  lexer: Haskell
 | 
			
		||||
  primary_extension: .purs
 | 
			
		||||
 | 
			
		||||
Python:
 | 
			
		||||
  type: programming
 | 
			
		||||
  ace_mode: python
 | 
			
		||||
@@ -1509,10 +1605,12 @@ Rebol:
 | 
			
		||||
  type: programming
 | 
			
		||||
  lexer: REBOL
 | 
			
		||||
  color: "#358a5b"
 | 
			
		||||
  primary_extension: .rebol
 | 
			
		||||
  primary_extension: .reb
 | 
			
		||||
  extensions:
 | 
			
		||||
  - .r
 | 
			
		||||
  - .r2
 | 
			
		||||
  - .r3
 | 
			
		||||
  - .rebol
 | 
			
		||||
 | 
			
		||||
Redcode:
 | 
			
		||||
  primary_extension: .cw
 | 
			
		||||
@@ -1651,6 +1749,11 @@ Shell:
 | 
			
		||||
  filenames:
 | 
			
		||||
  - Dockerfile
 | 
			
		||||
 | 
			
		||||
ShellSession:
 | 
			
		||||
  type: programming
 | 
			
		||||
  lexer: Bash Session
 | 
			
		||||
  primary_extension: .sh-session
 | 
			
		||||
 | 
			
		||||
Shen:
 | 
			
		||||
  type: programming
 | 
			
		||||
  color: "#120F14"
 | 
			
		||||
@@ -1670,6 +1773,13 @@ Smalltalk:
 | 
			
		||||
Smarty:
 | 
			
		||||
  primary_extension: .tpl
 | 
			
		||||
 | 
			
		||||
SourcePawn:
 | 
			
		||||
  type: programming
 | 
			
		||||
  color: "#f69e1d"
 | 
			
		||||
  aliases:
 | 
			
		||||
  - sourcemod
 | 
			
		||||
  primary_extension: .sp
 | 
			
		||||
 | 
			
		||||
Squirrel:
 | 
			
		||||
  type: programming
 | 
			
		||||
  lexer: C++
 | 
			
		||||
@@ -1684,6 +1794,19 @@ Standard ML:
 | 
			
		||||
  extensions:
 | 
			
		||||
  - .fun
 | 
			
		||||
 | 
			
		||||
Stata:
 | 
			
		||||
  type: programming
 | 
			
		||||
  lexer: Text only
 | 
			
		||||
  extensions:
 | 
			
		||||
  - .ado
 | 
			
		||||
  - .do
 | 
			
		||||
  - .doh
 | 
			
		||||
  - .ihlp
 | 
			
		||||
  - .mata
 | 
			
		||||
  - .matah
 | 
			
		||||
  - .sthlp
 | 
			
		||||
  primary_extension: .do
 | 
			
		||||
 | 
			
		||||
Stylus:
 | 
			
		||||
  type: markup
 | 
			
		||||
  group: CSS
 | 
			
		||||
@@ -1696,6 +1819,15 @@ SuperCollider:
 | 
			
		||||
  lexer: Text only
 | 
			
		||||
  primary_extension: .scd
 | 
			
		||||
 | 
			
		||||
SystemVerilog:
 | 
			
		||||
  type: programming
 | 
			
		||||
  color: "#343761"
 | 
			
		||||
  lexer: systemverilog
 | 
			
		||||
  primary_extension: .sv
 | 
			
		||||
  extensions:
 | 
			
		||||
  - .svh
 | 
			
		||||
  - .vh
 | 
			
		||||
 | 
			
		||||
TOML:
 | 
			
		||||
  type: data
 | 
			
		||||
  primary_extension: .toml
 | 
			
		||||
@@ -1711,6 +1843,7 @@ Tcl:
 | 
			
		||||
  primary_extension: .tcl
 | 
			
		||||
  extensions:
 | 
			
		||||
  - .adp
 | 
			
		||||
  - .tm
 | 
			
		||||
 | 
			
		||||
Tcsh:
 | 
			
		||||
  type: programming
 | 
			
		||||
@@ -1954,6 +2087,12 @@ YAML:
 | 
			
		||||
  - .rviz
 | 
			
		||||
  - .yaml
 | 
			
		||||
 | 
			
		||||
Zephir:
 | 
			
		||||
  type: programming
 | 
			
		||||
  lexer: PHP
 | 
			
		||||
  color: "#118f9e"
 | 
			
		||||
  primary_extension: .zep
 | 
			
		||||
 | 
			
		||||
eC:
 | 
			
		||||
  type: programming
 | 
			
		||||
  search_term: ec
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										102103
									
								
								lib/linguist/samples.json
									
									
									
									
									
								
							
							
						
						
									
										102103
									
								
								lib/linguist/samples.json
									
									
									
									
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							@@ -10,7 +10,7 @@
 | 
			
		||||
## Vendor Conventions ##
 | 
			
		||||
 | 
			
		||||
# Caches
 | 
			
		||||
- cache/
 | 
			
		||||
- (^|/)cache/
 | 
			
		||||
 | 
			
		||||
# Dependencies
 | 
			
		||||
- ^[Dd]ependencies/
 | 
			
		||||
@@ -98,6 +98,9 @@
 | 
			
		||||
# AngularJS
 | 
			
		||||
- (^|/)angular([^.]*)(\.min)?\.js$
 | 
			
		||||
 | 
			
		||||
# React
 | 
			
		||||
- (^|/)react(-[^.]*)?(\.min)?\.js$
 | 
			
		||||
 | 
			
		||||
## Python ##
 | 
			
		||||
 | 
			
		||||
# django
 | 
			
		||||
@@ -128,6 +131,7 @@
 | 
			
		||||
 | 
			
		||||
# Visual Studio IntelliSense
 | 
			
		||||
- -vsdoc\.js$
 | 
			
		||||
- \.intellisense\.js$
 | 
			
		||||
 | 
			
		||||
# jQuery validation plugin (MS bundles this with asp.net mvc)
 | 
			
		||||
- (^|/)jquery([^.]*)\.validate(\.unobtrusive)?(\.min)?\.js$
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user