Commit Graph

72 Commits

Author SHA1 Message Date
Joshua Peek
e4fe1d17e7 Add tests for Perl and Turning detection 2011-11-21 10:42:39 -06:00
Joshua Peek
0b5a265644 Cleanup whitespace 2011-11-21 10:20:19 -06:00
Tristan Hume
5d4057324f Added Turing language detection 2011-11-16 18:55:55 -05:00
Joshua Peek
e562369110 Skip colorizing minified js 2011-10-10 11:29:58 -05:00
Joshua Peek
6a2d84d422 Don't send blank attachment filename 2011-09-28 10:48:55 -05:00
Joshua Peek
6e03f954bc Large blobs should be binary 2011-09-28 10:14:46 -05:00
Joshua Peek
caa39a2bcf Use Charlock all the time for binary detection 2011-09-28 09:57:33 -05:00
Joshua Peek
84df2aaa0a Encoding could still be nil 2011-09-27 10:18:44 -05:00
Joshua Peek
1c24de490b Treat as binary if encoding is nil 2011-09-08 13:30:21 -05:00
Joshua Peek
7ed26bfcf3 Use charlock to detect binary blobs 2011-09-06 19:58:29 -05:00
Joshua Peek
350465d84d Fix groovy regexp warning 2011-08-30 14:29:18 -05:00
Joshua Peek
a733ba819e Merge pull request #68 from github/pygments.rb
Replace Lexer with Pygments::Lexer
2011-08-30 11:57:31 -07:00
Jeff Beck
5c93120502 Fix for Ruby 1.8.7
Added a test to catch the case better
2011-08-29 12:21:46 -05:00
Jeff Beck
3dd06de711 Adding support to detect the difference between a Grails gsp and a Gosu gsp. 2011-08-29 11:31:39 -05:00
Joshua Peek
0864b9847f Replace Lexer with Pygments::Lexer 2011-08-23 12:41:06 -05:00
Paul Betts
6f51c8fc63 The C# compiler bizarrely generates docfiles with uppercase extensions - recognize those too 2011-08-10 22:37:48 -07:00
Paul Betts
0f1c9c48fa Suppress .NET XML Intellisense generated files 2011-08-03 12:09:36 -07:00
Joshua Peek
86e2246e66 Style 2011-07-27 23:12:48 -05:00
Joris den Ouden
5eec0034d1 XCode and Visual Studio project detection in seperate methods 2011-07-26 22:13:25 +02:00
Joris den Ouden
d0824ee3b2 Detect Visual Studio project files, solution files and resource files as generated 2011-07-26 20:00:35 +02:00
Jonathan Sterling
de96f950b3 Detect .xcworkspacedata and .xcuserstate files as generated
Xcode 4 generates more XML files than ever: update `generated?` to recognize
them as such.
2011-07-13 14:54:21 -07:00
Joshua Peek
04179de2f6 Note where tests are 2011-07-06 10:18:01 -05:00
Joshua Peek
d3a3358402 Fix instance methods check on 1.9 2011-07-06 09:20:17 -05:00
Joshua Peek
6611f174e5 Dispatch to ambiguous language guess method 2011-07-05 20:11:07 -05:00
Joshua Peek
96a14e795b Merge branch 'detect-prolog' of https://github.com/tautologico/linguist into tautologico-detect-prolog
Conflicts:
	lib/linguist/blob_helper.rb
	test/test_blob.rb
2011-07-05 16:06:22 -05:00
Andrei Formiga
b3e7065972 Added detection for Prolog and disambiguation for .pl files 2011-07-05 17:33:28 -03:00
Rok Žlender
111ebe3c80 Identify php files by first line
Fixes #32
2011-07-05 09:43:48 -05:00
Joshua Peek
5ecc4421d7 Basic Matlab detection
Fixes #15
2011-07-05 09:34:33 -05:00
Joshua Peek
aeef1d8f33 JS is minified if its average line length is greater than 100c
Fixes #27
2011-07-02 20:28:42 -05:00
Andreas Bolka
2707d1db67 Guess if .r is R or REBOL
.r is the default extension used widely for both, R and REBOL. This
patch attempts to guess if .r is a REBOL file by looking for the
following very common REBOL code fragments:

- `REBOL`
- `: func [`
- `make object! [`
- `context [`

If any of those is found in a .r file, it is identified as a REBOL file.
Otherwise the language for a .r file is R.

Signed-off-by: Andreas Bolka <a@bolka.at>
2011-06-29 01:42:50 +02:00
Joshua Peek
58e99aa5aa Test blank file 2011-06-28 09:26:35 -05:00
Carlos Galdino
176aad0259 fixing typo 2011-06-27 20:47:44 -03:00
Joshua Peek
ebba204ba3 Check for multiline shebang script hacks
Fixes #8
2011-06-27 17:35:48 -05:00
Joshua Peek
8d9dceab98 Out of date comment 2011-06-25 18:09:33 -05:00
Joshua Peek
876265e8f3 Return nil if no Language if found 2011-06-18 21:49:02 -05:00
Joshua Peek
063bf21c66 Return nil if no Language is found 2011-06-18 20:57:58 -05:00
Joshua Peek
e990c4da7a Remove caution, its basically all methods 2011-06-14 00:12:26 -05:00
Joshua Peek
e37d9c85b9 Escape utils is used in Blob 2011-06-13 23:52:38 -05:00
Joshua Peek
1fc07145b8 Lower generated line limit to 500c 2011-06-08 10:52:42 -05:00
Joshua Peek
c7739119b3 Separate filename and extension configuration 2011-06-07 10:31:39 -05:00
Joshua Peek
b3aa285476 Don't need forbidden check anymore 2011-06-03 11:37:29 -05:00
Joshua Peek
786cd25cbf Use inline for all text and images 2011-06-03 11:37:08 -05:00
Joshua Peek
40efc2bd44 Use mime binary 2011-06-03 10:44:21 -05:00
Joshua Peek
a12bde58e0 Kill attachment stuff, just use viewable 2011-06-02 12:42:56 -05:00
Joshua Peek
a49819a73c Separate out language guessing 2011-06-02 12:29:56 -05:00
Joshua Peek
bcc2042768 Separate registry content type and content disposition 2011-06-02 12:14:19 -05:00
Joshua Peek
08299a0048 Prefer aliases over shebang config 2011-06-01 22:42:27 -05:00
Joshua Peek
9501f6bd3d Add searchable flag to langauge 2011-05-31 17:09:11 -05:00
Joshua Peek
ba7c2c759a Add language aliases 2011-05-29 19:27:51 -05:00
Joshua Peek
61bdd3deaf Guess .h language 2011-05-27 14:57:11 -05:00