syntax-highlighter-rails 3.0.83

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. data/.gitignore +19 -0
  2. data/Gemfile +4 -0
  3. data/LICENSE +20 -0
  4. data/README.md +49 -0
  5. data/Rakefile +1 -0
  6. data/lib/syntax/highlighter/rails.rb +10 -0
  7. data/lib/syntax/highlighter/rails/version.rb +7 -0
  8. data/syntax-highlighter-rails.gemspec +22 -0
  9. data/vendor/assets/javascripts/syntax-highlighter-rails/shAutoloader.js +122 -0
  10. data/vendor/assets/javascripts/syntax-highlighter-rails/shBrushAS3.js +43 -0
  11. data/vendor/assets/javascripts/syntax-highlighter-rails/shBrushAppleScript.js +84 -0
  12. data/vendor/assets/javascripts/syntax-highlighter-rails/shBrushBash.js +59 -0
  13. data/vendor/assets/javascripts/syntax-highlighter-rails/shBrushCSharp.js +49 -0
  14. data/vendor/assets/javascripts/syntax-highlighter-rails/shBrushColdFusion.js +84 -0
  15. data/vendor/assets/javascripts/syntax-highlighter-rails/shBrushCpp.js +97 -0
  16. data/vendor/assets/javascripts/syntax-highlighter-rails/shBrushCss.js +75 -0
  17. data/vendor/assets/javascripts/syntax-highlighter-rails/shBrushDelphi.js +39 -0
  18. data/vendor/assets/javascripts/syntax-highlighter-rails/shBrushDiff.js +25 -0
  19. data/vendor/assets/javascripts/syntax-highlighter-rails/shBrushErlang.js +36 -0
  20. data/vendor/assets/javascripts/syntax-highlighter-rails/shBrushGroovy.js +51 -0
  21. data/vendor/assets/javascripts/syntax-highlighter-rails/shBrushHaxe.js +64 -0
  22. data/vendor/assets/javascripts/syntax-highlighter-rails/shBrushJScript.js +36 -0
  23. data/vendor/assets/javascripts/syntax-highlighter-rails/shBrushJava.js +41 -0
  24. data/vendor/assets/javascripts/syntax-highlighter-rails/shBrushJavaFX.js +42 -0
  25. data/vendor/assets/javascripts/syntax-highlighter-rails/shBrushPerl.js +80 -0
  26. data/vendor/assets/javascripts/syntax-highlighter-rails/shBrushPhp.js +72 -0
  27. data/vendor/assets/javascripts/syntax-highlighter-rails/shBrushPlain.js +17 -0
  28. data/vendor/assets/javascripts/syntax-highlighter-rails/shBrushPowerShell.js +59 -0
  29. data/vendor/assets/javascripts/syntax-highlighter-rails/shBrushPython.js +48 -0
  30. data/vendor/assets/javascripts/syntax-highlighter-rails/shBrushRuby.js +39 -0
  31. data/vendor/assets/javascripts/syntax-highlighter-rails/shBrushSass.js +83 -0
  32. data/vendor/assets/javascripts/syntax-highlighter-rails/shBrushScala.js +35 -0
  33. data/vendor/assets/javascripts/syntax-highlighter-rails/shBrushSql.js +51 -0
  34. data/vendor/assets/javascripts/syntax-highlighter-rails/shBrushTAP.js +46 -0
  35. data/vendor/assets/javascripts/syntax-highlighter-rails/shBrushTypeScript.js +39 -0
  36. data/vendor/assets/javascripts/syntax-highlighter-rails/shBrushVb.js +40 -0
  37. data/vendor/assets/javascripts/syntax-highlighter-rails/shBrushXml.js +55 -0
  38. data/vendor/assets/javascripts/syntax-highlighter-rails/shCore.js +17 -0
  39. data/vendor/assets/javascripts/syntax-highlighter-rails/shLegacy.js +141 -0
  40. data/vendor/assets/stylesheets/syntax-highlighter-rails/_theme_template.scss +129 -0
  41. data/vendor/assets/stylesheets/syntax-highlighter-rails/shCore.scss +216 -0
  42. data/vendor/assets/stylesheets/syntax-highlighter-rails/shCoreDefault.scss +2 -0
  43. data/vendor/assets/stylesheets/syntax-highlighter-rails/shCoreDjango.scss +2 -0
  44. data/vendor/assets/stylesheets/syntax-highlighter-rails/shCoreEclipse.css +230 -0
  45. data/vendor/assets/stylesheets/syntax-highlighter-rails/shCoreEclipse.scss +2 -0
  46. data/vendor/assets/stylesheets/syntax-highlighter-rails/shCoreEmacs.scss +2 -0
  47. data/vendor/assets/stylesheets/syntax-highlighter-rails/shCoreFadeToGrey.scss +2 -0
  48. data/vendor/assets/stylesheets/syntax-highlighter-rails/shCoreMDUltra.scss +2 -0
  49. data/vendor/assets/stylesheets/syntax-highlighter-rails/shCoreMidnight.scss +2 -0
  50. data/vendor/assets/stylesheets/syntax-highlighter-rails/shCoreRDark.scss +2 -0
  51. data/vendor/assets/stylesheets/syntax-highlighter-rails/shThemeDefault.scss +7 -0
  52. data/vendor/assets/stylesheets/syntax-highlighter-rails/shThemeDjango.scss +36 -0
  53. data/vendor/assets/stylesheets/syntax-highlighter-rails/shThemeEclipse.scss +48 -0
  54. data/vendor/assets/stylesheets/syntax-highlighter-rails/shThemeEmacs.scss +32 -0
  55. data/vendor/assets/stylesheets/syntax-highlighter-rails/shThemeFadeToGrey.scss +36 -0
  56. data/vendor/assets/stylesheets/syntax-highlighter-rails/shThemeMDUltra.scss +32 -0
  57. data/vendor/assets/stylesheets/syntax-highlighter-rails/shThemeMidnight.scss +32 -0
  58. data/vendor/assets/stylesheets/syntax-highlighter-rails/shThemeRDark.scss +32 -0
  59. metadata +126 -0
@@ -0,0 +1,64 @@
1
+ ;(function ()
2
+ {
3
+ // CommonJS
4
+ SyntaxHighlighter = SyntaxHighlighter || (typeof require !== 'undefined'? require('shCore').SyntaxHighlighter : null);
5
+
6
+ function Brush ()
7
+ {
8
+
9
+ var inits = 'class interface package macro enum typedef extends implements dynamic in for if while else do try switch case catch';
10
+
11
+ var keywords = 'return break continue new throw cast using import function public private inline static untyped callback true false null Int Float String Void Std Bool Dynamic Array Vector';
12
+
13
+ this.regexList = [
14
+ { regex:SyntaxHighlighter.regexLib.singleLineCComments , css:'comments' },
15
+ // one line comments
16
+ { regex:SyntaxHighlighter.regexLib.multiLineCComments , css:'comments' },
17
+ // multiline comments
18
+ { regex:SyntaxHighlighter.regexLib.doubleQuotedString , css:'string' },
19
+ // double quoted strings
20
+ { regex:SyntaxHighlighter.regexLib.singleQuotedString , css:'string' },
21
+ // single quoted strings
22
+ { regex:/\b([\d]+(\.[\d]+)?|0x[a-f0-9]+)\b/gi , css:'value' },
23
+ // numbers
24
+ { regex:new RegExp ( this.getKeywords ( inits ) , 'gm' ) , css:'color3' },
25
+ // initializations
26
+ { regex:new RegExp ( this.getKeywords ( keywords ) , 'gm' ) , css:'keyword' },
27
+ // keywords
28
+ { regex:new RegExp ( 'var' , 'gm' ) , css:'variable' },
29
+ // variable
30
+ { regex:new RegExp ( 'trace' , 'gm' ) , css:'color1' },
31
+ //compiler conditionals
32
+ { regex:new RegExp ( '#if' , 'gm' ) , css:'comments' },
33
+ { regex:new RegExp ( '#elseif' , 'gm' ) , css:'comments' },
34
+ { regex:new RegExp ( '#end' , 'gm' ) , css:'comments' },
35
+ { regex:new RegExp ( '#error' , 'gm' ) , css:'comments' }
36
+ ];
37
+
38
+ //standard compiler conditionals flags
39
+ var flags = [
40
+ "debug", "error", "cpp", "js", "neko", "php", "flash", "flash8", "flash9", "flash10", "flash10", "mobile", "desktop", "web", "ios", "android", "iphone"
41
+ ];
42
+
43
+ //append the flags to the array with a ! operator
44
+ var i;
45
+ var length = flags.length;
46
+ for ( i = 0 ; i <= length - 1 ; i ++ )
47
+ {
48
+ this.regexList.push ( {regex:new RegExp ( flags[i] , 'gm' ) , css:'comments'} );
49
+ this.regexList.push ( {regex:new RegExp ( '!' + flags[i] , 'gm' ) , css:'comments'} );
50
+ }
51
+
52
+ this.forHtmlScript ( SyntaxHighlighter.regexLib.scriptScriptTags );
53
+ }
54
+
55
+ ;
56
+
57
+ Brush.prototype = new SyntaxHighlighter.Highlighter ();
58
+ Brush.aliases = ['haxe', 'hx'];
59
+
60
+ SyntaxHighlighter.brushes.Haxe = Brush;
61
+
62
+ // CommonJS
63
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
64
+ }) ();
@@ -0,0 +1,36 @@
1
+ ;(function()
2
+ {
3
+ // CommonJS
4
+ SyntaxHighlighter = SyntaxHighlighter || (typeof require !== 'undefined'? require('shCore').SyntaxHighlighter : null);
5
+
6
+ function Brush()
7
+ {
8
+ var keywords = 'break case catch class continue ' +
9
+ 'default delete do else enum export extends false ' +
10
+ 'for function if implements import in instanceof ' +
11
+ 'interface let new null package private protected ' +
12
+ 'static return super switch ' +
13
+ 'this throw true try typeof var while with yield';
14
+
15
+ var r = SyntaxHighlighter.regexLib;
16
+
17
+ this.regexList = [
18
+ { regex: r.multiLineDoubleQuotedString, css: 'string' }, // double quoted strings
19
+ { regex: r.multiLineSingleQuotedString, css: 'string' }, // single quoted strings
20
+ { regex: r.singleLineCComments, css: 'comments' }, // one line comments
21
+ { regex: r.multiLineCComments, css: 'comments' }, // multiline comments
22
+ { regex: /\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion
23
+ { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keywords
24
+ ];
25
+
26
+ this.forHtmlScript(r.scriptScriptTags);
27
+ };
28
+
29
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
30
+ Brush.aliases = ['js', 'jscript', 'javascript', 'json'];
31
+
32
+ SyntaxHighlighter.brushes.JScript = Brush;
33
+
34
+ // CommonJS
35
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
36
+ })();
@@ -0,0 +1,41 @@
1
+ ;(function()
2
+ {
3
+ // CommonJS
4
+ SyntaxHighlighter = SyntaxHighlighter || (typeof require !== 'undefined'? require('shCore').SyntaxHighlighter : null);
5
+
6
+ function Brush()
7
+ {
8
+ var keywords = 'abstract assert boolean break byte case catch char class const ' +
9
+ 'continue default do double else enum extends ' +
10
+ 'false final finally float for goto if implements import ' +
11
+ 'instanceof int interface long native new null ' +
12
+ 'package private protected public return ' +
13
+ 'short static strictfp super switch synchronized this throw throws true ' +
14
+ 'transient try void volatile while';
15
+
16
+ this.regexList = [
17
+ { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
18
+ { regex: /\/\*([^\*][\s\S]*?)?\*\//gm, css: 'comments' }, // multiline comments
19
+ { regex: /\/\*(?!\*\/)\*[\s\S]*?\*\//gm, css: 'preprocessor' }, // documentation comments
20
+ { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
21
+ { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
22
+ { regex: /\b([\d]+(\.[\d]+)?|0x[a-f0-9]+)\b/gi, css: 'value' }, // numbers
23
+ { regex: /(?!\@interface\b)\@[\$\w]+\b/g, css: 'color1' }, // annotation @anno
24
+ { regex: /\@interface\b/g, css: 'color2' }, // @interface keyword
25
+ { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // java keyword
26
+ ];
27
+
28
+ this.forHtmlScript({
29
+ left : /(&lt;|<)%[@!=]?/g,
30
+ right : /%(&gt;|>)/g
31
+ });
32
+ };
33
+
34
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
35
+ Brush.aliases = ['java'];
36
+
37
+ SyntaxHighlighter.brushes.Java = Brush;
38
+
39
+ // CommonJS
40
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
41
+ })();
@@ -0,0 +1,42 @@
1
+ ;(function()
2
+ {
3
+ // CommonJS
4
+ SyntaxHighlighter = SyntaxHighlighter || (typeof require !== 'undefined'? require('shCore').SyntaxHighlighter : null);
5
+
6
+ function Brush()
7
+ {
8
+ // Contributed by Patrick Webster
9
+ // http://patrickwebster.blogspot.com/2009/04/javafx-brush-for-syntaxhighlighter.html
10
+ var datatypes = 'Boolean Byte Character Double Duration '
11
+ + 'Float Integer Long Number Short String Void'
12
+ ;
13
+
14
+ var keywords = 'abstract after and as assert at before bind bound break catch class '
15
+ + 'continue def delete else exclusive extends false finally first for from '
16
+ + 'function if import in indexof init insert instanceof into inverse last '
17
+ + 'lazy mixin mod nativearray new not null on or override package postinit '
18
+ + 'protected public public-init public-read replace return reverse sizeof '
19
+ + 'step super then this throw true try tween typeof var where while with '
20
+ + 'attribute let private readonly static trigger'
21
+ ;
22
+
23
+ this.regexList = [
24
+ { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' },
25
+ { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' },
26
+ { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' },
27
+ { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' },
28
+ { regex: /(-?\.?)(\b(\d*\.?\d+|\d+\.?\d*)(e[+-]?\d+)?|0x[a-f\d]+)\b\.?/gi, css: 'color2' }, // numbers
29
+ { regex: new RegExp(this.getKeywords(datatypes), 'gm'), css: 'variable' }, // datatypes
30
+ { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }
31
+ ];
32
+ this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
33
+ };
34
+
35
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
36
+ Brush.aliases = ['jfx', 'javafx'];
37
+
38
+ SyntaxHighlighter.brushes.JavaFX = Brush;
39
+
40
+ // CommonJS
41
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
42
+ })();
@@ -0,0 +1,80 @@
1
+ ;(function()
2
+ {
3
+ // CommonJS
4
+ SyntaxHighlighter = SyntaxHighlighter || (typeof require !== 'undefined'? require('shCore').SyntaxHighlighter : null);
5
+
6
+ function Brush()
7
+ {
8
+ // Contributed by David Simmons-Duffin and Marty Kube
9
+
10
+ var funcs =
11
+ 'abs accept alarm atan2 bind binmode chdir chmod chomp chop chown chr ' +
12
+ 'chroot close closedir connect cos crypt defined delete each endgrent ' +
13
+ 'endhostent endnetent endprotoent endpwent endservent eof exec exists ' +
14
+ 'exp fcntl fileno flock fork format formline getc getgrent getgrgid ' +
15
+ 'getgrnam gethostbyaddr gethostbyname gethostent getlogin getnetbyaddr ' +
16
+ 'getnetbyname getnetent getpeername getpgrp getppid getpriority ' +
17
+ 'getprotobyname getprotobynumber getprotoent getpwent getpwnam getpwuid ' +
18
+ 'getservbyname getservbyport getservent getsockname getsockopt glob ' +
19
+ 'gmtime grep hex index int ioctl join keys kill lc lcfirst length link ' +
20
+ 'listen localtime lock log lstat map mkdir msgctl msgget msgrcv msgsnd ' +
21
+ 'oct open opendir ord pack pipe pop pos print printf prototype push ' +
22
+ 'quotemeta rand read readdir readline readlink readpipe recv rename ' +
23
+ 'reset reverse rewinddir rindex rmdir scalar seek seekdir select semctl ' +
24
+ 'semget semop send setgrent sethostent setnetent setpgrp setpriority ' +
25
+ 'setprotoent setpwent setservent setsockopt shift shmctl shmget shmread ' +
26
+ 'shmwrite shutdown sin sleep socket socketpair sort splice split sprintf ' +
27
+ 'sqrt srand stat study substr symlink syscall sysopen sysread sysseek ' +
28
+ 'system syswrite tell telldir time times tr truncate uc ucfirst umask ' +
29
+ 'undef unlink unpack unshift utime values vec wait waitpid warn write ' +
30
+ // feature
31
+ 'say';
32
+
33
+ var keywords =
34
+ 'bless caller continue dbmclose dbmopen die do dump else elsif eval exit ' +
35
+ 'for foreach goto if import last local my next no our package redo ref ' +
36
+ 'require return sub tie tied unless untie until use wantarray while ' +
37
+ // feature
38
+ 'given when default ' +
39
+ // Try::Tiny
40
+ 'try catch finally ' +
41
+ // Moose
42
+ 'has extends with before after around override augment';
43
+
44
+ this.regexList = [
45
+ { regex: /(<<|&lt;&lt;)((\w+)|(['"])(.+?)\4)[\s\S]+?\n\3\5\n/g, css: 'string' }, // here doc (maybe html encoded)
46
+ { regex: /#.*$/gm, css: 'comments' },
47
+ { regex: /^#!.*\n/g, css: 'preprocessor' }, // shebang
48
+ { regex: /-?\w+(?=\s*=(>|&gt;))/g, css: 'string' }, // fat comma
49
+
50
+ // is this too much?
51
+ { regex: /\bq[qwxr]?\([\s\S]*?\)/g, css: 'string' }, // quote-like operators ()
52
+ { regex: /\bq[qwxr]?\{[\s\S]*?\}/g, css: 'string' }, // quote-like operators {}
53
+ { regex: /\bq[qwxr]?\[[\s\S]*?\]/g, css: 'string' }, // quote-like operators []
54
+ { regex: /\bq[qwxr]?(<|&lt;)[\s\S]*?(>|&gt;)/g, css: 'string' }, // quote-like operators <>
55
+ { regex: /\bq[qwxr]?([^\w({<[])[\s\S]*?\1/g, css: 'string' }, // quote-like operators non-paired
56
+
57
+ { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' },
58
+ { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' },
59
+ // currently ignoring single quote package separator and utf8 names
60
+ { regex: /(?:&amp;|[$@%*]|\$#)\$?[a-zA-Z_](\w+|::)*/g, css: 'variable' },
61
+ { regex: /\b__(?:END|DATA)__\b[\s\S]*$/g, css: 'comments' },
62
+
63
+ // don't capture the newline after =cut so that =cut\n\n=head1 will start a new pod section
64
+ { regex: /(^|\n)=\w[\s\S]*?(\n=cut\s*(?=\n)|$)/g, css: 'comments' }, // pod
65
+
66
+ { regex: new RegExp(this.getKeywords(funcs), 'gm'), css: 'functions' },
67
+ { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }
68
+ ];
69
+
70
+ this.forHtmlScript(SyntaxHighlighter.regexLib.phpScriptTags);
71
+ }
72
+
73
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
74
+ Brush.aliases = ['perl', 'Perl', 'pl'];
75
+
76
+ SyntaxHighlighter.brushes.Perl = Brush;
77
+
78
+ // CommonJS
79
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
80
+ })();
@@ -0,0 +1,72 @@
1
+ ;(function()
2
+ {
3
+ // CommonJS
4
+ SyntaxHighlighter = SyntaxHighlighter || (typeof require !== 'undefined'? require('shCore').SyntaxHighlighter : null);
5
+
6
+ function Brush()
7
+ {
8
+ var funcs = 'abs acos acosh addcslashes addslashes ' +
9
+ 'array_change_key_case array_chunk array_combine array_count_values array_diff '+
10
+ 'array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_fill '+
11
+ 'array_filter array_flip array_intersect array_intersect_assoc array_intersect_key '+
12
+ 'array_intersect_uassoc array_intersect_ukey array_key_exists array_keys array_map '+
13
+ 'array_merge array_merge_recursive array_multisort array_pad array_pop array_product '+
14
+ 'array_push array_rand array_reduce array_reverse array_search array_shift '+
15
+ 'array_slice array_splice array_sum array_udiff array_udiff_assoc '+
16
+ 'array_udiff_uassoc array_uintersect array_uintersect_assoc '+
17
+ 'array_uintersect_uassoc array_unique array_unshift array_values array_walk '+
18
+ 'array_walk_recursive atan atan2 atanh base64_decode base64_encode base_convert '+
19
+ 'basename bcadd bccomp bcdiv bcmod bcmul bindec bindtextdomain bzclose bzcompress '+
20
+ 'bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite ceil chdir '+
21
+ 'checkdate checkdnsrr chgrp chmod chop chown chr chroot chunk_split class_exists '+
22
+ 'closedir closelog copy cos cosh count count_chars date decbin dechex decoct '+
23
+ 'deg2rad delete ebcdic2ascii echo empty end ereg ereg_replace eregi eregi_replace error_log '+
24
+ 'error_reporting escapeshellarg escapeshellcmd eval exec exit exp explode extension_loaded '+
25
+ 'feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents '+
26
+ 'fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype '+
27
+ 'floatval flock floor flush fmod fnmatch fopen fpassthru fprintf fputcsv fputs fread fscanf '+
28
+ 'fseek fsockopen fstat ftell ftok getallheaders getcwd getdate getenv gethostbyaddr gethostbyname '+
29
+ 'gethostbynamel getimagesize getlastmod getmxrr getmygid getmyinode getmypid getmyuid getopt '+
30
+ 'getprotobyname getprotobynumber getrandmax getrusage getservbyname getservbyport gettext '+
31
+ 'gettimeofday gettype glob gmdate gmmktime ini_alter ini_get ini_get_all ini_restore ini_set '+
32
+ 'interface_exists intval ip2long is_a is_array is_bool is_callable is_dir is_double '+
33
+ 'is_executable is_file is_finite is_float is_infinite is_int is_integer is_link is_long '+
34
+ 'is_nan is_null is_numeric is_object is_readable is_real is_resource is_scalar is_soap_fault '+
35
+ 'is_string is_subclass_of is_uploaded_file is_writable is_writeable mkdir mktime nl2br '+
36
+ 'parse_ini_file parse_str parse_url passthru pathinfo print readlink realpath rewind rewinddir rmdir '+
37
+ 'round str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split '+
38
+ 'str_word_count strcasecmp strchr strcmp strcoll strcspn strftime strip_tags stripcslashes '+
39
+ 'stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpbrk '+
40
+ 'strpos strptime strrchr strrev strripos strrpos strspn strstr strtok strtolower strtotime '+
41
+ 'strtoupper strtr strval substr substr_compare';
42
+
43
+ var keywords = 'abstract and array as break case catch cfunction class clone const continue declare default die do ' +
44
+ 'else elseif enddeclare endfor endforeach endif endswitch endwhile extends final for foreach ' +
45
+ 'function global goto if implements include include_once interface instanceof insteadof namespace new ' +
46
+ 'old_function or private protected public return require require_once static switch ' +
47
+ 'trait throw try use var while xor ';
48
+
49
+ var constants = '__FILE__ __LINE__ __METHOD__ __FUNCTION__ __CLASS__';
50
+
51
+ this.regexList = [
52
+ { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
53
+ { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
54
+ { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
55
+ { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
56
+ { regex: /\$\w+/g, css: 'variable' }, // variables
57
+ { regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' }, // common functions
58
+ { regex: new RegExp(this.getKeywords(constants), 'gmi'), css: 'constants' }, // constants
59
+ { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keyword
60
+ ];
61
+
62
+ this.forHtmlScript(SyntaxHighlighter.regexLib.phpScriptTags);
63
+ };
64
+
65
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
66
+ Brush.aliases = ['php'];
67
+
68
+ SyntaxHighlighter.brushes.Php = Brush;
69
+
70
+ // CommonJS
71
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
72
+ })();
@@ -0,0 +1,17 @@
1
+ ;(function()
2
+ {
3
+ // CommonJS
4
+ SyntaxHighlighter = SyntaxHighlighter || (typeof require !== 'undefined'? require('shCore').SyntaxHighlighter : null);
5
+
6
+ function Brush()
7
+ {
8
+ };
9
+
10
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
11
+ Brush.aliases = ['text', 'plain'];
12
+
13
+ SyntaxHighlighter.brushes.Plain = Brush;
14
+
15
+ // CommonJS
16
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
17
+ })();
@@ -0,0 +1,59 @@
1
+ ;(function()
2
+ {
3
+ // CommonJS
4
+ SyntaxHighlighter = SyntaxHighlighter || (typeof require !== 'undefined'? require('shCore').SyntaxHighlighter : null);
5
+
6
+ function Brush()
7
+ {
8
+ // Contributed by Joel 'Jaykul' Bennett, http://PoshCode.org | http://HuddledMasses.org
9
+ var keywords = 'while validateset validaterange validatepattern validatelength validatecount ' +
10
+ 'until trap switch return ref process param parameter in if global: '+
11
+ 'function foreach for finally filter end elseif else dynamicparam do default ' +
12
+ 'continue cmdletbinding break begin alias \\? % #script #private #local #global '+
13
+ 'mandatory parametersetname position valuefrompipeline ' +
14
+ 'valuefrompipelinebypropertyname valuefromremainingarguments helpmessage ';
15
+
16
+ var operators = ' and as band bnot bor bxor casesensitive ccontains ceq cge cgt cle ' +
17
+ 'clike clt cmatch cne cnotcontains cnotlike cnotmatch contains ' +
18
+ 'creplace eq exact f file ge gt icontains ieq ige igt ile ilike ilt ' +
19
+ 'imatch ine inotcontains inotlike inotmatch ireplace is isnot le like ' +
20
+ 'lt match ne not notcontains notlike notmatch or regex replace wildcard';
21
+
22
+ var verbs = 'write where wait use update unregister undo trace test tee take suspend ' +
23
+ 'stop start split sort skip show set send select scroll resume restore ' +
24
+ 'restart resolve resize reset rename remove register receive read push ' +
25
+ 'pop ping out new move measure limit join invoke import group get format ' +
26
+ 'foreach export expand exit enter enable disconnect disable debug cxnew ' +
27
+ 'copy convertto convertfrom convert connect complete compare clear ' +
28
+ 'checkpoint aggregate add';
29
+
30
+ // I can't find a way to match the comment based help in multi-line comments, because SH won't highlight in highlights, and javascript doesn't support lookbehind
31
+ var commenthelp = ' component description example externalhelp forwardhelpcategory forwardhelptargetname forwardhelptargetname functionality inputs link notes outputs parameter remotehelprunspace role synopsis';
32
+
33
+ this.regexList = [
34
+ { regex: new RegExp('^\\s*#[#\\s]*\\.('+this.getKeywords(commenthelp)+').*$', 'gim'), css: 'preprocessor help bold' }, // comment-based help
35
+ { regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' }, // one line comments
36
+ { regex: /(&lt;|<)#[\s\S]*?#(&gt;|>)/gm, css: 'comments here' }, // multi-line comments
37
+
38
+ { regex: new RegExp('@"\\n[\\s\\S]*?\\n"@', 'gm'), css: 'script string here' }, // double quoted here-strings
39
+ { regex: new RegExp("@'\\n[\\s\\S]*?\\n'@", 'gm'), css: 'script string single here' }, // single quoted here-strings
40
+ { regex: new RegExp('"(?:\\$\\([^\\)]*\\)|[^"]|`"|"")*[^`]"','g'), css: 'string' }, // double quoted strings
41
+ { regex: new RegExp("'(?:[^']|'')*'", 'g'), css: 'string single' }, // single quoted strings
42
+
43
+ { regex: new RegExp('[\\$|@|@@](?:(?:global|script|private|env):)?[A-Z0-9_]+', 'gi'), css: 'variable' }, // $variables
44
+ { regex: new RegExp('(?:\\b'+verbs.replace(/ /g, '\\b|\\b')+')-[a-zA-Z_][a-zA-Z0-9_]*', 'gmi'), css: 'functions' }, // functions and cmdlets
45
+ { regex: new RegExp(this.getKeywords(keywords), 'gmi'), css: 'keyword' }, // keywords
46
+ { regex: new RegExp('-'+this.getKeywords(operators), 'gmi'), css: 'operator value' }, // operators
47
+ { regex: new RegExp('\\[[A-Z_\\[][A-Z0-9_. `,\\[\\]]*\\]', 'gi'), css: 'constants' }, // .Net [Type]s
48
+ { regex: new RegExp('\\s+-(?!'+this.getKeywords(operators)+')[a-zA-Z_][a-zA-Z0-9_]*', 'gmi'), css: 'color1' }, // parameters
49
+ ];
50
+ };
51
+
52
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
53
+ Brush.aliases = ['powershell', 'ps', 'posh'];
54
+
55
+ SyntaxHighlighter.brushes.PowerShell = Brush;
56
+
57
+ // CommonJS
58
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
59
+ })();
@@ -0,0 +1,48 @@
1
+ ;(function()
2
+ {
3
+ // CommonJS
4
+ SyntaxHighlighter = SyntaxHighlighter || (typeof require !== 'undefined'? require('shCore').SyntaxHighlighter : null);
5
+
6
+ function Brush()
7
+ {
8
+ // Contributed by Gheorghe Milas and Ahmad Sherif
9
+
10
+ var keywords = 'and assert break class continue def del elif else ' +
11
+ 'except exec finally for from global if import in is ' +
12
+ 'lambda not or pass raise return try yield while';
13
+
14
+ var funcs = '__import__ abs all any apply basestring bin bool buffer callable ' +
15
+ 'chr classmethod cmp coerce compile complex delattr dict dir ' +
16
+ 'divmod enumerate eval execfile file filter float format frozenset ' +
17
+ 'getattr globals hasattr hash help hex id input int intern ' +
18
+ 'isinstance issubclass iter len list locals long map max min next ' +
19
+ 'object oct open ord pow print property range raw_input reduce ' +
20
+ 'reload repr reversed round set setattr slice sorted staticmethod ' +
21
+ 'str sum super tuple type type unichr unicode vars xrange zip';
22
+
23
+ var special = 'None True False self cls class_';
24
+
25
+ this.regexList = [
26
+ { regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' },
27
+ { regex: /^\s*@\w+/gm, css: 'decorator' },
28
+ { regex: /(['\"]{3})([^\1])*?\1/gm, css: 'comments' },
29
+ { regex: /"(?!")(?:\.|\\\"|[^\""\n])*"/gm, css: 'string' },
30
+ { regex: /'(?!')(?:\.|(\\\')|[^\''\n])*'/gm, css: 'string' },
31
+ { regex: /\+|\-|\*|\/|\%|=|==/gm, css: 'keyword' },
32
+ { regex: /\b\d+\.?\w*/g, css: 'value' },
33
+ { regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' },
34
+ { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' },
35
+ { regex: new RegExp(this.getKeywords(special), 'gm'), css: 'color1' }
36
+ ];
37
+
38
+ this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
39
+ };
40
+
41
+ Brush.prototype = new SyntaxHighlighter.Highlighter();
42
+ Brush.aliases = ['py', 'python'];
43
+
44
+ SyntaxHighlighter.brushes.Python = Brush;
45
+
46
+ // CommonJS
47
+ typeof(exports) != 'undefined' ? exports.Brush = Brush : null;
48
+ })();