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,99 +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.Cpp = function()
31
- {
32
- // Copyright 2006 Shin, YoungJin
33
-
34
- var datatypes = 'ATOM BOOL BOOLEAN BYTE CHAR COLORREF DWORD DWORDLONG DWORD_PTR ' +
35
- 'DWORD32 DWORD64 FLOAT HACCEL HALF_PTR HANDLE HBITMAP HBRUSH ' +
36
- 'HCOLORSPACE HCONV HCONVLIST HCURSOR HDC HDDEDATA HDESK HDROP HDWP ' +
37
- 'HENHMETAFILE HFILE HFONT HGDIOBJ HGLOBAL HHOOK HICON HINSTANCE HKEY ' +
38
- 'HKL HLOCAL HMENU HMETAFILE HMODULE HMONITOR HPALETTE HPEN HRESULT ' +
39
- 'HRGN HRSRC HSZ HWINSTA HWND INT INT_PTR INT32 INT64 LANGID LCID LCTYPE ' +
40
- 'LGRPID LONG LONGLONG LONG_PTR LONG32 LONG64 LPARAM LPBOOL LPBYTE LPCOLORREF ' +
41
- 'LPCSTR LPCTSTR LPCVOID LPCWSTR LPDWORD LPHANDLE LPINT LPLONG LPSTR LPTSTR ' +
42
- 'LPVOID LPWORD LPWSTR LRESULT PBOOL PBOOLEAN PBYTE PCHAR PCSTR PCTSTR PCWSTR ' +
43
- 'PDWORDLONG PDWORD_PTR PDWORD32 PDWORD64 PFLOAT PHALF_PTR PHANDLE PHKEY PINT ' +
44
- 'PINT_PTR PINT32 PINT64 PLCID PLONG PLONGLONG PLONG_PTR PLONG32 PLONG64 POINTER_32 ' +
45
- 'POINTER_64 PSHORT PSIZE_T PSSIZE_T PSTR PTBYTE PTCHAR PTSTR PUCHAR PUHALF_PTR ' +
46
- 'PUINT PUINT_PTR PUINT32 PUINT64 PULONG PULONGLONG PULONG_PTR PULONG32 PULONG64 ' +
47
- 'PUSHORT PVOID PWCHAR PWORD PWSTR SC_HANDLE SC_LOCK SERVICE_STATUS_HANDLE SHORT ' +
48
- 'SIZE_T SSIZE_T TBYTE TCHAR UCHAR UHALF_PTR UINT UINT_PTR UINT32 UINT64 ULONG ' +
49
- 'ULONGLONG ULONG_PTR ULONG32 ULONG64 USHORT USN VOID WCHAR WORD WPARAM WPARAM WPARAM ' +
50
- 'char bool short int __int32 __int64 __int8 __int16 long float double __wchar_t ' +
51
- 'clock_t _complex _dev_t _diskfree_t div_t ldiv_t _exception _EXCEPTION_POINTERS ' +
52
- 'FILE _finddata_t _finddatai64_t _wfinddata_t _wfinddatai64_t __finddata64_t ' +
53
- '__wfinddata64_t _FPIEEE_RECORD fpos_t _HEAPINFO _HFILE lconv intptr_t ' +
54
- 'jmp_buf mbstate_t _off_t _onexit_t _PNH ptrdiff_t _purecall_handler ' +
55
- 'sig_atomic_t size_t _stat __stat64 _stati64 terminate_function ' +
56
- 'time_t __time64_t _timeb __timeb64 tm uintptr_t _utimbuf ' +
57
- 'va_list wchar_t wctrans_t wctype_t wint_t signed';
58
-
59
- var keywords = 'break case catch class const __finally __exception __try ' +
60
- 'const_cast continue private public protected __declspec ' +
61
- 'default delete deprecated dllexport dllimport do dynamic_cast ' +
62
- 'else enum explicit extern if for friend goto inline ' +
63
- 'mutable naked namespace new noinline noreturn nothrow ' +
64
- 'register reinterpret_cast return selectany ' +
65
- 'sizeof static static_cast struct switch template this ' +
66
- 'thread throw true false try typedef typeid typename union ' +
67
- 'using uuid virtual void volatile whcar_t while';
68
-
69
- var functions = 'assert isalnum isalpha iscntrl isdigit isgraph islower isprint' +
70
- 'ispunct isspace isupper isxdigit tolower toupper errno localeconv ' +
71
- 'setlocale acos asin atan atan2 ceil cos cosh exp fabs floor fmod ' +
72
- 'frexp ldexp log log10 modf pow sin sinh sqrt tan tanh jmp_buf ' +
73
- 'longjmp setjmp raise signal sig_atomic_t va_arg va_end va_start ' +
74
- 'clearerr fclose feof ferror fflush fgetc fgetpos fgets fopen ' +
75
- 'fprintf fputc fputs fread freopen fscanf fseek fsetpos ftell ' +
76
- 'fwrite getc getchar gets perror printf putc putchar puts remove ' +
77
- 'rename rewind scanf setbuf setvbuf sprintf sscanf tmpfile tmpnam ' +
78
- 'ungetc vfprintf vprintf vsprintf abort abs atexit atof atoi atol ' +
79
- 'bsearch calloc div exit free getenv labs ldiv malloc mblen mbstowcs ' +
80
- 'mbtowc qsort rand realloc srand strtod strtol strtoul system ' +
81
- 'wcstombs wctomb memchr memcmp memcpy memmove memset strcat strchr ' +
82
- 'strcmp strcoll strcpy strcspn strerror strlen strncat strncmp ' +
83
- 'strncpy strpbrk strrchr strspn strstr strtok strxfrm asctime ' +
84
- 'clock ctime difftime gmtime localtime mktime strftime time';
85
-
86
- this.regexList = [
87
- { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
88
- { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
89
- { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
90
- { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
91
- { regex: /^ *#.*/gm, css: 'preprocessor' },
92
- { regex: new RegExp(this.getKeywords(datatypes), 'gm'), css: 'color1 bold' },
93
- { regex: new RegExp(this.getKeywords(functions), 'gm'), css: 'functions bold' },
94
- { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword bold' }
95
- ];
96
- };
97
-
98
- SyntaxHighlighter.brushes.Cpp.prototype = new SyntaxHighlighter.Highlighter();
99
- SyntaxHighlighter.brushes.Cpp.aliases = ['cpp', 'c'];
@@ -1,93 +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.CSS = function()
31
- {
32
- function getKeywordsCSS(str)
33
- {
34
- return '\\b([a-z_]|)' + str.replace(/ /g, '(?=:)\\b|\\b([a-z_\\*]|\\*|)') + '(?=:)\\b';
35
- };
36
-
37
- function getValuesCSS(str)
38
- {
39
- return '\\b' + str.replace(/ /g, '(?!-)(?!:)\\b|\\b()') + '\:\\b';
40
- };
41
-
42
- var keywords = 'ascent azimuth background-attachment background-color background-image background-position ' +
43
- 'background-repeat background baseline bbox border-collapse border-color border-spacing border-style border-top ' +
44
- 'border-right border-bottom border-left border-top-color border-right-color border-bottom-color border-left-color ' +
45
- 'border-top-style border-right-style border-bottom-style border-left-style border-top-width border-right-width ' +
46
- 'border-bottom-width border-left-width border-width border bottom cap-height caption-side centerline clear clip color ' +
47
- 'content counter-increment counter-reset cue-after cue-before cue cursor definition-src descent direction display ' +
48
- 'elevation empty-cells float font-size-adjust font-family font-size font-stretch font-style font-variant font-weight font ' +
49
- 'height left letter-spacing line-height list-style-image list-style-position list-style-type list-style margin-top ' +
50
- 'margin-right margin-bottom margin-left margin marker-offset marks mathline max-height max-width min-height min-width orphans ' +
51
- 'outline-color outline-style outline-width outline overflow padding-top padding-right padding-bottom padding-left padding page ' +
52
- 'page-break-after page-break-before page-break-inside pause pause-after pause-before pitch pitch-range play-during position ' +
53
- 'quotes right richness size slope src speak-header speak-numeral speak-punctuation speak speech-rate stemh stemv stress ' +
54
- 'table-layout text-align top text-decoration text-indent text-shadow text-transform unicode-bidi unicode-range units-per-em ' +
55
- 'vertical-align visibility voice-family volume white-space widows width widths word-spacing x-height z-index';
56
-
57
- var values = 'above absolute all always aqua armenian attr aural auto avoid baseline behind below bidi-override black blink block blue bold bolder '+
58
- 'both bottom braille capitalize caption center center-left center-right circle close-quote code collapse compact condensed '+
59
- 'continuous counter counters crop cross crosshair cursive dashed decimal decimal-leading-zero default digits disc dotted double '+
60
- 'embed embossed e-resize expanded extra-condensed extra-expanded fantasy far-left far-right fast faster fixed format fuchsia '+
61
- 'gray green groove handheld hebrew help hidden hide high higher icon inline-table inline inset inside invert italic '+
62
- 'justify landscape large larger left-side left leftwards level lighter lime line-through list-item local loud lower-alpha '+
63
- 'lowercase lower-greek lower-latin lower-roman lower low ltr marker maroon medium message-box middle mix move narrower '+
64
- 'navy ne-resize no-close-quote none no-open-quote no-repeat normal nowrap n-resize nw-resize oblique olive once open-quote outset '+
65
- 'outside overline pointer portrait pre print projection purple red relative repeat repeat-x repeat-y rgb ridge right right-side '+
66
- 'rightwards rtl run-in screen scroll semi-condensed semi-expanded separate se-resize show silent silver slower slow '+
67
- 'small small-caps small-caption smaller soft solid speech spell-out square s-resize static status-bar sub super sw-resize '+
68
- 'table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group teal '+
69
- 'text-bottom text-top thick thin top transparent tty tv ultra-condensed ultra-expanded underline upper-alpha uppercase upper-latin '+
70
- 'upper-roman url visible wait white wider w-resize x-fast x-high x-large x-loud x-low x-slow x-small x-soft xx-large xx-small yellow';
71
-
72
- var fonts = '[mM]onospace [tT]ahoma [vV]erdana [aA]rial [hH]elvetica [sS]ans-serif [sS]erif [cC]ourier mono sans serif';
73
-
74
- this.regexList = [
75
- { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
76
- { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
77
- { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
78
- { regex: /\#[a-fA-F0-9]{3,6}/g, css: 'value' }, // html colors
79
- { regex: /(-?\d+)(\.\d+)?(px|em|pt|\:|\%|)/g, css: 'value' }, // sizes
80
- { regex: /!important/g, css: 'color3' }, // !important
81
- { regex: new RegExp(getKeywordsCSS(keywords), 'gm'), css: 'keyword' }, // keywords
82
- { regex: new RegExp(getValuesCSS(values), 'g'), css: 'value' }, // values
83
- { regex: new RegExp(this.getKeywords(fonts), 'g'), css: 'color1' } // fonts
84
- ];
85
-
86
- this.forHtmlScript({
87
- left: /(&lt;|<)\s*style.*?(&gt;|>)/gi,
88
- right: /(&lt;|<)\/\s*style\s*(&gt;|>)/gi
89
- });
90
- };
91
-
92
- SyntaxHighlighter.brushes.CSS.prototype = new SyntaxHighlighter.Highlighter();
93
- SyntaxHighlighter.brushes.CSS.aliases = ['css'];
@@ -1,57 +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.Delphi = function()
31
- {
32
- var keywords = 'abs addr and ansichar ansistring array as asm begin boolean byte cardinal ' +
33
- 'case char class comp const constructor currency destructor div do double ' +
34
- 'downto else end except exports extended false file finalization finally ' +
35
- 'for function goto if implementation in inherited int64 initialization ' +
36
- 'integer interface is label library longint longword mod nil not object ' +
37
- 'of on or packed pansichar pansistring pchar pcurrency pdatetime pextended ' +
38
- 'pint64 pointer private procedure program property pshortstring pstring ' +
39
- 'pvariant pwidechar pwidestring protected public published raise real real48 ' +
40
- 'record repeat set shl shortint shortstring shr single smallint string then ' +
41
- 'threadvar to true try type unit until uses val var varirnt while widechar ' +
42
- 'widestring with word write writeln xor';
43
-
44
- this.regexList = [
45
- { regex: /\(\*[\s\S]*?\*\)/gm, css: 'comments' }, // multiline comments (* *)
46
- { regex: /{(?!\$)[\s\S]*?}/gm, css: 'comments' }, // multiline comments { }
47
- { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line
48
- { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
49
- { regex: /\{\$[a-zA-Z]+ .+\}/g, css: 'color1' }, // compiler Directives and Region tags
50
- { regex: /\b[\d\.]+\b/g, css: 'value' }, // numbers 12345
51
- { regex: /\$[a-zA-Z0-9]+\b/g, css: 'value' }, // numbers $F5D3
52
- { regex: new RegExp(this.getKeywords(keywords), 'gmi'), css: 'keyword' } // keyword
53
- ];
54
- };
55
-
56
- SyntaxHighlighter.brushes.Delphi.prototype = new SyntaxHighlighter.Highlighter();
57
- SyntaxHighlighter.brushes.Delphi.aliases = ['delphi', 'pascal', 'pas'];
@@ -1,43 +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.Diff = function()
31
- {
32
- this.regexList = [
33
- { regex: /^\+\+\+.*$/gm, css: 'color2' },
34
- { regex: /^\-\-\-.*$/gm, css: 'color2' },
35
- { regex: /^\s.*$/gm, css: 'color1' },
36
- { regex: /^@@.*@@$/gm, css: 'variable' },
37
- { regex: /^\+[^\+]{1}.*$/gm, css: 'string' },
38
- { regex: /^\-[^\-]{1}.*$/gm, css: 'comments' }
39
- ];
40
- };
41
-
42
- SyntaxHighlighter.brushes.Diff.prototype = new SyntaxHighlighter.Highlighter();
43
- SyntaxHighlighter.brushes.Diff.aliases = ['diff', 'patch'];
@@ -1,54 +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.Erlang = function()
31
- {
32
- // Contributed by Jean-Lou Dupont
33
- // http://jldupont.blogspot.com/2009/06/erlang-syntax-highlighter.html
34
-
35
- // According to: http://erlang.org/doc/reference_manual/introduction.html#1.5
36
- var keywords = 'after and andalso band begin bnot bor bsl bsr bxor '+
37
- 'case catch cond div end fun if let not of or orelse '+
38
- 'query receive rem try when xor'+
39
- // additional
40
- ' module export import define';
41
-
42
- this.regexList = [
43
- { regex: new RegExp("[A-Z][A-Za-z0-9_]+", 'g'), css: 'constants' },
44
- { regex: new RegExp("\\%.+", 'gm'), css: 'comments' },
45
- { regex: new RegExp("\\?[A-Za-z0-9_]+", 'g'), css: 'preprocessor' },
46
- { regex: new RegExp("[a-z0-9_]+:[a-z0-9_]+", 'g'), css: 'functions' },
47
- { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' },
48
- { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' },
49
- { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }
50
- ];
51
- };
52
-
53
- SyntaxHighlighter.brushes.Erlang.prototype = new SyntaxHighlighter.Highlighter();
54
- SyntaxHighlighter.brushes.Erlang.aliases = ['erl', 'erlang'];
@@ -1,69 +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.Groovy = function()
31
- {
32
- // Contributed by Andres Almiray
33
- // http://jroller.com/aalmiray/entry/nice_source_code_syntax_highlighter
34
-
35
- var keywords = 'as assert break case catch class continue def default do else extends finally ' +
36
- 'if in implements import instanceof interface new package property return switch ' +
37
- 'throw throws try while public protected private static';
38
- var types = 'void boolean byte char short int long float double';
39
- var constants = 'null';
40
- var methods = 'allProperties count get size '+
41
- 'collect each eachProperty eachPropertyName eachWithIndex find findAll ' +
42
- 'findIndexOf grep inject max min reverseEach sort ' +
43
- 'asImmutable asSynchronized flatten intersect join pop reverse subMap toList ' +
44
- 'padRight padLeft contains eachMatch toCharacter toLong toUrl tokenize ' +
45
- 'eachFile eachFileRecurse eachB yte eachLine readBytes readLine getText ' +
46
- 'splitEachLine withReader append encodeBase64 decodeBase64 filterLine ' +
47
- 'transformChar transformLine withOutputStream withPrintWriter withStream ' +
48
- 'withStreams withWriter withWriterAppend write writeLine '+
49
- 'dump inspect invokeMethod print println step times upto use waitForOrKill '+
50
- 'getText';
51
-
52
- this.regexList = [
53
- { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
54
- { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
55
- { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
56
- { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
57
- { regex: /""".*"""/g, css: 'string' }, // GStrings
58
- { regex: new RegExp('\\b([\\d]+(\\.[\\d]+)?|0x[a-f0-9]+)\\b', 'gi'), css: 'value' }, // numbers
59
- { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // goovy keyword
60
- { regex: new RegExp(this.getKeywords(types), 'gm'), css: 'color1' }, // goovy/java type
61
- { regex: new RegExp(this.getKeywords(constants), 'gm'), css: 'constants' }, // constants
62
- { regex: new RegExp(this.getKeywords(methods), 'gm'), css: 'functions' } // methods
63
- ];
64
-
65
- this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
66
- }
67
-
68
- SyntaxHighlighter.brushes.Groovy.prototype = new SyntaxHighlighter.Highlighter();
69
- SyntaxHighlighter.brushes.Groovy.aliases = ['groovy'];
@@ -1,52 +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.JScript = function()
31
- {
32
- var keywords = 'break case catch continue ' +
33
- 'default delete do else false ' +
34
- 'for function if in instanceof ' +
35
- 'new null return super switch ' +
36
- 'this throw true try typeof var while with'
37
- ;
38
-
39
- this.regexList = [
40
- { regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
41
- { regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
42
- { regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
43
- { regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
44
- { regex: /\s*#.*/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion
45
- { regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // keywords
46
- ];
47
-
48
- this.forHtmlScript(SyntaxHighlighter.regexLib.scriptScriptTags);
49
- };
50
-
51
- SyntaxHighlighter.brushes.JScript.prototype = new SyntaxHighlighter.Highlighter();
52
- SyntaxHighlighter.brushes.JScript.aliases = ['js', 'jscript', 'javascript'];