honkster-friendly 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +2 -0
- data/.gitignore +26 -0
- data/APACHE-LICENSE +202 -0
- data/CHANGELOG.md +28 -0
- data/CONTRIBUTORS.md +7 -0
- data/LICENSE +20 -0
- data/README.md +288 -0
- data/Rakefile +68 -0
- data/TODO.md +5 -0
- data/VERSION +1 -0
- data/examples/friendly.yml +7 -0
- data/friendly.gemspec +240 -0
- data/lib/friendly.rb +53 -0
- data/lib/friendly/associations.rb +7 -0
- data/lib/friendly/associations/association.rb +34 -0
- data/lib/friendly/associations/set.rb +37 -0
- data/lib/friendly/attribute.rb +98 -0
- data/lib/friendly/boolean.rb +10 -0
- data/lib/friendly/cache.rb +24 -0
- data/lib/friendly/cache/by_id.rb +33 -0
- data/lib/friendly/data_store.rb +73 -0
- data/lib/friendly/document.rb +70 -0
- data/lib/friendly/document/associations.rb +50 -0
- data/lib/friendly/document/attributes.rb +114 -0
- data/lib/friendly/document/convenience.rb +41 -0
- data/lib/friendly/document/mixin.rb +15 -0
- data/lib/friendly/document/scoping.rb +66 -0
- data/lib/friendly/document/storage.rb +63 -0
- data/lib/friendly/document_table.rb +56 -0
- data/lib/friendly/index.rb +73 -0
- data/lib/friendly/indexer.rb +50 -0
- data/lib/friendly/memcached.rb +48 -0
- data/lib/friendly/newrelic.rb +6 -0
- data/lib/friendly/query.rb +42 -0
- data/lib/friendly/scope.rb +100 -0
- data/lib/friendly/scope_proxy.rb +43 -0
- data/lib/friendly/sequel_monkey_patches.rb +34 -0
- data/lib/friendly/storage.rb +31 -0
- data/lib/friendly/storage_factory.rb +24 -0
- data/lib/friendly/storage_proxy.rb +111 -0
- data/lib/friendly/table.rb +15 -0
- data/lib/friendly/table_creator.rb +48 -0
- data/lib/friendly/time.rb +14 -0
- data/lib/friendly/translator.rb +33 -0
- data/lib/friendly/uuid.rb +148 -0
- data/lib/tasks/friendly.rake +7 -0
- data/rails/init.rb +6 -0
- data/spec/config.yml.example +7 -0
- data/spec/fakes/data_store_fake.rb +29 -0
- data/spec/fakes/database_fake.rb +12 -0
- data/spec/fakes/dataset_fake.rb +28 -0
- data/spec/fakes/document.rb +18 -0
- data/spec/fakes/serializer_fake.rb +12 -0
- data/spec/fakes/time_fake.rb +12 -0
- data/spec/integration/ad_hoc_scopes_spec.rb +42 -0
- data/spec/integration/basic_object_lifecycle_spec.rb +114 -0
- data/spec/integration/batch_insertion_spec.rb +29 -0
- data/spec/integration/convenience_api_spec.rb +25 -0
- data/spec/integration/count_spec.rb +12 -0
- data/spec/integration/default_value_spec.rb +30 -0
- data/spec/integration/dirty_tracking_spec.rb +43 -0
- data/spec/integration/find_via_cache_spec.rb +101 -0
- data/spec/integration/finder_spec.rb +71 -0
- data/spec/integration/has_many_spec.rb +18 -0
- data/spec/integration/index_spec.rb +57 -0
- data/spec/integration/named_scope_spec.rb +34 -0
- data/spec/integration/offline_indexing_spec.rb +53 -0
- data/spec/integration/pagination_spec.rb +63 -0
- data/spec/integration/scope_chaining_spec.rb +22 -0
- data/spec/integration/table_creator_spec.rb +64 -0
- data/spec/integration/write_through_cache_spec.rb +53 -0
- data/spec/spec.opts +1 -0
- data/spec/spec_helper.rb +105 -0
- data/spec/unit/associations/association_spec.rb +57 -0
- data/spec/unit/associations/set_spec.rb +43 -0
- data/spec/unit/attribute_spec.rb +125 -0
- data/spec/unit/cache_by_id_spec.rb +102 -0
- data/spec/unit/cache_spec.rb +21 -0
- data/spec/unit/data_store_spec.rb +201 -0
- data/spec/unit/document/attributes_spec.rb +130 -0
- data/spec/unit/document_spec.rb +318 -0
- data/spec/unit/document_table_spec.rb +126 -0
- data/spec/unit/friendly_spec.rb +25 -0
- data/spec/unit/index_spec.rb +196 -0
- data/spec/unit/memcached_spec.rb +114 -0
- data/spec/unit/query_spec.rb +104 -0
- data/spec/unit/scope_proxy_spec.rb +44 -0
- data/spec/unit/scope_spec.rb +113 -0
- data/spec/unit/storage_factory_spec.rb +59 -0
- data/spec/unit/storage_proxy_spec.rb +244 -0
- data/spec/unit/translator_spec.rb +91 -0
- data/website/index.html +210 -0
- data/website/scripts/clipboard.swf +0 -0
- data/website/scripts/shBrushAS3.js +61 -0
- data/website/scripts/shBrushBash.js +66 -0
- data/website/scripts/shBrushCSharp.js +67 -0
- data/website/scripts/shBrushColdFusion.js +102 -0
- data/website/scripts/shBrushCpp.js +99 -0
- data/website/scripts/shBrushCss.js +93 -0
- data/website/scripts/shBrushDelphi.js +57 -0
- data/website/scripts/shBrushDiff.js +43 -0
- data/website/scripts/shBrushErlang.js +54 -0
- data/website/scripts/shBrushGroovy.js +69 -0
- data/website/scripts/shBrushJScript.js +52 -0
- data/website/scripts/shBrushJava.js +59 -0
- data/website/scripts/shBrushJavaFX.js +60 -0
- data/website/scripts/shBrushPerl.js +74 -0
- data/website/scripts/shBrushPhp.js +91 -0
- data/website/scripts/shBrushPlain.js +35 -0
- data/website/scripts/shBrushPowerShell.js +76 -0
- data/website/scripts/shBrushPython.js +66 -0
- data/website/scripts/shBrushRuby.js +57 -0
- data/website/scripts/shBrushScala.js +53 -0
- data/website/scripts/shBrushSql.js +68 -0
- data/website/scripts/shBrushVb.js +58 -0
- data/website/scripts/shBrushXml.js +71 -0
- data/website/scripts/shCore.js +30 -0
- data/website/scripts/shLegacy.js +30 -0
- data/website/styles/friendly.css +103 -0
- data/website/styles/help.png +0 -0
- data/website/styles/ie.css +35 -0
- data/website/styles/magnifier.png +0 -0
- data/website/styles/page_white_code.png +0 -0
- data/website/styles/page_white_copy.png +0 -0
- data/website/styles/print.css +29 -0
- data/website/styles/printer.png +0 -0
- data/website/styles/screen.css +257 -0
- data/website/styles/shCore.css +330 -0
- data/website/styles/shThemeDefault.css +173 -0
- data/website/styles/shThemeDjango.css +176 -0
- data/website/styles/shThemeEclipse.css +190 -0
- data/website/styles/shThemeEmacs.css +175 -0
- data/website/styles/shThemeFadeToGrey.css +177 -0
- data/website/styles/shThemeMidnight.css +175 -0
- data/website/styles/shThemeRDark.css +175 -0
- metadata +337 -0
@@ -0,0 +1,57 @@
|
|
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.Ruby = function()
|
31
|
+
{
|
32
|
+
// Contributed by Erik Peterson.
|
33
|
+
|
34
|
+
var keywords = 'alias and BEGIN begin break case class def define_method defined do each else elsif ' +
|
35
|
+
'END end ensure false for if in module new next nil not or raise redo rescue retry return ' +
|
36
|
+
'self super then throw true undef unless until when while yield';
|
37
|
+
|
38
|
+
var builtins = 'Array Bignum Binding Class Continuation Dir Exception FalseClass File::Stat File Fixnum Fload ' +
|
39
|
+
'Hash Integer IO MatchData Method Module NilClass Numeric Object Proc Range Regexp String Struct::TMS Symbol ' +
|
40
|
+
'ThreadGroup Thread Time TrueClass';
|
41
|
+
|
42
|
+
this.regexList = [
|
43
|
+
{ regex: SyntaxHighlighter.regexLib.singleLinePerlComments, css: 'comments' }, // one line comments
|
44
|
+
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // double quoted strings
|
45
|
+
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // single quoted strings
|
46
|
+
{ regex: /\b[A-Z0-9_]+\b/g, css: 'constants' }, // constants
|
47
|
+
{ regex: /:[a-z][A-Za-z0-9_]*/g, css: 'color2' }, // symbols
|
48
|
+
{ regex: /(\$|@@|@)\w+/g, css: 'variable bold' }, // $global, @instance, and @@class variables
|
49
|
+
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords
|
50
|
+
{ regex: new RegExp(this.getKeywords(builtins), 'gm'), css: 'color1' } // builtins
|
51
|
+
];
|
52
|
+
|
53
|
+
this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
|
54
|
+
};
|
55
|
+
|
56
|
+
SyntaxHighlighter.brushes.Ruby.prototype = new SyntaxHighlighter.Highlighter();
|
57
|
+
SyntaxHighlighter.brushes.Ruby.aliases = ['ruby', 'rails', 'ror', 'rb'];
|
@@ -0,0 +1,53 @@
|
|
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.Scala = function()
|
31
|
+
{
|
32
|
+
// Contributed by Yegor Jbanov and David Bernard.
|
33
|
+
|
34
|
+
var keywords = 'val sealed case def true trait implicit forSome import match object null finally super ' +
|
35
|
+
'override try lazy for var catch throw type extends class while with new final yield abstract ' +
|
36
|
+
'else do if return protected private this package false';
|
37
|
+
|
38
|
+
var keyops = '[_:=><%#@]+';
|
39
|
+
|
40
|
+
this.regexList = [
|
41
|
+
{ regex: SyntaxHighlighter.regexLib.singleLineCComments, css: 'comments' }, // one line comments
|
42
|
+
{ regex: SyntaxHighlighter.regexLib.multiLineCComments, css: 'comments' }, // multiline comments
|
43
|
+
{ regex: SyntaxHighlighter.regexLib.multiLineSingleQuotedString, css: 'string' }, // multi-line strings
|
44
|
+
{ regex: SyntaxHighlighter.regexLib.multiLineDoubleQuotedString, css: 'string' }, // double-quoted string
|
45
|
+
{ regex: SyntaxHighlighter.regexLib.singleQuotedString, css: 'string' }, // strings
|
46
|
+
{ regex: /0x[a-f0-9]+|\d+(\.\d+)?/gi, css: 'value' }, // numbers
|
47
|
+
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' }, // keywords
|
48
|
+
{ regex: new RegExp(keyops, 'gm'), css: 'keyword' } // scala keyword
|
49
|
+
];
|
50
|
+
}
|
51
|
+
|
52
|
+
SyntaxHighlighter.brushes.Scala.prototype = new SyntaxHighlighter.Highlighter();
|
53
|
+
SyntaxHighlighter.brushes.Scala.aliases = ['scala'];
|
@@ -0,0 +1,68 @@
|
|
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.Sql = function()
|
31
|
+
{
|
32
|
+
var funcs = 'abs avg case cast coalesce convert count current_timestamp ' +
|
33
|
+
'current_user day isnull left lower month nullif replace right ' +
|
34
|
+
'session_user space substring sum system_user upper user year';
|
35
|
+
|
36
|
+
var keywords = 'absolute action add after alter as asc at authorization begin bigint ' +
|
37
|
+
'binary bit by cascade char character check checkpoint close collate ' +
|
38
|
+
'column commit committed connect connection constraint contains continue ' +
|
39
|
+
'create cube current current_date current_time cursor database date ' +
|
40
|
+
'deallocate dec decimal declare default delete desc distinct double drop ' +
|
41
|
+
'dynamic else end end-exec escape except exec execute false fetch first ' +
|
42
|
+
'float for force foreign forward free from full function global goto grant ' +
|
43
|
+
'group grouping having hour ignore index inner insensitive insert instead ' +
|
44
|
+
'int integer intersect into is isolation key last level load local max min ' +
|
45
|
+
'minute modify move name national nchar next no numeric of off on only ' +
|
46
|
+
'open option order out output partial password precision prepare primary ' +
|
47
|
+
'prior privileges procedure public read real references relative repeatable ' +
|
48
|
+
'restrict return returns revoke rollback rollup rows rule schema scroll ' +
|
49
|
+
'second section select sequence serializable set size smallint static ' +
|
50
|
+
'statistics table temp temporary then time timestamp to top transaction ' +
|
51
|
+
'translation trigger true truncate uncommitted union unique update values ' +
|
52
|
+
'varchar varying view when where with work';
|
53
|
+
|
54
|
+
var operators = 'all and any between cross in join like not null or outer some';
|
55
|
+
|
56
|
+
this.regexList = [
|
57
|
+
{ regex: /--(.*)$/gm, css: 'comments' }, // one line and multiline comments
|
58
|
+
{ regex: SyntaxHighlighter.regexLib.multiLineDoubleQuotedString, css: 'string' }, // double quoted strings
|
59
|
+
{ regex: SyntaxHighlighter.regexLib.multiLineSingleQuotedString, css: 'string' }, // single quoted strings
|
60
|
+
{ regex: new RegExp(this.getKeywords(funcs), 'gmi'), css: 'color2' }, // functions
|
61
|
+
{ regex: new RegExp(this.getKeywords(operators), 'gmi'), css: 'color1' }, // operators and such
|
62
|
+
{ regex: new RegExp(this.getKeywords(keywords), 'gmi'), css: 'keyword' } // keyword
|
63
|
+
];
|
64
|
+
};
|
65
|
+
|
66
|
+
SyntaxHighlighter.brushes.Sql.prototype = new SyntaxHighlighter.Highlighter();
|
67
|
+
SyntaxHighlighter.brushes.Sql.aliases = ['sql'];
|
68
|
+
|
@@ -0,0 +1,58 @@
|
|
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.Vb = function()
|
31
|
+
{
|
32
|
+
var keywords = 'AddHandler AddressOf AndAlso Alias And Ansi As Assembly Auto ' +
|
33
|
+
'Boolean ByRef Byte ByVal Call Case Catch CBool CByte CChar CDate ' +
|
34
|
+
'CDec CDbl Char CInt Class CLng CObj Const CShort CSng CStr CType ' +
|
35
|
+
'Date Decimal Declare Default Delegate Dim DirectCast Do Double Each ' +
|
36
|
+
'Else ElseIf End Enum Erase Error Event Exit False Finally For Friend ' +
|
37
|
+
'Function Get GetType GoSub GoTo Handles If Implements Imports In ' +
|
38
|
+
'Inherits Integer Interface Is Let Lib Like Long Loop Me Mod Module ' +
|
39
|
+
'MustInherit MustOverride MyBase MyClass Namespace New Next Not Nothing ' +
|
40
|
+
'NotInheritable NotOverridable Object On Option Optional Or OrElse ' +
|
41
|
+
'Overloads Overridable Overrides ParamArray Preserve Private Property ' +
|
42
|
+
'Protected Public RaiseEvent ReadOnly ReDim REM RemoveHandler Resume ' +
|
43
|
+
'Return Select Set Shadows Shared Short Single Static Step Stop String ' +
|
44
|
+
'Structure Sub SyncLock Then Throw To True Try TypeOf Unicode Until ' +
|
45
|
+
'Variant When While With WithEvents WriteOnly Xor';
|
46
|
+
|
47
|
+
this.regexList = [
|
48
|
+
{ regex: /'.*$/gm, css: 'comments' }, // one line comments
|
49
|
+
{ regex: SyntaxHighlighter.regexLib.doubleQuotedString, css: 'string' }, // strings
|
50
|
+
{ regex: /^\s*#.*$/gm, css: 'preprocessor' }, // preprocessor tags like #region and #endregion
|
51
|
+
{ regex: new RegExp(this.getKeywords(keywords), 'gm'), css: 'keyword' } // vb keyword
|
52
|
+
];
|
53
|
+
|
54
|
+
this.forHtmlScript(SyntaxHighlighter.regexLib.aspScriptTags);
|
55
|
+
};
|
56
|
+
|
57
|
+
SyntaxHighlighter.brushes.Vb.prototype = new SyntaxHighlighter.Highlighter();
|
58
|
+
SyntaxHighlighter.brushes.Vb.aliases = ['vb', 'vbnet'];
|
@@ -0,0 +1,71 @@
|
|
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.Xml = function()
|
31
|
+
{
|
32
|
+
function process(match, regexInfo)
|
33
|
+
{
|
34
|
+
var constructor = SyntaxHighlighter.Match,
|
35
|
+
code = match[0],
|
36
|
+
tag = new XRegExp('(<|<)[\\s\\/\\?]*(?<name>[:\\w-\\.]+)', 'xg').exec(code),
|
37
|
+
result = []
|
38
|
+
;
|
39
|
+
|
40
|
+
if (match.attributes != null)
|
41
|
+
{
|
42
|
+
var attributes,
|
43
|
+
regex = new XRegExp('(?<name> [\\w:\\-\\.]+)' +
|
44
|
+
'\\s*=\\s*' +
|
45
|
+
'(?<value> ".*?"|\'.*?\'|\\w+)',
|
46
|
+
'xg');
|
47
|
+
|
48
|
+
while ((attributes = regex.exec(code)) != null)
|
49
|
+
{
|
50
|
+
result.push(new constructor(attributes.name, match.index + attributes.index, 'color1'));
|
51
|
+
result.push(new constructor(attributes.value, match.index + attributes.index + attributes[0].indexOf(attributes.value), 'string'));
|
52
|
+
}
|
53
|
+
}
|
54
|
+
|
55
|
+
if (tag != null)
|
56
|
+
result.push(
|
57
|
+
new constructor(tag.name, match.index + tag[0].indexOf(tag.name), 'keyword')
|
58
|
+
);
|
59
|
+
|
60
|
+
return result;
|
61
|
+
}
|
62
|
+
|
63
|
+
this.regexList = [
|
64
|
+
{ regex: new XRegExp('(\\<|<)\\!\\[[\\w\\s]*?\\[(.|\\s)*?\\]\\](\\>|>)', 'gm'), css: 'color2' }, // <![ ... [ ... ]]>
|
65
|
+
{ regex: SyntaxHighlighter.regexLib.xmlComments, css: 'comments' }, // <!-- ... -->
|
66
|
+
{ regex: new XRegExp('(<|<)[\\s\\/\\?]*(\\w+)(?<attributes>.*?)[\\s\\/\\?]*(>|>)', 'sg'), func: process }
|
67
|
+
];
|
68
|
+
};
|
69
|
+
|
70
|
+
SyntaxHighlighter.brushes.Xml.prototype = new SyntaxHighlighter.Highlighter();
|
71
|
+
SyntaxHighlighter.brushes.Xml.aliases = ['xml', 'xhtml', 'xslt', 'html'];
|
@@ -0,0 +1,30 @@
|
|
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
|
+
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('c(!1q.2X){h 2X=l(){h p={6b:{"1s-R":"","84-2y":1,"83-2y-7W":I,"1I":v,"8d-89":I,"1H-2Q":4,"3g":I,"1w":I,"66":N,"8k-8l":I,"88":N,"5h-1p":I,"1L-1l":N},M:{4T:I,69:v,5l:16,5k:16,8B:N,8f:N,8s:"54",1f:{5q:"53 1g",5d:"9N 1g",5i:"9O 6q 6p",78:"9M C 9L 1V 9I 6p 9J",3t:"3t",6C:"?",1A:"2X\\n\\n",6T:"9K\'t 9P 2O D: ",7x:"9Q 9W\'t 9X D 1L-1l 9V: ",77:"<!9U 1L 9R \\"-//9S//6H 9T 1.0 9H//9G\\" \\"2s://5x.6x.6B/9v/6D/6H/6D-9w.9u\\"><1L 9t=\\"2s://5x.6x.6B/9s/9x\\"><6z><9y 2s-9E=\\"9F-9D\\" 63=\\"1X/1L; 9C=9z-8\\" /><3i>9A 2X</3i></6z><33 1m=\\"39-9Y:9Z,an,ao,am-al;ai-3f:#aj;3f:#ak;39-2Q:ap;1X-6G:6u;\\"><A 1m=\\"1X-6G:6u;6w-4w:aw;\\"><A 1m=\\"39-2Q:au-at;\\">2X</A><A 1m=\\"39-2Q:.as;6w-9p:ah;\\"><A>6O 2.1.ag (a5 15 6h)</A><A><a 27=\\"2s://6I.3k\\" a6=\\"4k\\" 1m=\\"3f:#6F;1X-6t:6L;\\">2s://6I.3k</a></A><A>a3 a0 a1 f 1l, a2 <a 27=\\"a7://5x.a8.3k/ae-af/ad?ac=a9-aa&ab=ax\\" 1m=\\"3f:#6F;1X-6t:6L;\\">8R</a> 6q 8Q 8O 8W!</A></A><A>8V C 8U 8X.</A><A>8K 8N-6h 8M 8S.</A></A></33></1L>"},8u:N},1r:{4Z:v,9o:v,3m:v,6f:{}},2d:{},8h:{9g:/\\/\\*[\\s\\S]*?\\*\\//3b,9d:/\\/\\/.*$/3b,9e:/#.*$/3b,9j:/"([^\\\\"\\n]|\\\\.)*"/g,9n:/\'([^\\\\\'\\n]|\\\\.)*\'/g,9m:/"([^\\\\"]|\\\\.)*"/g,8Y:/\'([^\\\\\']|\\\\.)*\'/g,9k:/(&X;|<)!--[\\s\\S]*?--(&Z;|>)/3b,43:/&X;\\w+:\\/\\/[\\w-.\\/?%&=@:;]*&Z;|\\w+:\\/\\/[\\w-.\\/?%&=@:;]*/g,9c:{G:/(&X;|<)\\?=?/g,1d:/\\?(&Z;|>)/g},93:{G:/(&X;|<)%=?/g,1d:/%(&Z;|>)/g},92:{G:/(&X;|<)\\s*1l.*?(&Z;|>)/4e,1d:/(&X;|<)\\/\\s*1l\\s*(&Z;|>)/4e}},1w:{1c:l(3O){h 3T=Q.22("3Y"),5s=p.1w.7d;3T.L="1w";D(h 30 1V 5s){h 6i=5s[30],5t=W 6i(3O),1Y=5t.1c();3O.6g[30]=5t;c(1Y==v){1J}c(7X(1Y)=="91"){1Y=p.1w.6m(1Y,3O.1k,30)}1Y.L+="5v "+30;3T.2p(1Y)}q 3T},6m:l(5L,7j,5K){h a=Q.22("a"),5N=a.1m,5D=p.M,5M=5D.5l,5J=5D.5k;a.27="#"+5K;a.3i=5L;a.5j=7j;a.76=5K;a.1Q=5L;c(40(5M)==N){5N.26=5M+"75"}c(40(5J)==N){5N.2e=5J+"75"}a.9l=l(e){97{p.1w.6M(f,e||1q.6Y,f.5j,f.76)}98(e){p.B.1A(e.6n)}q N};q a},6M:l(7i,7g,7b,7h,7f){h 5G=p.1r.6f[7b],5H;c(5G==v||(5H=5G.6g[7h])==v){q v}q 5H.2z(7i,7g,7f)},7d:{5q:l(5b){f.1c=l(){c(5b.V("66")!=I){q}q p.M.1f.5q};f.2z=l(5c,8T,8P){h A=5b.A;5c.7y.4p(5c);A.L=A.L.E("5O","")}},5d:l(6R){f.1c=l(){q p.M.1f.5d};f.2z=l(b1,bU,bV){h 3J=p.B.3d(6R.5g).E(/</g,"&X;"),2A=p.B.4z("","4k",bT,bS,"bQ=0, bR=1, bW=0, 7a=1");3J=p.B.2T(3J);2A.Q.3D("<54>"+3J+"</54>");2A.Q.4o()}},5i:l(64){h 3C,c2,6a=64.1k;f.1c=l(){h 2V=p.M;c(2V.69==v){q v}l 1E(56){h 5m="";D(h 5f 1V 56){5m+="<c1 R=\'"+5f+"\' 24=\'"+56[5f]+"\'/>"}q 5m};l 2i(5n){h 5p="";D(h 5o 1V 5n){5p+=" "+5o+"=\'"+5n[5o]+"\'"}q 5p};h 67={26:2V.5l,2e:2V.5k,1k:6a+"bY",4r:"bZ/x-71-6V",3i:p.M.1f.5i},5V={bE:"ay",bD:"bC",bA:"5j="+6a,c4:"N"},5U=2V.69,3x;c(/bG/i.1R(6K.7k)){3x="<4h"+2i({bH:"bM:bN-bL-bK-bI-bJ",c3:"2s://ck.cj.3k/cm/71/c9/6V/c8.c7#6O=9,0,0,0"})+2i(67)+">"+1E(5V)+1E({c6:5U})+"</4h>"}F{3x="<ca"+2i(67)+2i(5V)+2i({cg:5U})+"/>"}3C=Q.22("A");3C.1Q=3x;q 3C};f.2z=l(cf,ce,62){h 7c=62.cd;6U(7c){2K"7q":h 61=p.B.2T(p.B.3d(64.5g).E(/&X;/g,"<").E(/&Z;/g,">").E(/&aT;/g,"&"));c(1q.74){1q.74.aU("1X",61)}F{q p.B.2T(61)}2K"aR":p.B.1A(p.M.1f.78);2h;2K"aP":p.B.1A(62.6n);2h}}},aV:l(65){f.1c=l(){q p.M.1f.3t};f.2z=l(aW,bz,b0){h 1Z=Q.22("aZ"),1N=v;c(p.1r.3m!=v){Q.33.4p(p.1r.3m)}p.1r.3m=1Z;1Z.1m.aX="aY:aO;26:6r;2e:6r;G:-6j;4w:-6j;";Q.33.2p(1Z);1N=1Z.5Q.Q;6J(1N,1q.Q);1N.3D("<A 1s=\\""+65.A.L.E("5O","")+" aD\\">"+65.A.1Q+"</A>");1N.4o();1Z.5Q.4F();1Z.5Q.3t();l 6J(6N,6E){h 2I=6E.4O("4n");D(h i=0;i<2I.u;i++){c(2I[i].6y.6P()=="6A"&&/aE\\.1a$/.1R(2I[i].27)){6N.3D("<4n 4r=\\"1X/1a\\" 6y=\\"6A\\" 27=\\""+2I[i].27+"\\"></4n>")}}}}},az:l(aA){f.1c=l(){q p.M.1f.6C};f.2z=l(aF,aG){h 2A=p.B.4z("","4k",aM,aK,"7a=0"),1N=2A.Q;1N.3D(p.M.1f.77);1N.4o();2A.4F()}}}},B:{Y:l(49,73,3y){3y=3e.aH(3y||0,0);D(h i=3y;i<49.u;i++){c(49[i]==73){q i}}q-1},6d:l(72){q 72+3e.aI(3e.b2()*b3).2u()},6c:l(51,4L){h 3h={},1W;D(1W 1V 51){3h[1W]=51[1W]}D(1W 1V 4L){3h[1W]=4L[1W]}q 3h},80:l(4J){6U(4J){2K"I":q I;2K"N":q N}q 4J},4z:l(43,6W,4B,4H,2N){h x=(6X.26-4B)/2,y=(6X.2e-4H)/2;2N+=", G="+x+", 4w="+y+", 26="+4B+", 2e="+4H;2N=2N.E(/^,/,"");h 4E=1q.bk(43,6W,2N);4E.4F();q 4E},7C:l(1G,1T,1U){c(1G.6Z){1G["e"+1T+1U]=1U;1G[1T+1U]=l(){1G["e"+1T+1U](1q.6Y)};1G.6Z("bw"+1T,1G[1T+1U])}F{1G.bv(1T,1U,N)}},1A:l(z){1A(p.M.1f.1A+z)},4u:l(4N,6Q){h 2r=p.1r.4Z,3V=v;c(2r==v){2r={};D(h 2L 1V p.2d){h 42=p.2d[2L].bu;c(42==v){1J}p.2d[2L].R=2L.6P();D(h i=0;i<42.u;i++){2r[42[i]]=2L}}p.1r.4Z=2r}3V=p.2d[2r[4N]];c(3V==v&&6Q!=N){p.B.1A(p.M.1f.6T+4N)}q 3V},46:l(z,6S){h 2E=z.1P("\\n");D(h i=0;i<2E.u;i++){2E[i]=6S(2E[i])}q 2E.5A("\\n")},8C:l(z){q z.E(/^[ ]*[\\n]+|[\\n]*[ ]*$/g,"")},8H:l(z){h 3X,45={},4P=W U("^\\\\[(?<4c>(.*?))\\\\]$"),7e=W U("(?<R>[\\\\w-]+)"+"\\\\s*:\\\\s*"+"(?<24>"+"[\\\\w-%#]+|"+"\\\\[.*?\\\\]|"+"\\".*?\\"|"+"\'.*?\'"+")\\\\s*;?","g");2j((3X=7e.T(z))!=v){h 2f=3X.24.E(/^[\'"]|[\'"]$/g,"");c(2f!=v&&4P.1R(2f)){h m=4P.T(2f);2f=m.4c.u>0?m.4c.1P(/\\s*,\\s*/):[]}45[3X.R]=2f}q 45},7K:l(z,1a){c(z==v||z.u==0||z=="\\n"){q z}z=z.E(/</g,"&X;");z=z.E(/ {2,}/g,l(m){h 4t="";D(h i=0;i<m.u-1;i++){4t+="&2B;"}q 4t+" "});c(1a!=v){z=p.B.46(z,l(2l){c(2l.u==0){q""}h 3W="";2l=2l.E(/^(&2B;| )+/,l(s){3W=s;q""});c(2l.u==0){q 3W}q 3W+"<C 1s=\\""+1a+"\\">"+2l+"</C>"})}q z},7V:l(6l,6o){h 32=6l.2u();2j(32.u<6o){32="0"+32}q 32},6k:l(){h 3w=Q.22("A"),3B,3o=0,44=Q.33,1k=p.B.6d("6k"),36="<A 1s=\\"",2Y="</A>",4U="</4G>";3w.1Q=36+"6e\\">"+36+"1p\\">"+36+"2y\\">"+36+"63"+"\\"><4G 1s=\\"b5\\"><4G 1k=\\""+1k+"\\">&2B;"+4U+4U+2Y+2Y+2Y+2Y;44.2p(3w);3B=Q.bb(1k);c(/bg/i.1R(6K.7k)){h 6v=1q.be(3B,v);3o=85(6v.bc("26"))}F{3o=3B.bd}44.4p(3w);q 3o},8b:l(79,6s){h 1H="";D(h i=0;i<6s;i++){1H+=" "}q 79.E(/\\t/g,1H)},8a:l(2Z,4f){h bF=2Z.1P("\\n"),1H="\\t",4d="";D(h i=0;i<50;i++){4d+=" "}l 8x(3s,18,8A){q 3s.29(0,18)+4d.29(0,8A)+3s.29(18+1,3s.u)};2Z=p.B.46(2Z,l(20){c(20.Y(1H)==-1){q 20}h 18=0;2j((18=20.Y(1H))!=-1){h 8w=4f-18%4f;20=8x(20,18,8w)}q 20});q 2Z},3d:l(z){h br=/<br\\s*\\/?>|&X;br\\s*\\/?&Z;/4e;c(p.M.8B==I){z=z.E(br,"\\n")}c(p.M.8f==I){z=z.E(br,"")}q z},2G:l(z){q z.E(/^\\s+|\\s+$/g,"")},2T:l(z){h 21=p.B.3d(z).1P("\\n"),bf=W bh(),8D=/^\\s*/,2a=ba;D(h i=0;i<21.u&&2a>0;i++){h 4x=21[i];c(p.B.2G(4x).u==0){1J}h 4I=8D.T(4x);c(4I==v){q z}2a=3e.2a(4I[0].u,2a)}c(2a>0){D(h i=0;i<21.u;i++){21[i]=21[i].29(2a)}}q 21.5A("\\n")},82:l(35,31){c(35.H<31.H){q-1}F{c(35.H>31.H){q 1}F{c(35.u<31.u){q-1}F{c(35.u>31.u){q 1}}}}q 0},2D:l(8q,34){l 8n(4D,8r){q[W p.4v(4D[0],4D.H,8r.1a)]};h b4=0,4s=v,3L=[],8p=34.4X?34.4X:8n;2j((4s=34.3K.T(8q))!=v){3L=3L.2t(8p(4s,34))}q 3L},8m:l(8o){h X="&X;",Z="&Z;";q 8o.E(p.8h.43,l(m){h 4j="",47="";c(m.Y(X)==0){47=X;m=m.3U(X.u)}c(m.Y(Z)==m.u-Z.u){m=m.3U(0,m.u-Z.u);4j=Z}q 47+"<a 27=\\""+m+"\\">"+m+"</a>"+4j})},8v:l(){h 3N=Q.4O("1l"),4i=[];D(h i=0;i<3N.u;i++){c(3N[i].4r=="6e"){4i.K(3N[i])}}q 4i},8I:l(4b){h 4q="<![b6[",3S="]]>",1v=p.B.2G(4b),3R=N;c(1v.Y(4q)==0){1v=1v.3U(4q.u);3R=I}c(1v.Y(3S)==1v.u-3S.u){1v=1v.3U(0,1v.u-3S.u);3R=I}q 3R?1v:4b}},1I:l(8E,4R){l 8e(4g){h 4Q=[];D(h i=0;i<4g.u;i++){4Q.K(4g[i])}q 4Q};h 2q=4R?[4R]:8e(Q.4O(p.M.8s)),8J="1Q",2k=v,4S=p.M;c(4S.4T){2q=2q.2t(p.B.8v())}c(2q.u===0){q}D(h i=0;i<2q.u;i++){h 2M=2q[i],28=p.B.8H(2M.L),1D,2W,25;28=p.B.6c(8E,28);1D=28["2O"];c(1D==v){1J}c(28["1L-1l"]=="I"||p.6b["1L-1l"]==I){2k=W p.4a(1D);1D="b9"}F{h 3P=p.B.4u(1D);c(3P){1D=3P.R;2k=W 3P()}F{1J}}2W=2M[8J];c(4S.4T){2W=p.B.8I(2W)}28["2O-R"]=1D;2k.1I(2W,28);25=2k.A;c(p.M.8u){25=Q.22("bj");25.24=2k.A.1Q;25.1m.26="bt";25.1m.2e="bx"}2M.7y.bs(25,2M)}},bq:l(7H){p.B.7C(1q,"bl",l(){p.1I(7H)})}};p.4v=l(4A,7G,1a){f.24=4A;f.H=7G;f.u=4A.u;f.1a=1a;f.5Y=v};p.4v.14.2u=l(){q f.24};p.4a=l(4K){h 3z=p.B.4u(4K),2g,4W=W p.2d.bm(),bn=v;c(3z==v){q}2g=W 3z();f.4m=4W;c(2g.3I==v){p.B.1A(p.M.1f.7x+4K);q}4W.59.K({3K:2g.3I.C,4X:7p});l 3A(4Y,7w){D(h j=0;j<4Y.u;j++){4Y[j].H+=7w}};l 7p(19,bp){h 7n=19.C,1o=[],4M=2g.59,7l=19.H+19.G.u,2U=2g.3I,1n;D(h i=0;i<4M.u;i++){1n=p.B.2D(7n,4M[i]);3A(1n,7l);1o=1o.2t(1n)}c(2U.G!=v&&19.G!=v){1n=p.B.2D(19.G,2U.G);3A(1n,19.H);1o=1o.2t(1n)}c(2U.1d!=v&&19.1d!=v){1n=p.B.2D(19.1d,2U.1d);3A(1n,19.H+19[0].bo(19.1d));1o=1o.2t(1n)}D(h j=0;j<1o.u;j++){1o[j].5Y=3z.R}q 1o}};p.4a.14.1I=l(7t,7s){f.4m.1I(7t,7s);f.A=f.4m.A};p.7I=l(){};p.7I.14={V:l(7J,7Z){h 4l=f.1E[7J];q p.B.80(4l==v?7Z:4l)},1c:l(7Y){q Q.22(7Y)},8i:l(2F,81){h 3u=[];c(2F!=v){D(h i=0;i<2F.u;i++){c(7X(2F[i])=="4h"){3u=3u.2t(p.B.2D(81,2F[i]))}}}q 3u.aB(p.B.82)},86:l(){h 23=f.2C;D(h i=0;i<23.u;i++){c(23[i]===v){1J}h 2x=23[i],4V=2x.H+2x.u;D(h j=i+1;j<23.u&&23[i]!==v;j++){h 1S=23[j];c(1S===v){1J}F{c(1S.H>4V){2h}F{c(1S.H==2x.H&&1S.u>2x.u){f.2C[i]=v}F{c(1S.H>=2x.H&&1S.H<4V){f.2C[j]=v}}}}}}},8t:l(2H){h 3r=2H.1P(/\\n/g),3n=85(f.V("84-2y")),2v=f.V("83-2y-7W"),7N=f.V("1I",[]),7U=f.V("3g");2H="";c(2v==I){2v=(3n+3r.u-1).2u().u}F{c(40(2v)==I){2v=0}}D(h i=0;i<3r.u;i++){h 1x=3r[i],60=/^(&2B;|\\s)+/.T(1x),52="aN"+(i%2==0?1:2),7F=p.B.7V(3n+i,2v),7P=p.B.Y(7N,(3n+i).2u())!=-1,2S=v;c(60!=v){2S=60[0].2u();1x=1x.29(2S.u)}1x=p.B.2G(1x);c(1x.u==0){1x="&2B;"}c(7P){52+=" aQ"}2H+="<A 1s=\\"2y "+52+"\\">"+"<7L>"+"<7T>"+(7U?"<3F 1s=\\"aS\\"><C>"+7F+"</C></3F>":"")+"<3F 1s=\\"63\\">"+(2S!=v?"<C 1s=\\"by\\">"+2S.E(" ","&2B;")+"</C>":"")+1x+"</3F>"+"</7T>"+"</7L>"+"</A>"}q 2H},8y:l(5X,5T){h 18=0,3c="",3a=p.B.7K,5S=f.V("2O-R","");l 5W(5Z){h 5R=5Z?(5Z.5Y||5S):5S;q 5R?5R+" ":""};D(h i=0;i<5T.u;i++){h 1y=5T[i],3G;c(1y===v||1y.u===0){1J}3G=5W(1y);3c+=3a(5X.29(18,1y.H-18),3G+"7O")+3a(1y.24,3G+1y.1a);18=1y.H+1y.u}3c+=3a(5X.29(18),5W()+"7O");q 3c},1I:l(C,7E){h cb=p.M,1r=p.1r,A,ci,3Z,ch="cn";f.1E={};f.A=v;f.1p=v;f.C=v;f.1i=v;f.6g={};f.1k=p.B.6d("cl");1r.6f[f.1k]=f;c(C===v){C=""}f.1E=p.B.6c(p.6b,7E||{});c(f.V("88")==I){f.1E.1w=f.1E.3g=N}f.A=A=f.1c("3Y");f.1p=f.1c("3Y");f.1p.L="1p";L="6e";A.1k=f.1k;c(f.V("66")){L+=" 5O"}c(f.V("3g")==N){L+=" bB"}c(f.V("5h-1p")==N){f.1p.L+=" bO-5h"}L+=" "+f.V("1s-R");L+=" "+f.V("2O-R");A.L=L;f.5g=C;f.C=p.B.8C(C).E(/\\r/g," ");3Z=f.V("1H-2Q");f.C=f.V("8d-89")==I?p.B.8a(f.C,3Z):p.B.8b(f.C,3Z);f.C=p.B.2T(f.C);c(f.V("1w")){f.1i=f.1c("3Y");f.1i.L="1i";f.1i.2p(p.1w.1c(f));A.2p(f.1i);h 1i=f.1i;l 58(){1i.L=1i.L.E("53","")};A.c0=l(){58();1i.L+=" 53"};A.bX=l(){58()}}A.2p(f.1p);f.2C=f.8i(f.59,f.C);f.86();C=f.8y(f.C,f.2C);C=f.8t(p.B.2G(C));c(f.V("8k-8l")){C=p.B.8m(C)}f.1p.1Q=C},9f:l(z){z=z.E(/^\\s+|\\s+$/g,"").E(/\\s+/g,"|");q"\\\\b(?:"+z+")\\\\b"},9i:l(2J){f.3I={G:{3K:2J.G,1a:"1l"},1d:{3K:2J.1d,1a:"1l"},C:W U("(?<G>"+2J.G.1g+")"+"(?<C>.*?)"+"(?<1d>"+2J.1d.1g+")","96")}}};q p}()}c(!1q.U){(l(){h 2w={T:10.14.T,87:5I.14.87,E:5I.14.E,1P:5I.14.1P},1F={13:/(?:[^\\\\([#\\s.]+|\\\\(?!k<[\\w$]+>|[7z]{[^}]+})[\\S\\s]?|\\((?=\\?(?!#|<[\\w$]+>)))+|(\\()(?:\\?(?:(#)[^)]*\\)|<([$\\w]+)>))?|\\\\(?:k<([\\w$]+)>|[7z]{([^}]+)})|(\\[\\^?)|([\\S\\s])/g,99:/(?:[^$]+|\\$(?![1-9$&`\']|{[$\\w]+}))+|\\$(?:([1-9]\\d*|[$&`\'])|{([$\\w]+)})/g,37:/^(?:\\s+|#.*)+/,5B:/^(?:[?*+]|{\\d+(?:,\\d*)?})/,7Q:/&&\\[\\^?/g,7S:/]/g},7o=l(5C,5v,5u){D(h i=5u||0;i<5C.u;i++){c(5C[i]===5v){q i}}q-1},8G=/()??/.T("")[1]!==3j,3q={};U=l(1e,1O){c(1e 68 10){c(1O!==3j){3H 7r("4y\'t 4C 9a 8z 95 7u 10 5u 94")}q 1e.3E()}h 1O=1O||"",7R=1O.Y("s")>-1,7M=1O.Y("x")>-1,5z=N,3v=[],1b=[],13=1F.13,J,cc,38,3M,3p;13.O=0;2j(J=2w.T.2n(13,1e)){c(J[2]){c(!1F.5B.1R(1e.17(13.O))){1b.K("(?:)")}}F{c(J[1]){3v.K(J[3]||v);c(J[3]){5z=I}1b.K("(")}F{c(J[4]){3M=7o(3v,J[4]);1b.K(3M>-1?"\\\\"+(3M+1)+(40(1e.5w(13.O))?"":"(?:)"):J[0])}F{c(J[5]){1b.K(3q.7m?3q.7m.7q(J[5],J[0].5w(1)==="P"):J[0])}F{c(J[6]){c(1e.5w(13.O)==="]"){1b.K(J[6]==="["?"(?!)":"[\\\\S\\\\s]");13.O++}F{cc=U.8g("&&"+1e.17(J.H),1F.7Q,1F.7S,"",{7D:"\\\\"})[0];1b.K(J[6]+cc+"]");13.O+=cc.u+1}}F{c(J[7]){c(7R&&J[7]==="."){1b.K("[\\\\S\\\\s]")}F{c(7M&&1F.37.1R(J[7])){38=2w.T.2n(1F.37,1e.17(13.O-1))[0].u;c(!1F.5B.1R(1e.17(13.O-1+38))){1b.K("(?:)")}13.O+=38-1}F{1b.K(J[7])}}}F{1b.K(J[0])}}}}}}}3p=10(1b.5A(""),2w.E.2n(1O,/[9B]+/g,""));3p.1C={1g:1e,2m:5z?3v:v};q 3p};U.9q=l(R,o){3q[R]=o};10.14.T=l(z){h 1h=2w.T.2n(f,z),R,i,5y;c(1h){c(8G&&1h.u>1){5y=W 10("^"+f.1g+"$(?!\\\\s)",f.5E());2w.E.2n(1h[0],5y,l(){D(i=1;i<8j.u-2;i++){c(8j[i]===3j){1h[i]=3j}}})}c(f.1C&&f.1C.2m){D(i=1;i<1h.u;i++){R=f.1C.2m[i-1];c(R){1h[R]=1h[i]}}}c(f.3l&&f.O>(1h.H+1h[0].u)){f.O--}}q 1h}})()}10.14.5E=l(){q(f.3l?"g":"")+(f.av?"i":"")+(f.8F?"m":"")+(f.37?"x":"")+(f.a4?"y":"")};10.14.3E=l(7A){h 5F=W U(f.1g,(7A||"")+f.5E());c(f.1C){5F.1C={1g:f.1C.1g,2m:f.1C.2m?f.1C.2m.17(0):v}}q 5F};10.14.2n=l(90,z){q f.T(z)};10.14.9b=l(9h,8c){q f.T(8c[0])};U.5P=l(57,5e){h 55="/"+57+"/"+(5e||"");q U.5P[55]||(U.5P[55]=W U(57,5e))};U.41=l(z){q z.E(/[-[\\]{}()*+?.\\\\^$|,#\\s]/g,"\\\\$&")};U.8g=l(z,G,11,1j,2R){h 2R=2R||{},2P=2R.7D,12=2R.c5,1j=1j||"",5r=1j.Y("g")>-1,70=1j.Y("i")>-1,7v=1j.Y("m")>-1,5a=1j.Y("y")>-1,1j=1j.E(/y/g,""),G=G 68 10?(G.3l?G:G.3E("g")):W U(G,"g"+1j),11=11 68 10?(11.3l?11:11.3E("g")):W U(11,"g"+1j),1M=[],2o=0,1u=0,1t=0,1z=0,2b,2c,1B,1K,3Q,48;c(2P){c(2P.u>1){3H aC("4y\'t 4C aL aJ 7u 41 7B")}c(7v){3H 7r("4y\'t 4C 41 7B 8z bi b8 8F b7")}3Q=U.41(2P);48=W 10("^(?:"+3Q+"[\\\\S\\\\s]|(?:(?!"+G.1g+"|"+11.1g+")[^"+3Q+"])+)+",70?"i":"")}2j(I){G.O=11.O=1t+(2P?(48.T(z.17(1t))||[""])[0].u:0);1B=G.T(z);1K=11.T(z);c(1B&&1K){c(1B.H<=1K.H){1K=v}F{1B=v}}c(1B||1K){1u=(1B||1K).H;1t=(1B?G:11).O}F{c(!2o){2h}}c(5a&&!2o&&1u>1z){2h}c(1B){c(!2o++){2b=1u;2c=1t}}F{c(1K&&2o){c(!--2o){c(12){c(12[0]&&2b>1z){1M.K([12[0],z.17(1z,2b),1z,2b])}c(12[1]){1M.K([12[1],z.17(2b,2c),2b,2c])}c(12[2]){1M.K([12[2],z.17(2c,1u),2c,1u])}c(12[3]){1M.K([12[3],z.17(1u,1t),1u,1t])}}F{1M.K(z.17(2c,1u))}1z=1t;c(!5r){2h}}}F{G.O=11.O=0;3H bP("8L aq 9r ar 8Z")}}c(1u===1t){1t++}}c(5r&&!5a&&12&&12[0]&&z.u>1z){1M.K([12[0],z.17(1z),1z,z.u])}G.O=11.O=0;q 1M};',62,768,'||||||||||||if|||this||var||||function||||sh|return||||length|null||||str|div|utils|code|for|replace|else|left|index|true|_121|push|className|config|false|lastIndex||document|name||exec|XRegExp|getParam|new|lt|indexOf|gt|RegExp|_139|vN|part|prototype|||slice|pos|_d3|css|_11f|create|right|_119|strings|source|_129|bar|_13a|id|script|style|_da|_d6|lines|window|vars|class|_145|_144|_b5|toolbar|_f4|_103|_146|alert|_149|_x|_c3|params|lib|obj|tab|highlight|continue|_14a|html|_142|doc|_11a|split|innerHTML|test|_ec|_5a|_5b|in|_4f|text|_8|_3c|_91|_98|createElement|_e7|value|_c5|width|href|_c2|substr|min|_147|_148|brushes|height|_6e|_cd|break|attributes|while|_be|_75|captureNames|call|_143|appendChild|_bc|_5f|http|concat|toString|_f0|real|_e9|line|execute|wnd|nbsp|matches|getMatches|_66|_e3|trim|_ed|_40|_10f|case|_61|_c1|_55|brush|_13c|size|_13b|_f9|unindent|_d9|_28|_c4|SyntaxHighlighter|_81|_88|_5|m2|_7a|body|_a2|m1|_80|extended|len|font|_fe|gm|_fd|fixInputString|Math|color|gutter|_4e|title|undefined|com|global|printFrame|_ef|_7d|_125|_118|_ee|_8e|print|_e5|_11e|_7b|_32|_49|_cc|offsetMatches|_7c|_25|write|addFlags|td|_104|throw|htmlScript|_22|regex|_a7|_124|_af|_2|_c6|_14b|_b6|_b4|_3|substring|_60|_76|_6a|DIV|_10b|isNaN|escape|_62|url|_7e|_6b|eachLine|_ae|esc|_47|HtmlScript|_b2|values|_8c|gi|_89|_b9|object|_b0|_ad|_blank|_e1|xmlBrush|link|close|removeChild|_b3|type|_a6|_73|findBrush|Match|top|_9d|can|popup|_c8|_53|supply|_a3|win|focus|span|_54|_9e|_50|_cb|_4d|_d7|_5d|getElementsByTagName|_6c|_ba|_b8|_bf|useScriptTags|_82|_ea|_ce|func|_d0|discoveredBrushes||_4c|_f6|show|pre|key|_29|_133|hide|regexList|_141|_19|_1a|viewSource|_134|_2b|originalCode|wrap|copyToClipboard|highlighterId|toolbarItemHeight|toolbarItemWidth|_2a|_2c|_2e|_2d|expandSource|_13e|_4|_7|from|item|charAt|www|r2|_11d|join|quantifier|_113|_e|getNativeFlags|_12e|_17|_18|String|_10|_b|_9|_f|_d|collapsed|cache|contentWindow|_101|_ff|_fb|swf|_30|getBrushNameCss|_fa|brushName|_100|_f5|_37|_35|content|_24|_38|collapse|_2f|instanceof|clipboardSwf|_27|defaults|merge|guid|syntaxhighlighter|highlighters|toolbarCommands|2009|_6|500px|measureSpace|_78|createButton|message|_79|clipboard|to|0px|_85|decoration|center|_83|margin|w3|rel|head|stylesheet|org|help|xhtml1|_3f|0099FF|align|DTD|alexgorbatchev|copyStyles|navigator|none|executeCommand|_3e|version|toLowerCase|_5e|_1e|_65|noBrush|switch|flash|_52|screen|event|attachEvent|_13f|shockwave|_4b|_48|clipboardData|px|commandName|aboutDialog|copyToClipboardConfirmation|_84|scrollbars|_14|_36|items|_6d|_16|_13|_15|_12|_a|userAgent|_d8|unicode|_d5|_112|process|get|TypeError|_de|_dd|one|_140|_d1|brushNotHtmlScript|parentNode|pP|_12d|character|addEvent|escapeChar|_106|_f7|_c9|_c7|Highlighter|_df|decorate|table|_11c|_f1|plain|_f8|classLeft|_11b|classRight|tr|_f2|padNumber|numbers|typeof|_e2|_e0|toBoolean|_e4|matchesSortCallback|pad|first|parseInt|removeNestedMatches|match|light|tabs|processSmartTabs|processTabs|args|smart|toArray|stripBrs|matchRecursive|regexLib|findMatches|arguments|auto|links|processUrls|defaultAdd|_a9|_a8|_a1|_a4|tagName|createDisplayLines|debug|getSyntaxHighlighterScriptTags|_93|insertSpaces|processMatches|when|_90|bloggerMode|trimFirstAndLastLines|_9a|_b7|multiline|_117|parseParams|stripCData|_bd|Copyright|subject|Alex|2004|development|_1c|keep|donate|Gorbatchev|_1b|syntax|JavaScript|active|highlighter|multiLineSingleQuotedString|delimiters|_12f|string|scriptScriptTags|aspScriptTags|another|constructing|sgi|try|catch|replaceVar|flags|apply|phpScriptTags|singleLineCComments|singleLinePerlComments|getKeywords|multiLineCComments|_131|forHtmlScript|doubleQuotedString|xmlComments|onclick|multiLineDoubleQuotedString|singleQuotedString|spaceWidth|bottom|addPlugin|contains|1999|xmlns|dtd|TR|transitional|xhtml|meta|utf|About|sx|charset|Type|equiv|Content|EN|Transitional|your|now|Can|is|The|view|copy|find|Brush|PUBLIC|W3C|XHTML|DOCTYPE|option|wasn|configured|family|Geneva|you|like|please|If|sticky|October|target|https|paypal|_s|xclick|hosted_button_id|cmd|webscr|cgi|bin|364|4em|background|fff|000|serif|sans|Arial|Helvetica|1em|data|unbalanced|75em|large|xx|ignoreCase|3em|2930402|always|about|_42|sort|SyntaxError|printing|shCore|_43|_44|max|round|than|250|more|500|alt|absolute|error|highlighted|ok|number|amp|setData|printSource|_39|cssText|position|IFRAME|_3b|_1f|random|1000000|_a5|block|CDATA|flag|the|htmlscript|1000|getElementById|getPropertyValue|offsetWidth|getComputedStyle|_99|opera|Array|using|textarea|open|load|Xml|_cf|lastIndexOf|_d4|all||replaceChild|70em|aliases|addEventListener|on|30em|spaces|_3a|flashVars|nogutter|transparent|wmode|allowScriptAccess|_8a|msie|classid|96b8|444553540000|11cf|ae6d|clsid|d27cdb6e|no|Error|location|resizable|400|750|_20|_21|menubar|onmouseout|_clipboard|application|onmouseover|param|_26|codebase|menu|valueNames|movie|cab|swflash|cabs|embed|conf||command|_34|_33|src|_10c|_10a|macromedia|download|highlighter_|pub|important'.split('|'),0,{}))
|
@@ -0,0 +1,30 @@
|
|
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
|
+
eval(function(p,a,c,k,e,d){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('1 y={d:{}};y.d={F:6(S,l,q,k,m,n){6 J(z,Y){1 V=16 15("^"+Y+"\\\\[(?<o>\\\\w+)\\\\]$","14"),x=2;h(1 i=0;i<z.g;i++){7((x=V.17(z[i]))!=2){4 x.o}}4 2};6 3(r,U){4 r!=2?r:U};6 9(s){4 s!=2?s.13():2};1 f=S.18(":"),E=f[0],c={},u={"p":"p"};C={"p":"1a"},v=2,5=d.5;h(1 i 19 f){c[f[i]]="p"}l=9(3(l,5.O));q=9(3(q,5.T));k=9(3(k,5.A));n=9(3(n,5.W));m=9(3(m,5["K-L"]));v={1b:E,O:3(C[c.12],l),T:3(C[c.1g],q),A:3(u[c.A],k),W:3(u[c.1t],n),"K-L":3(J(f,"1q"),m)};4 v},1x:6(B,I,D,H,N,M){6 Z(){1 a=1r;h(1 i=0;i<a.g;i++){7(a[i]===2){10}7(G(a[i])=="1s"&&a[i]!=""){4 a[i]+""}7(G(a[i])=="1c"&&a[i].o!=""){4 a[i].o+""}}4 2};6 t(Q,R,11){1 j=1w.1v(11);h(1 i=0;i<j.g;i++){7(j[i].1u("1p")==R){Q.1n(j[i])}}};1 b=[],1o=2,1f={},1e="1d";t(b,B,"1h");t(b,B,"1i");7(b.g===0){4}h(1 i=0;i<b.g;i++){1 8=b[i],e=Z(8.X["1m"],8.1l,8.X["P"],8.P),1k="";7(e===2){10}e=y.d.F(e,I,D,H,N,M);d.1j(e,8)}}};',62,96,'|var|null|defaultValue|return|defaults|function|if|_26|asString||_21|_11|SyntaxHighlighter|_27|_f|length|for||_1f|_4|_2|_5|_6|value|true|_3|_c|_e|findTagsByName|_12|result||_a|dp|_7|collapse|_14|reverse|_16|_10|parseParams|typeof|_17|_15|getValue|first|line|_19|_18|gutter|language|_1c|_1d|_1|toolbar|_d|_9|ruler|attributes|_8|findValue|continue|_1e|nogutter|toString|gi|XRegExp|new|exec|split|in|false|brush|object|innerHTML|_24|_23|nocontrols|pre|textarea|highlight|_28|className|class|push|_22|name|firstline|arguments|string|showcolumns|getAttribute|getElementsByTagName|document|HighlightAll'.split('|'),0,{}))
|
@@ -0,0 +1,103 @@
|
|
1
|
+
body {
|
2
|
+
font-size: 1em;
|
3
|
+
margin: 0;
|
4
|
+
padding: 0;
|
5
|
+
}
|
6
|
+
|
7
|
+
h1 {
|
8
|
+
padding: 25px 0 0 0;
|
9
|
+
margin: 0;
|
10
|
+
font-weight: normal;
|
11
|
+
border-bottom: 2px solid #222;
|
12
|
+
font-weight: bold;
|
13
|
+
}
|
14
|
+
h1 span {
|
15
|
+
font-size: 0.5em;
|
16
|
+
}
|
17
|
+
|
18
|
+
h2 {
|
19
|
+
font-weight: bold;
|
20
|
+
}
|
21
|
+
|
22
|
+
.quiet {
|
23
|
+
color: #777;
|
24
|
+
}
|
25
|
+
|
26
|
+
dl {
|
27
|
+
font-size: 1.4em;
|
28
|
+
margin: 30px 0 -5px 0;
|
29
|
+
}
|
30
|
+
dl dt {
|
31
|
+
line-height: 1em;
|
32
|
+
margin-bottom: 0;
|
33
|
+
background-color: #C00;
|
34
|
+
color: #FFF;
|
35
|
+
padding: 3px 5px;
|
36
|
+
display: inline;
|
37
|
+
}
|
38
|
+
dl dd {
|
39
|
+
margin: 5px 0 25px 0;
|
40
|
+
line-height: 1.3em;
|
41
|
+
}
|
42
|
+
|
43
|
+
#information {
|
44
|
+
background-color: #FF0;
|
45
|
+
margin-bottom: 30px;
|
46
|
+
border-bottom: 5px solid #999;
|
47
|
+
}
|
48
|
+
#information .box {
|
49
|
+
background-color: #222;
|
50
|
+
color: #FFF;
|
51
|
+
}
|
52
|
+
#information .box a {
|
53
|
+
color: #FFF;
|
54
|
+
}
|
55
|
+
|
56
|
+
#created-by {
|
57
|
+
margin-bottom: 0px;
|
58
|
+
}
|
59
|
+
|
60
|
+
|
61
|
+
#about .box {
|
62
|
+
padding: 5px;
|
63
|
+
}
|
64
|
+
#about .box ul {
|
65
|
+
margin: 0;
|
66
|
+
padding: 15px;
|
67
|
+
list-style: none;
|
68
|
+
}
|
69
|
+
#about .box ul li {
|
70
|
+
clear: both;
|
71
|
+
}
|
72
|
+
#about .box ul li span.label {
|
73
|
+
display: block;
|
74
|
+
float: left;
|
75
|
+
width: 40px;
|
76
|
+
margin: 0;
|
77
|
+
padding: 0;
|
78
|
+
}
|
79
|
+
|
80
|
+
.friendlier {
|
81
|
+
text-align: center;
|
82
|
+
margin-top: 50px;
|
83
|
+
font-size: 2em;
|
84
|
+
}
|
85
|
+
|
86
|
+
#footer {
|
87
|
+
margin: 100px 0 0 0;
|
88
|
+
padding: 30px 0 50px 0;
|
89
|
+
background-color: #CCC;
|
90
|
+
}
|
91
|
+
#footer h4 {
|
92
|
+
margin-bottom: 3px;
|
93
|
+
}
|
94
|
+
#footer ul {
|
95
|
+
list-style: none;
|
96
|
+
padding: 0;
|
97
|
+
margin: 0;
|
98
|
+
}
|
99
|
+
|
100
|
+
.nolinenumbers { margin-left: 40px; }
|
101
|
+
.nolinenumbers td.number { display:none; }
|
102
|
+
|
103
|
+
|