Commit Graph

147 Commits

Author SHA1 Message Date
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
Joshua Peek
c73d45f9f9 Add Blob#extname 2011-05-27 14:43:51 -05:00
Joshua Peek
817a234ab7 Reorder indexable checks to defer calling size 2011-05-27 14:28:37 -05:00
Joshua Peek
b1eba0e070 Exclude files over 0.1MB from searches 2011-05-27 12:50:59 -05:00
Joshua Peek
0b07d14a98 Return explicit true or false from vendored? 2011-05-27 12:08:22 -05:00
Joshua Peek
9cbddb8293 Only read lines if blob is viewable 2011-05-25 13:29:47 -05:00
Joshua Peek
972632b9db CoffeeScript JS guessing 2011-05-25 11:25:11 -05:00
Joshua Peek
4ba4257fdc Document blob helper 2011-05-24 21:41:16 -05:00
Joshua Peek
d889887440 Detect minified JS 2011-05-24 14:16:05 -05:00
Joshua Peek
d4b89b4331 Add Blob#indexable? 2011-05-24 13:44:55 -05:00
Joshua Peek
b5ef077778 Remove lexer_name helpers 2011-05-23 10:14:51 -05:00
Joshua Peek
e02f745cfc Add Blob#vendored? 2011-05-21 21:09:37 -05:00
Joshua Peek
a69118bd17 Prefer extension over shebang 2011-05-21 17:41:43 -05:00
Joshua Peek
21ff5e2c1d Add Blob#forbidden? 2011-05-21 17:34:52 -05:00
Joshua Peek
7a141e39c1 Allow blob data to be nil 2011-05-20 16:38:46 -05:00
Joshua Peek
75cabaa275 Remove Blob#file? 2011-05-20 14:52:24 -05:00
Joshua Peek
a94e06ac4d Add colorize_without_wrapper 2011-05-20 14:11:15 -05:00
Joshua Peek
bebae09fde Add colorize 2011-05-20 14:01:12 -05:00
Joshua Peek
0651355e71 Split mime type and content type 2011-05-20 11:24:32 -05:00
Joshua Peek
0f0f6d282b Separate lexer and lexer_name 2011-05-19 23:45:34 -05:00
Joshua Peek
81d0206c40 Detect generated xcode files 2011-05-19 22:52:27 -05:00
Joshua Peek
b22263718d Separate special_mime_type method 2011-05-16 21:03:55 -04:00
Joshua Peek
8d5dc01363 Extract BlobHelper mixin 2011-05-13 17:02:50 -05:00