trainbbcode 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. data/Manifest +0 -43
  2. data/Rakefile +1 -1
  3. data/lib/trainbbcode.rb +7 -4
  4. data/trainbbcode.gemspec +3 -3
  5. metadata +3 -45
  6. data/rails_generators/syntaxhighlighter/syntaxhighlighter_generator.rb +0 -30
  7. data/rails_generators/syntaxhighlighter/templates/scripts/clipboard.swf +0 -0
  8. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushAS3.js +0 -61
  9. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushBash.js +0 -66
  10. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushCSharp.js +0 -67
  11. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushColdFusion.js +0 -102
  12. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushCpp.js +0 -99
  13. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushCss.js +0 -93
  14. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushDelphi.js +0 -57
  15. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushDiff.js +0 -43
  16. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushErlang.js +0 -54
  17. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushGroovy.js +0 -69
  18. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushJScript.js +0 -52
  19. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushJava.js +0 -59
  20. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushJavaFX.js +0 -60
  21. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushPerl.js +0 -74
  22. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushPhp.js +0 -91
  23. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushPlain.js +0 -35
  24. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushPowerShell.js +0 -76
  25. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushPython.js +0 -66
  26. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushRuby.js +0 -57
  27. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushScala.js +0 -53
  28. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushSql.js +0 -68
  29. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushVb.js +0 -58
  30. data/rails_generators/syntaxhighlighter/templates/scripts/shBrushXml.js +0 -71
  31. data/rails_generators/syntaxhighlighter/templates/scripts/shCore.js +0 -30
  32. data/rails_generators/syntaxhighlighter/templates/scripts/shLegacy.js +0 -30
  33. data/rails_generators/syntaxhighlighter/templates/src/shCore.js +0 -2077
  34. data/rails_generators/syntaxhighlighter/templates/src/shLegacy.js +0 -172
  35. data/rails_generators/syntaxhighlighter/templates/styles/help.png +0 -0
  36. data/rails_generators/syntaxhighlighter/templates/styles/magnifier.png +0 -0
  37. data/rails_generators/syntaxhighlighter/templates/styles/page_white_code.png +0 -0
  38. data/rails_generators/syntaxhighlighter/templates/styles/page_white_copy.png +0 -0
  39. data/rails_generators/syntaxhighlighter/templates/styles/printer.png +0 -0
  40. data/rails_generators/syntaxhighlighter/templates/styles/shCore.css +0 -330
  41. data/rails_generators/syntaxhighlighter/templates/styles/shThemeDefault.css +0 -173
  42. data/rails_generators/syntaxhighlighter/templates/styles/shThemeDjango.css +0 -176
  43. data/rails_generators/syntaxhighlighter/templates/styles/shThemeEclipse.css +0 -190
  44. data/rails_generators/syntaxhighlighter/templates/styles/shThemeEmacs.css +0 -175
  45. data/rails_generators/syntaxhighlighter/templates/styles/shThemeFadeToGrey.css +0 -177
  46. data/rails_generators/syntaxhighlighter/templates/styles/shThemeMidnight.css +0 -175
  47. data/rails_generators/syntaxhighlighter/templates/styles/shThemeRDark.css +0 -175
@@ -1,59 +0,0 @@
1
- /**
2
- * SyntaxHighlighter
3
- * http://alexgorbatchev.com/
4
- *
5
- * SyntaxHighlighter is donationware. If you are using it, please donate.
6
- * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
7
- *
8
- * @version
9
- * 2.1.364 (October 15 2009)
10
- *
11
- * @copyright
12
- * Copyright (C) 2004-2009 Alex Gorbatchev.
13
- *
14
- * @license
15
- * This file is part of SyntaxHighlighter.
16
- *
17
- * SyntaxHighlighter is free software: you can redistribute it and/or modify
18
- * it under the terms of the GNU Lesser General Public License as published by
19
- * the Free Software Foundation, either version 3 of the License, or
20
- * (at your option) any later version.
21
- *
22
- * SyntaxHighlighter is distributed in the hope that it will be useful,
23
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
24
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25
- * GNU General Public License for more details.
26
- *
27
- * You should have received a copy of the GNU General Public License
28
- * along with SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
29
- */
30
- SyntaxHighlighter.brushes.Java = function()
31
- {
32
- var keywords = 'abstract assert boolean break byte case catch char class const ' +
33
- 'continue default do double else enum extends ' +
34
- 'false final finally float for goto if implements import ' +
35
- 'instanceof int interface long native new null ' +
36
- 'package private protected public return ' +
37
- 'short static strictfp super switch synchronized this throw throws true ' +
38
- 'transient try void volatile while';
39
-
40
- this.regexList = [
41
- { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
42
- { regex: /\/\*([^\*][\s\S]*)?\*\//gm, css: 'comments' }, // multiline comments
43
- { regex: /\/\*(?!\*\/)\*[\s\S]*?\*\//gm, css: 'preprocessor' }, // documentation comments
44
- { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
45
- { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
46
- { regex: /\b([\d]+(\.[\d]+)?|0x[a-f0-9]+)\b/gi, css: 'value' }, // numbers
47
- { regex: /(?!\@interface\b)\@[\$\w]+\b/g, css: 'color1' }, // annotation @anno
48
- { regex: /\@interface\b/g, css: 'color2' }, // @interface keyword
49
- { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // java keyword
50
- ];
51
-
52
- this.forHtmlScript({
53
- left : /(&lt;|<)%[@!=]?/g,
54
- right : /%(&gt;|>)/g
55
- });
56
- };
57
-
58
- SyntaxHighlighter.brushes.Java.prototype = new SyntaxHighlighter.Highlighter();
59
- SyntaxHighlighter.brushes.Java.aliases = ['java'];
@@ -1,60 +0,0 @@
1
- /**
2
- * SyntaxHighlighter
3
- * http://alexgorbatchev.com/
4
- *
5
- * SyntaxHighlighter is donationware. If you are using it, please donate.
6
- * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
7
- *
8
- * @version
9
- * 2.1.364 (October 15 2009)
10
- *
11
- * @copyright
12
- * Copyright (C) 2004-2009 Alex Gorbatchev.
13
- *
14
- * @license
15
- * This file is part of SyntaxHighlighter.
16
- *
17
- * SyntaxHighlighter is free software: you can redistribute it and/or modify
18
- * it under the terms of the GNU Lesser General Public License as published by
19
- * the Free Software Foundation, either version 3 of the License, or
20
- * (at your option) any later version.
21
- *
22
- * SyntaxHighlighter is distributed in the hope that it will be useful,
23
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
24
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25
- * GNU General Public License for more details.
26
- *
27
- * You should have received a copy of the GNU General Public License
28
- * along with SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
29
- */
30
- SyntaxHighlighter.brushes.JavaFX = function()
31
- {
32
- // Contributed by Patrick Webster
33
- // http://patrickwebster.blogspot.com/2009/04/javafx-brush-for-syntaxhighlighter.html
34
- var datatypes = 'Boolean Byte Character Double Duration '
35
- + 'Float Integer Long Number Short String Void'
36
- ;
37
-
38
- var keywords = 'abstract after and as assert at before bind bound break catch class '
39
- + 'continue def delete else exclusive extends false finally first for from '
40
- + 'function if import in indexof init insert instanceof into inverse last '
41
- + 'lazy mixin mod nativearray new not null on or override package postinit '
42
- + 'protected public public-init public-read replace return reverse sizeof '
43
- + 'step super then this throw true try tween typeof var where while with '
44
- + 'attribute let private readonly static trigger'
45
- ;
46
-
47
- this.regexList = [
48
- { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' },
49
- { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' },
50
- { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' },
51
- { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' },
52
- { regex: /(-?\.?)(\b(\d*\.?\d+|\d+\.?\d*)(e[+-]?\d+)?|0x[a-f\d]+)\b\.?/gi, css: 'color2' }, // numbers
53
- { regex: new RegExp(this.getKeywords(datatypes), 'gm'), css: 'variable' }, // datatypes
54
- { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }
55
- ];
56
- this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
57
- };
58
-
59
- SyntaxHighlighter.brushes.JavaFX.prototype = new SyntaxHighlighter.Highlighter();
60
- SyntaxHighlighter.brushes.JavaFX.aliases = ['jfx', 'javafx'];
@@ -1,74 +0,0 @@
1
- /**
2
- * SyntaxHighlighter
3
- * http://alexgorbatchev.com/
4
- *
5
- * SyntaxHighlighter is donationware. If you are using it, please donate.
6
- * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
7
- *
8
- * @version
9
- * 2.1.364 (October 15 2009)
10
- *
11
- * @copyright
12
- * Copyright (C) 2004-2009 Alex Gorbatchev.
13
- *
14
- * @license
15
- * This file is part of SyntaxHighlighter.
16
- *
17
- * SyntaxHighlighter is free software: you can redistribute it and/or modify
18
- * it under the terms of the GNU Lesser General Public License as published by
19
- * the Free Software Foundation, either version 3 of the License, or
20
- * (at your option) any later version.
21
- *
22
- * SyntaxHighlighter is distributed in the hope that it will be useful,
23
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
24
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25
- * GNU General Public License for more details.
26
- *
27
- * You should have received a copy of the GNU General Public License
28
- * along with SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
29
- */
30
- SyntaxHighlighter.brushes.Perl = function()
31
- {
32
- // Contributed by David Simmons-Duffin and Marty Kube
33
-
34
- var funcs =
35
- 'abs accept alarm atan2 bind binmode chdir chmod chomp chop chown chr ' +
36
- 'chroot close closedir connect cos crypt defined delete each endgrent ' +
37
- 'endhostent endnetent endprotoent endpwent endservent eof exec exists ' +
38
- 'exp fcntl fileno flock fork format formline getc getgrent getgrgid ' +
39
- 'getgrnam gethostbyaddr gethostbyname gethostent getlogin getnetbyaddr ' +
40
- 'getnetbyname getnetent getpeername getpgrp getppid getpriority ' +
41
- 'getprotobyname getprotobynumber getprotoent getpwent getpwnam getpwuid ' +
42
- 'getservbyname getservbyport getservent getsockname getsockopt glob ' +
43
- 'gmtime grep hex index int ioctl join keys kill lc lcfirst length link ' +
44
- 'listen localtime lock log lstat map mkdir msgctl msgget msgrcv msgsnd ' +
45
- 'oct open opendir ord pack pipe pop pos print printf prototype push ' +
46
- 'quotemeta rand read readdir readline readlink readpipe recv rename ' +
47
- 'reset reverse rewinddir rindex rmdir scalar seek seekdir select semctl ' +
48
- 'semget semop send setgrent sethostent setnetent setpgrp setpriority ' +
49
- 'setprotoent setpwent setservent setsockopt shift shmctl shmget shmread ' +
50
- 'shmwrite shutdown sin sleep socket socketpair sort splice split sprintf ' +
51
- 'sqrt srand stat study substr symlink syscall sysopen sysread sysseek ' +
52
- 'system syswrite tell telldir time times tr truncate uc ucfirst umask ' +
53
- 'undef unlink unpack unshift utime values vec wait waitpid warn write';
54
-
55
- var keywords =
56
- 'bless caller continue dbmclose dbmopen die do dump else elsif eval exit ' +
57
- 'for foreach goto if import last local my next no our package redo ref ' +
58
- 'require return sub tie tied unless untie until use wantarray while';
59
-
60
- this.regexList = [
61
- { regex: new RegExp('#[^!].*$', 'gm'), css: 'comments' },
62
- { regex: new RegExp('^\\s*#!.*$', 'gm'), css: 'preprocessor' }, // shebang
63
- { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' },
64
- { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' },
65
- { regex: new RegExp('(\\$|@|%)\\w+', 'g'), css: 'variable' },
66
- { regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' },
67
- { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }
68
- ];
69
-
70
- this.forHtmlScript(SyntaxHighlighter.regexLib.phpScriptTags);
71
- }
72
-
73
- SyntaxHighlighter.brushes.Perl.prototype = new SyntaxHighlighter.Highlighter();
74
- SyntaxHighlighter.brushes.Perl.aliases = ['perl', 'Perl', 'pl'];
@@ -1,91 +0,0 @@
1
- /**
2
- * SyntaxHighlighter
3
- * http://alexgorbatchev.com/
4
- *
5
- * SyntaxHighlighter is donationware. If you are using it, please donate.
6
- * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
7
- *
8
- * @version
9
- * 2.1.364 (October 15 2009)
10
- *
11
- * @copyright
12
- * Copyright (C) 2004-2009 Alex Gorbatchev.
13
- *
14
- * @license
15
- * This file is part of SyntaxHighlighter.
16
- *
17
- * SyntaxHighlighter is free software: you can redistribute it and/or modify
18
- * it under the terms of the GNU Lesser General Public License as published by
19
- * the Free Software Foundation, either version 3 of the License, or
20
- * (at your option) any later version.
21
- *
22
- * SyntaxHighlighter is distributed in the hope that it will be useful,
23
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
24
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25
- * GNU General Public License for more details.
26
- *
27
- * You should have received a copy of the GNU General Public License
28
- * along with SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
29
- */
30
- SyntaxHighlighter.brushes.Php = function()
31
- {
32
- var funcs = 'abs acos acosh addcslashes addslashes ' +
33
- 'array_change_key_case array_chunk array_combine array_count_values array_diff '+
34
- 'array_diff_assoc array_diff_key array_diff_uassoc array_diff_ukey array_fill '+
35
- 'array_filter array_flip array_intersect array_intersect_assoc array_intersect_key '+
36
- 'array_intersect_uassoc array_intersect_ukey array_key_exists array_keys array_map '+
37
- 'array_merge array_merge_recursive array_multisort array_pad array_pop array_product '+
38
- 'array_push array_rand array_reduce array_reverse array_search array_shift '+
39
- 'array_slice array_splice array_sum array_udiff array_udiff_assoc '+
40
- 'array_udiff_uassoc array_uintersect array_uintersect_assoc '+
41
- 'array_uintersect_uassoc array_unique array_unshift array_values array_walk '+
42
- 'array_walk_recursive atan atan2 atanh base64_decode base64_encode base_convert '+
43
- 'basename bcadd bccomp bcdiv bcmod bcmul bindec bindtextdomain bzclose bzcompress '+
44
- 'bzdecompress bzerrno bzerror bzerrstr bzflush bzopen bzread bzwrite ceil chdir '+
45
- 'checkdate checkdnsrr chgrp chmod chop chown chr chroot chunk_split class_exists '+
46
- 'closedir closelog copy cos cosh count count_chars date decbin dechex decoct '+
47
- 'deg2rad delete ebcdic2ascii echo empty end ereg ereg_replace eregi eregi_replace error_log '+
48
- 'error_reporting escapeshellarg escapeshellcmd eval exec exit exp explode extension_loaded '+
49
- 'feof fflush fgetc fgetcsv fgets fgetss file_exists file_get_contents file_put_contents '+
50
- 'fileatime filectime filegroup fileinode filemtime fileowner fileperms filesize filetype '+
51
- 'floatval flock floor flush fmod fnmatch fopen fpassthru fprintf fputcsv fputs fread fscanf '+
52
- 'fseek fsockopen fstat ftell ftok getallheaders getcwd getdate getenv gethostbyaddr gethostbyname '+
53
- 'gethostbynamel getimagesize getlastmod getmxrr getmygid getmyinode getmypid getmyuid getopt '+
54
- 'getprotobyname getprotobynumber getrandmax getrusage getservbyname getservbyport gettext '+
55
- 'gettimeofday gettype glob gmdate gmmktime ini_alter ini_get ini_get_all ini_restore ini_set '+
56
- 'interface_exists intval ip2long is_a is_array is_bool is_callable is_dir is_double '+
57
- 'is_executable is_file is_finite is_float is_infinite is_int is_integer is_link is_long '+
58
- 'is_nan is_null is_numeric is_object is_readable is_real is_resource is_scalar is_soap_fault '+
59
- 'is_string is_subclass_of is_uploaded_file is_writable is_writeable mkdir mktime nl2br '+
60
- 'parse_ini_file parse_str parse_url passthru pathinfo readlink realpath rewind rewinddir rmdir '+
61
- 'round str_ireplace str_pad str_repeat str_replace str_rot13 str_shuffle str_split '+
62
- 'str_word_count strcasecmp strchr strcmp strcoll strcspn strftime strip_tags stripcslashes '+
63
- 'stripos stripslashes stristr strlen strnatcasecmp strnatcmp strncasecmp strncmp strpbrk '+
64
- 'strpos strptime strrchr strrev strripos strrpos strspn strstr strtok strtolower strtotime '+
65
- 'strtoupper strtr strval substr substr_compare';
66
-
67
- var keywords = 'and or xor array as break case ' +
68
- 'cfunction class const continue declare default die do else ' +
69
- 'elseif enddeclare endfor endforeach endif endswitch endwhile ' +
70
- 'extends for foreach function include include_once global if ' +
71
- 'new old_function return static switch use require require_once ' +
72
- 'var while abstract interface public implements extends private protected throw';
73
-
74
- var constants = '__FILE__ __LINE__ __METHOD__ __FUNCTION__ __CLASS__';
75
-
76
- this.regexList = [
77
- { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
78
- { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
79
- { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
80
- { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
81
- { regex: /\$\w+/g, css: 'variable' }, // variables
82
- { regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' }, // common functions
83
- { regex: new RegExp(this.getKeywords(constants), 'gmi'), css: 'constants' }, // constants
84
- { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keyword
85
- ];
86
-
87
- this.forHtmlScript(SyntaxHighlighter.regexLib.phpScriptTags);
88
- };
89
-
90
- SyntaxHighlighter.brushes.Php.prototype = new SyntaxHighlighter.Highlighter();
91
- SyntaxHighlighter.brushes.Php.aliases = ['php'];
@@ -1,35 +0,0 @@
1
- /**
2
- * SyntaxHighlighter
3
- * http://alexgorbatchev.com/
4
- *
5
- * SyntaxHighlighter is donationware. If you are using it, please donate.
6
- * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
7
- *
8
- * @version
9
- * 2.1.364 (October 15 2009)
10
- *
11
- * @copyright
12
- * Copyright (C) 2004-2009 Alex Gorbatchev.
13
- *
14
- * @license
15
- * This file is part of SyntaxHighlighter.
16
- *
17
- * SyntaxHighlighter is free software: you can redistribute it and/or modify
18
- * it under the terms of the GNU Lesser General Public License as published by
19
- * the Free Software Foundation, either version 3 of the License, or
20
- * (at your option) any later version.
21
- *
22
- * SyntaxHighlighter is distributed in the hope that it will be useful,
23
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
24
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25
- * GNU General Public License for more details.
26
- *
27
- * You should have received a copy of the GNU General Public License
28
- * along with SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
29
- */
30
- SyntaxHighlighter.brushes.Plain = function()
31
- {
32
- };
33
-
34
- SyntaxHighlighter.brushes.Plain.prototype = new SyntaxHighlighter.Highlighter();
35
- SyntaxHighlighter.brushes.Plain.aliases = ['text', 'plain'];
@@ -1,76 +0,0 @@
1
- /**
2
- * SyntaxHighlighter
3
- * http://alexgorbatchev.com/
4
- *
5
- * SyntaxHighlighter is donationware. If you are using it, please donate.
6
- * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
7
- *
8
- * @version
9
- * 2.1.364 (October 15 2009)
10
- *
11
- * @copyright
12
- * Copyright (C) 2004-2009 Alex Gorbatchev.
13
- *
14
- * @license
15
- * This file is part of SyntaxHighlighter.
16
- *
17
- * SyntaxHighlighter is free software: you can redistribute it and/or modify
18
- * it under the terms of the GNU Lesser General Public License as published by
19
- * the Free Software Foundation, either version 3 of the License, or
20
- * (at your option) any later version.
21
- *
22
- * SyntaxHighlighter is distributed in the hope that it will be useful,
23
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
24
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25
- * GNU General Public License for more details.
26
- *
27
- * You should have received a copy of the GNU General Public License
28
- * along with SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
29
- */
30
- SyntaxHighlighter.brushes.PowerShell = function()
31
- {
32
- // Contributes by B.v.Zanten, Getronics
33
- // http://confluence.atlassian.com/display/CONFEXT/New+Code+Macro
34
-
35
- var keywords = 'Add-Content Add-History Add-Member Add-PSSnapin Clear(-Content)? Clear-Item ' +
36
- 'Clear-ItemProperty Clear-Variable Compare-Object ConvertFrom-SecureString Convert-Path ' +
37
- 'ConvertTo-Html ConvertTo-SecureString Copy(-Item)? Copy-ItemProperty Export-Alias ' +
38
- 'Export-Clixml Export-Console Export-Csv ForEach(-Object)? Format-Custom Format-List ' +
39
- 'Format-Table Format-Wide Get-Acl Get-Alias Get-AuthenticodeSignature Get-ChildItem Get-Command ' +
40
- 'Get-Content Get-Credential Get-Culture Get-Date Get-EventLog Get-ExecutionPolicy ' +
41
- 'Get-Help Get-History Get-Host Get-Item Get-ItemProperty Get-Location Get-Member ' +
42
- 'Get-PfxCertificate Get-Process Get-PSDrive Get-PSProvider Get-PSSnapin Get-Service ' +
43
- 'Get-TraceSource Get-UICulture Get-Unique Get-Variable Get-WmiObject Group-Object ' +
44
- 'Import-Alias Import-Clixml Import-Csv Invoke-Expression Invoke-History Invoke-Item ' +
45
- 'Join-Path Measure-Command Measure-Object Move(-Item)? Move-ItemProperty New-Alias ' +
46
- 'New-Item New-ItemProperty New-Object New-PSDrive New-Service New-TimeSpan ' +
47
- 'New-Variable Out-Default Out-File Out-Host Out-Null Out-Printer Out-String Pop-Location ' +
48
- 'Push-Location Read-Host Remove-Item Remove-ItemProperty Remove-PSDrive Remove-PSSnapin ' +
49
- 'Remove-Variable Rename-Item Rename-ItemProperty Resolve-Path Restart-Service Resume-Service ' +
50
- 'Select-Object Select-String Set-Acl Set-Alias Set-AuthenticodeSignature Set-Content ' +
51
- 'Set-Date Set-ExecutionPolicy Set-Item Set-ItemProperty Set-Location Set-PSDebug ' +
52
- 'Set-Service Set-TraceSource Set(-Variable)? Sort-Object Split-Path Start-Service ' +
53
- 'Start-Sleep Start-Transcript Stop-Process Stop-Service Stop-Transcript Suspend-Service ' +
54
- 'Tee-Object Test-Path Trace-Command Update-FormatData Update-TypeData Where(-Object)? ' +
55
- 'Write-Debug Write-Error Write(-Host)? Write-Output Write-Progress Write-Verbose Write-Warning';
56
- var alias = 'ac asnp clc cli clp clv cpi cpp cvpa diff epal epcsv fc fl ' +
57
- 'ft fw gal gc gci gcm gdr ghy gi gl gm gp gps group gsv ' +
58
- 'gsnp gu gv gwmi iex ihy ii ipal ipcsv mi mp nal ndr ni nv oh rdr ' +
59
- 'ri rni rnp rp rsnp rv rvpa sal sasv sc select si sl sleep sort sp ' +
60
- 'spps spsv sv tee cat cd cp h history kill lp ls ' +
61
- 'mount mv popd ps pushd pwd r rm rmdir echo cls chdir del dir ' +
62
- 'erase rd ren type % \\?';
63
-
64
- this.regexList = [
65
- { regex: /#.*$/gm, css: 'comments' }, // one line comments
66
- { regex: /\$[a-zA-Z0-9]+\b/g, css: 'value' }, // variables $Computer1
67
- { regex: /\-[a-zA-Z]+\b/g, css: 'keyword' }, // Operators -not -and -eq
68
- { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
69
- { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
70
- { regex: new RegExp(this.getKeywords(keywords), 'gmi'), css: 'keyword' },
71
- { regex: new RegExp(this.getKeywords(alias), 'gmi'), css: 'keyword' }
72
- ];
73
- };
74
-
75
- SyntaxHighlighter.brushes.PowerShell.prototype = new SyntaxHighlighter.Highlighter();
76
- SyntaxHighlighter.brushes.PowerShell.aliases = ['powershell', 'ps'];
@@ -1,66 +0,0 @@
1
- /**
2
- * SyntaxHighlighter
3
- * http://alexgorbatchev.com/
4
- *
5
- * SyntaxHighlighter is donationware. If you are using it, please donate.
6
- * http://alexgorbatchev.com/wiki/SyntaxHighlighter:Donate
7
- *
8
- * @version
9
- * 2.1.364 (October 15 2009)
10
- *
11
- * @copyright
12
- * Copyright (C) 2004-2009 Alex Gorbatchev.
13
- *
14
- * @license
15
- * This file is part of SyntaxHighlighter.
16
- *
17
- * SyntaxHighlighter is free software: you can redistribute it and/or modify
18
- * it under the terms of the GNU Lesser General Public License as published by
19
- * the Free Software Foundation, either version 3 of the License, or
20
- * (at your option) any later version.
21
- *
22
- * SyntaxHighlighter is distributed in the hope that it will be useful,
23
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
24
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25
- * GNU General Public License for more details.
26
- *
27
- * You should have received a copy of the GNU General Public License
28
- * along with SyntaxHighlighter. If not, see <http://www.gnu.org/copyleft/lesser.html>.
29
- */
30
- SyntaxHighlighter.brushes.Python = function()
31
- {
32
- // Contributed by Gheorghe Milas and Ahmad Sherif
33
-
34
- var keywords = 'and assert break class continue def del elif else ' +
35
- 'except exec finally for from global if import in is ' +
36
- 'lambda not or pass print raise return try yield while';
37
-
38
- var funcs = '__import__ abs all any apply basestring bin bool buffer callable ' +
39
- 'chr classmethod cmp coerce compile complex delattr dict dir ' +
40
- 'divmod enumerate eval execfile file filter float format frozenset ' +
41
- 'getattr globals hasattr hash help hex id input int intern ' +
42
- 'isinstance issubclass iter len list locals long map max min next ' +
43
- 'object oct open ord pow print property range raw_input reduce ' +
44
- 'reload repr reversed round set setattr slice sorted staticmethod ' +
45
- 'str sum super tuple type type unichr unicode vars xrange zip';
46
-
47
- var special = 'None True False self cls class_';
48
-
49
- this.regexList = [
50
- { regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' },
51
- { regex: /^\s*@\w+/gm, css: 'decorator' },
52
- { regex: /(['\"]{3})([^\1])*?\1/gm, css: 'comments' },
53
- { regex: /"(?!")(?:\.|\\\"|[^\""\n])*"/gm, css: 'string' },
54
- { regex: /'(?!')(?:\.|(\\\')|[^\''\n])*'/gm, css: 'string' },
55
- { regex: /\+|\-|\*|\/|\%|=|==/gm, css: 'keyword' },
56
- { regex: /\b\d+\.?\w*/g, css: 'value' },
57
- { regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'functions' },
58
- { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' },
59
- { regex: new RegExp(this.getKeywords(special), 'gm'), css: 'color1' }
60
- ];
61
-
62
- this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
63
- };
64
-
65
- SyntaxHighlighter.brushes.Python.prototype = new SyntaxHighlighter.Highlighter();
66
- SyntaxHighlighter.brushes.Python.aliases = ['py', 'python'];