Joshua Peek
b85aeaad3e
Inline mime type lookup into blob helper
2012-08-20 11:33:16 -05:00
Joshua Peek
f8df871d85
Only double check binary mime type when lazy loading blob
2012-08-20 11:20:37 -05:00
Joshua Peek
620150d188
Only double check with binary mime type when lazy loading blob
2012-08-20 11:14:45 -05:00
Joshua Peek
047d23862e
Still index .txt
2012-08-03 16:34:53 -05:00
Joshua Peek
804e23e995
Extract seperate language detection method
2012-08-03 16:03:06 -05:00
Joshua Peek
41b7d13aa7
Extract generated blob check into its own module
2012-08-03 15:47:50 -05:00
Joshua Peek
16a67cb852
Move shebang detection into classifier
...
Fixes #203
2012-08-03 15:07:36 -05:00
Joshua Peek
6014bd015e
Change find_by_filename api to return all matching languages
2012-08-03 13:53:12 -05:00
Joshua Peek
65d05e02c9
name can be nil
2012-07-23 17:19:11 -05:00
Joshua Peek
6ac9138aed
Remove pathname
...
Closes #207
2012-07-23 16:50:30 -05:00
Joshua Peek
bf944f6d1a
Make classify a function on the Classifier
2012-07-23 13:47:15 -05:00
Joshua Peek
80e8ee7ce6
Rename Sample -> Samples
2012-07-23 13:15:27 -05:00
Joshua Peek
0c9a947f39
Load classifer db into sample data hash
2012-07-23 13:13:52 -05:00
Joshua Peek
7292bdc180
Change Classifier to accept language name Strings
2012-07-20 15:52:27 -05:00
Joshua Peek
e58f268258
Associate .module with drupal php
2012-07-20 15:42:21 -05:00
Joshua Peek
0867e7b69b
Remove old language disambiguation functions
2012-07-20 15:30:53 -05:00
Joshua Peek
076bf7d0c8
Use classifier as primary method for disambiguation
2012-06-21 10:55:26 -05:00
Joshua Peek
9c9607e42c
Log regexp and classifier guess mismatches
2012-06-20 16:20:59 -05:00
Michael Ficarra
11166911dc
Recognise that PEG.js-generated parsers are in fact generated
2012-06-19 11:18:51 -05:00
Joshua Peek
5d2e9e04a9
Raise don't warn
2012-06-07 10:16:25 -05:00
Joshua Peek
0b73b11f63
Suppress Xcode Storyboards
2012-06-06 23:50:03 -05:00
Rob Sanheim
1c7b8ebe71
Make colorize safer:
...
- don't try to colorize blobs that have a high ratio of
long lines -- these are most likely minified files or something else
strange that will blow up Pygments.rb
- re github/github#3938
2012-05-21 11:33:01 -05:00
Joshua Peek
2729f2200d
Fix 1.9 string grep
2012-05-09 09:58:55 -05:00
Joshua Peek
35fe44549e
Fix empty .m file
2012-05-09 09:52:14 -05:00
Andrew D. Horchler
354e1fc85e
More robust heuristics for .m files and 3 new Matlab tests. Support for Obj-C detection fully intact; all tests pass. Detection of Obj-C keywords @implementation, @property, @interface, and @synthesize removed to avoid possible conflicts with user-created Matlab function handles. Only @end is needed, which is not valid in Matlab. Matlab class files supported. Comments preceded by whitespace detected for Obj-C and Matlab.
...
Signed-off-by: Andrew D. Horchler <adh9@case.edu >
2012-05-08 18:31:18 -04:00
Vicent Martí
4d984e9622
Colorize all files, even if they are generated
2012-04-29 16:01:02 -07:00
Joshua Peek
4c0a8b1ccf
Ensure our custom mime types override mime-types lib
2012-03-28 10:22:32 -05:00
Abe Voelker
22db59d8c0
Improve .cls language detection
2012-03-21 11:21:55 -05:00
Abe Voelker
d32c9e88b4
Add support for OpenEdge ABL language
2012-03-05 08:58:19 -06:00
Joshua Peek
d80ee601ed
Merge pull request #125 from abevoelker/detect-coq-language
...
Add detection for the Coq language - fixes #116
2012-03-05 06:03:23 -08:00
Abe Voelker
daef609f5f
Add detection for the Coq language - fixes #116
2012-02-17 10:50:21 -06:00
Joshua Peek
101676d90b
Gemfile.locks are generated
2012-02-15 15:59:06 -06:00
Joshua Peek
7974d23444
Detect CoffeeScript with generated comment
2012-01-16 16:57:30 -06:00
Joshua Peek
395a88aa97
Remove VS project file supression
2011-12-23 10:17:49 -06:00
Aman Gupta
7cdee48bab
handle missing blob mode
2011-11-23 03:00:18 -08:00
Aman Gupta
d2118d1471
only check for shebangs in executable files
2011-11-23 01:37:01 -08:00
Aman Gupta
61a59c8e84
avoid load_blob and shebang check on files with extensions
...
previously, any file with an unrecognized file extension was loaded to
check for a shebang. now, this only occurs if the file has a generic
name with no file extension (like ./script)
it is possible this will no longer match certain scripts with esoteric
extensions (if we find these we can add them to the shebang_extname?
method). however, most common script extensions (.sh, .rb, .pl, etc)
will continue to work since the file extension takes precedence over the
shebang line.
2011-11-23 00:54:40 -08:00
Aman Gupta
9994ac3a0c
only load blobs to check for <?php header for specific drupal file extensions
2011-11-23 00:50:44 -08:00
Aman Gupta
21488c84c3
delay calls to binary? in guess_language until viewable?, to avoid loading blobs for well known file extensions
2011-11-23 00:49:59 -08:00
Aman Gupta
bb4840ca3e
viewable? should not load or binary check large blobs
2011-11-23 00:49:11 -08:00
Aman Gupta
4b9a1c297b
bail fast on file extensions we recognize as binary
2011-11-23 00:32:14 -08:00
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