yamlcss 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (213) hide show
  1. checksums.yaml +7 -0
  2. data/.travis.yml +12 -0
  3. data/Gemfile +10 -0
  4. data/Gemfile.lock +56 -0
  5. data/LICENSE.txt +59 -0
  6. data/Rakefile +23 -0
  7. data/Readme.md +120 -0
  8. data/VERSIONS.md +5 -0
  9. data/bin/yamlcss +6 -0
  10. data/lib/yamlcss.rb +22 -0
  11. data/lib/yamlcss/engine.rb +7 -0
  12. data/lib/yamlcss/generator.rb +84 -0
  13. data/lib/yamlcss/version.rb +4 -0
  14. data/vendor/assets/stylesheets/_iehacks.scss +3 -0
  15. data/vendor/assets/stylesheets/_yaml.scss +3 -0
  16. data/yaml/Gruntfile.js +199 -0
  17. data/yaml/License.txt +36 -0
  18. data/yaml/Readme.md +64 -0
  19. data/yaml/changelog.md +307 -0
  20. data/yaml/config.rb +25 -0
  21. data/yaml/demos/css/custom-grids.css +27 -0
  22. data/yaml/demos/css/flexible-columns.css +26 -0
  23. data/yaml/demos/css/flexible-grids.css +26 -0
  24. data/yaml/demos/css/rtl-support.css +31 -0
  25. data/yaml/demos/css/screen/screen-custom-grids.css +41 -0
  26. data/yaml/demos/css/screen/screen-rtl-support.css +182 -0
  27. data/yaml/demos/custom-grid.html +129 -0
  28. data/yaml/demos/flexible-columns.html +124 -0
  29. data/yaml/demos/flexible-grid.html +142 -0
  30. data/yaml/demos/rtl-support.html +127 -0
  31. data/yaml/docs/assets/css/icons/external_link.png +0 -0
  32. data/yaml/docs/assets/css/icons/hcalendar.png +0 -0
  33. data/yaml/docs/assets/css/icons/hcard.png +0 -0
  34. data/yaml/docs/assets/css/icons/icon-geo.png +0 -0
  35. data/yaml/docs/assets/css/icons/icon-hatom.png +0 -0
  36. data/yaml/docs/assets/css/icons/icon-haudio.png +0 -0
  37. data/yaml/docs/assets/css/icons/icon-hcalendar-add.png +0 -0
  38. data/yaml/docs/assets/css/icons/icon-hcalendar-download.png +0 -0
  39. data/yaml/docs/assets/css/icons/icon-hcalendar.png +0 -0
  40. data/yaml/docs/assets/css/icons/icon-hcard-add.png +0 -0
  41. data/yaml/docs/assets/css/icons/icon-hcard-download.png +0 -0
  42. data/yaml/docs/assets/css/icons/icon-hcard.png +0 -0
  43. data/yaml/docs/assets/css/icons/icon-hresume.png +0 -0
  44. data/yaml/docs/assets/css/icons/icon-rel-tag.png +0 -0
  45. data/yaml/docs/assets/css/icons/icon-xfn.png +0 -0
  46. data/yaml/docs/assets/css/icons/xfn/xfn-child.png +0 -0
  47. data/yaml/docs/assets/css/icons/xfn/xfn-colleague-met.png +0 -0
  48. data/yaml/docs/assets/css/icons/xfn/xfn-colleague.png +0 -0
  49. data/yaml/docs/assets/css/icons/xfn/xfn-friend-met.png +0 -0
  50. data/yaml/docs/assets/css/icons/xfn/xfn-friend.png +0 -0
  51. data/yaml/docs/assets/css/icons/xfn/xfn-me.png +0 -0
  52. data/yaml/docs/assets/css/icons/xfn/xfn-parent.png +0 -0
  53. data/yaml/docs/assets/css/icons/xfn/xfn-small.png +0 -0
  54. data/yaml/docs/assets/css/icons/xfn/xfn-spouse.png +0 -0
  55. data/yaml/docs/assets/css/icons/xfn/xfn-sweetheart-met.png +0 -0
  56. data/yaml/docs/assets/css/icons/xfn/xfn-sweetheart.png +0 -0
  57. data/yaml/docs/assets/css/layout-min.css +3 -0
  58. data/yaml/docs/assets/css/layout.css +3262 -0
  59. data/yaml/docs/assets/images/demo-custom-grid.png +0 -0
  60. data/yaml/docs/assets/images/demo-flex-column.png +0 -0
  61. data/yaml/docs/assets/images/demo-flex-grid.png +0 -0
  62. data/yaml/docs/assets/images/demo-rtl.png +0 -0
  63. data/yaml/docs/assets/images/yaml-solo-transparent-small.png +0 -0
  64. data/yaml/docs/assets/images/yaml-solo-transparent.png +0 -0
  65. data/yaml/docs/assets/js/domscript.js +209 -0
  66. data/yaml/docs/assets/js/jquery.gridbuilder.js +131 -0
  67. data/yaml/docs/assets/js/snippet/ZeroClipboard.swf +0 -0
  68. data/yaml/docs/assets/js/snippet/jquery.snippet.css +116 -0
  69. data/yaml/docs/assets/js/snippet/jquery.snippet.js +782 -0
  70. data/yaml/docs/assets/js/snippet/jquery.snippet.min.css +40 -0
  71. data/yaml/docs/assets/js/snippet/jquery.snippet.min.js +12 -0
  72. data/yaml/docs/assets/js/snippet/snippet.css +296 -0
  73. data/yaml/docs/index.html +3845 -0
  74. data/yaml/lib/html5shiv/html5shiv-printshiv.js +11 -0
  75. data/yaml/lib/html5shiv/html5shiv.js +8 -0
  76. data/yaml/lib/jquery-1.10.1.min.js +6 -0
  77. data/yaml/lib/jquery-migrate-1.2.1.min.js +2 -0
  78. data/yaml/package.json +20 -0
  79. data/yaml/sass/docs/assets/css/_screen.scss +786 -0
  80. data/yaml/sass/docs/assets/css/layout.scss +28 -0
  81. data/yaml/sass/static-build/add-ons/accessible-tabs/tabs.scss +15 -0
  82. data/yaml/sass/static-build/add-ons/microformats/microformats.scss +18 -0
  83. data/yaml/sass/static-build/add-ons/rtl-support/core/base-rtl.scss +20 -0
  84. data/yaml/sass/static-build/add-ons/rtl-support/forms/gray-theme-rtl.scss +16 -0
  85. data/yaml/sass/static-build/add-ons/rtl-support/navigation/hlist-rtl.scss +18 -0
  86. data/yaml/sass/static-build/add-ons/rtl-support/navigation/vlist-rtl.scss +18 -0
  87. data/yaml/sass/static-build/add-ons/rtl-support/screen/typography-rtl.scss +16 -0
  88. data/yaml/sass/static-build/core/base.scss +19 -0
  89. data/yaml/sass/static-build/core/iehacks.scss +19 -0
  90. data/yaml/sass/static-build/forms/gray-theme.scss +14 -0
  91. data/yaml/sass/static-build/navigation/hlist.scss +16 -0
  92. data/yaml/sass/static-build/navigation/vlist.scss +16 -0
  93. data/yaml/sass/static-build/print/print.scss +15 -0
  94. data/yaml/sass/static-build/screen/grid-960gs-12.scss +15 -0
  95. data/yaml/sass/static-build/screen/grid-960gs-16.scss +15 -0
  96. data/yaml/sass/static-build/screen/grid-blueprint.scss +15 -0
  97. data/yaml/sass/static-build/screen/grid-fluid-12col.scss +15 -0
  98. data/yaml/sass/static-build/screen/screen-FULLPAGE-layout.scss +15 -0
  99. data/yaml/sass/static-build/screen/screen-PAGE-layout.scss +15 -0
  100. data/yaml/sass/static-build/screen/typography.scss +16 -0
  101. data/yaml/sass/yaml-sass/_yaml-var-globals.scss +39 -0
  102. data/yaml/sass/yaml-sass/_yaml-var-typography.scss +80 -0
  103. data/yaml/sass/yaml-sass/add-ons/accessible-tabs/_tabs.scss +139 -0
  104. data/yaml/sass/yaml-sass/add-ons/accessible-tabs/jquery.tabs.js +266 -0
  105. data/yaml/sass/yaml-sass/add-ons/microformats/_microformats.scss +179 -0
  106. data/yaml/sass/yaml-sass/add-ons/microformats/icons/external_link.png +0 -0
  107. data/yaml/sass/yaml-sass/add-ons/microformats/icons/hcalendar.png +0 -0
  108. data/yaml/sass/yaml-sass/add-ons/microformats/icons/hcard.png +0 -0
  109. data/yaml/sass/yaml-sass/add-ons/microformats/icons/icon-geo.png +0 -0
  110. data/yaml/sass/yaml-sass/add-ons/microformats/icons/icon-hatom.png +0 -0
  111. data/yaml/sass/yaml-sass/add-ons/microformats/icons/icon-haudio.png +0 -0
  112. data/yaml/sass/yaml-sass/add-ons/microformats/icons/icon-hcalendar-add.png +0 -0
  113. data/yaml/sass/yaml-sass/add-ons/microformats/icons/icon-hcalendar-download.png +0 -0
  114. data/yaml/sass/yaml-sass/add-ons/microformats/icons/icon-hcalendar.png +0 -0
  115. data/yaml/sass/yaml-sass/add-ons/microformats/icons/icon-hcard-add.png +0 -0
  116. data/yaml/sass/yaml-sass/add-ons/microformats/icons/icon-hcard-download.png +0 -0
  117. data/yaml/sass/yaml-sass/add-ons/microformats/icons/icon-hcard.png +0 -0
  118. data/yaml/sass/yaml-sass/add-ons/microformats/icons/icon-hresume.png +0 -0
  119. data/yaml/sass/yaml-sass/add-ons/microformats/icons/icon-rel-tag.png +0 -0
  120. data/yaml/sass/yaml-sass/add-ons/microformats/icons/icon-xfn.png +0 -0
  121. data/yaml/sass/yaml-sass/add-ons/microformats/icons/xfn/xfn-child.png +0 -0
  122. data/yaml/sass/yaml-sass/add-ons/microformats/icons/xfn/xfn-colleague-met.png +0 -0
  123. data/yaml/sass/yaml-sass/add-ons/microformats/icons/xfn/xfn-colleague.png +0 -0
  124. data/yaml/sass/yaml-sass/add-ons/microformats/icons/xfn/xfn-friend-met.png +0 -0
  125. data/yaml/sass/yaml-sass/add-ons/microformats/icons/xfn/xfn-friend.png +0 -0
  126. data/yaml/sass/yaml-sass/add-ons/microformats/icons/xfn/xfn-me.png +0 -0
  127. data/yaml/sass/yaml-sass/add-ons/microformats/icons/xfn/xfn-parent.png +0 -0
  128. data/yaml/sass/yaml-sass/add-ons/microformats/icons/xfn/xfn-small.png +0 -0
  129. data/yaml/sass/yaml-sass/add-ons/microformats/icons/xfn/xfn-spouse.png +0 -0
  130. data/yaml/sass/yaml-sass/add-ons/microformats/icons/xfn/xfn-sweetheart-met.png +0 -0
  131. data/yaml/sass/yaml-sass/add-ons/microformats/icons/xfn/xfn-sweetheart.png +0 -0
  132. data/yaml/sass/yaml-sass/add-ons/rtl-support/core/_base-rtl.scss +177 -0
  133. data/yaml/sass/yaml-sass/add-ons/rtl-support/forms/_gray-theme-rtl.scss +34 -0
  134. data/yaml/sass/yaml-sass/add-ons/rtl-support/navigation/_hlist-rtl.scss +42 -0
  135. data/yaml/sass/yaml-sass/add-ons/rtl-support/navigation/_vlist-rtl.scss +45 -0
  136. data/yaml/sass/yaml-sass/add-ons/rtl-support/screen/_typography-rtl.scss +30 -0
  137. data/yaml/sass/yaml-sass/add-ons/syncheight/jquery.syncheight.js +112 -0
  138. data/yaml/sass/yaml-sass/core/_base.scss +15 -0
  139. data/yaml/sass/yaml-sass/core/_iehacks.scss +426 -0
  140. data/yaml/sass/yaml-sass/core/base-modules/_accessibility.scss +48 -0
  141. data/yaml/sass/yaml-sass/core/base-modules/_columns.scss +27 -0
  142. data/yaml/sass/yaml-sass/core/base-modules/_float-handling.scss +32 -0
  143. data/yaml/sass/yaml-sass/core/base-modules/_forms-core.scss +296 -0
  144. data/yaml/sass/yaml-sass/core/base-modules/_grids-core.scss +55 -0
  145. data/yaml/sass/yaml-sass/core/base-modules/_normalization.scss +165 -0
  146. data/yaml/sass/yaml-sass/core/base-modules/_print-core.scss +36 -0
  147. data/yaml/sass/yaml-sass/core/js/yaml-focusfix.js +70 -0
  148. data/yaml/sass/yaml-sass/forms/_gray-theme.scss +475 -0
  149. data/yaml/sass/yaml-sass/mixins/_yaml-mixins-core.scss +248 -0
  150. data/yaml/sass/yaml-sass/navigation/_hlist.scss +106 -0
  151. data/yaml/sass/yaml-sass/navigation/_vlist.scss +129 -0
  152. data/yaml/sass/yaml-sass/print/_print.scss +61 -0
  153. data/yaml/sass/yaml-sass/screen/_grid-960gs-12.scss +4 -0
  154. data/yaml/sass/yaml-sass/screen/_grid-960gs-16.scss +4 -0
  155. data/yaml/sass/yaml-sass/screen/_grid-blueprint.scss +4 -0
  156. data/yaml/sass/yaml-sass/screen/_grid-fluid-12col.scss +4 -0
  157. data/yaml/sass/yaml-sass/screen/_screen-FULLPAGE-layout.scss +171 -0
  158. data/yaml/sass/yaml-sass/screen/_screen-PAGE-layout.scss +165 -0
  159. data/yaml/sass/yaml-sass/screen/_typography.scss +485 -0
  160. data/yaml/yaml/add-ons/accessible-tabs/jquery.tabs.js +266 -0
  161. data/yaml/yaml/add-ons/accessible-tabs/tabs.css +136 -0
  162. data/yaml/yaml/add-ons/microformats/icons/external_link.png +0 -0
  163. data/yaml/yaml/add-ons/microformats/icons/hcalendar.png +0 -0
  164. data/yaml/yaml/add-ons/microformats/icons/hcard.png +0 -0
  165. data/yaml/yaml/add-ons/microformats/icons/icon-geo.png +0 -0
  166. data/yaml/yaml/add-ons/microformats/icons/icon-hatom.png +0 -0
  167. data/yaml/yaml/add-ons/microformats/icons/icon-haudio.png +0 -0
  168. data/yaml/yaml/add-ons/microformats/icons/icon-hcalendar-add.png +0 -0
  169. data/yaml/yaml/add-ons/microformats/icons/icon-hcalendar-download.png +0 -0
  170. data/yaml/yaml/add-ons/microformats/icons/icon-hcalendar.png +0 -0
  171. data/yaml/yaml/add-ons/microformats/icons/icon-hcard-add.png +0 -0
  172. data/yaml/yaml/add-ons/microformats/icons/icon-hcard-download.png +0 -0
  173. data/yaml/yaml/add-ons/microformats/icons/icon-hcard.png +0 -0
  174. data/yaml/yaml/add-ons/microformats/icons/icon-hresume.png +0 -0
  175. data/yaml/yaml/add-ons/microformats/icons/icon-rel-tag.png +0 -0
  176. data/yaml/yaml/add-ons/microformats/icons/icon-xfn.png +0 -0
  177. data/yaml/yaml/add-ons/microformats/icons/xfn/xfn-child.png +0 -0
  178. data/yaml/yaml/add-ons/microformats/icons/xfn/xfn-colleague-met.png +0 -0
  179. data/yaml/yaml/add-ons/microformats/icons/xfn/xfn-colleague.png +0 -0
  180. data/yaml/yaml/add-ons/microformats/icons/xfn/xfn-friend-met.png +0 -0
  181. data/yaml/yaml/add-ons/microformats/icons/xfn/xfn-friend.png +0 -0
  182. data/yaml/yaml/add-ons/microformats/icons/xfn/xfn-me.png +0 -0
  183. data/yaml/yaml/add-ons/microformats/icons/xfn/xfn-parent.png +0 -0
  184. data/yaml/yaml/add-ons/microformats/icons/xfn/xfn-small.png +0 -0
  185. data/yaml/yaml/add-ons/microformats/icons/xfn/xfn-spouse.png +0 -0
  186. data/yaml/yaml/add-ons/microformats/icons/xfn/xfn-sweetheart-met.png +0 -0
  187. data/yaml/yaml/add-ons/microformats/icons/xfn/xfn-sweetheart.png +0 -0
  188. data/yaml/yaml/add-ons/microformats/microformats.css +167 -0
  189. data/yaml/yaml/add-ons/rtl-support/core/base-rtl.css +167 -0
  190. data/yaml/yaml/add-ons/rtl-support/core/base-rtl.min.css +3 -0
  191. data/yaml/yaml/add-ons/rtl-support/forms/gray-theme-rtl.css +44 -0
  192. data/yaml/yaml/add-ons/rtl-support/navigation/hlist-rtl.css +48 -0
  193. data/yaml/yaml/add-ons/rtl-support/navigation/vlist-rtl.css +54 -0
  194. data/yaml/yaml/add-ons/rtl-support/screen/typography-rtl.css +38 -0
  195. data/yaml/yaml/add-ons/syncheight/jquery.syncheight.js +112 -0
  196. data/yaml/yaml/core/base.css +705 -0
  197. data/yaml/yaml/core/base.min.css +3 -0
  198. data/yaml/yaml/core/iehacks.css +468 -0
  199. data/yaml/yaml/core/iehacks.min.css +3 -0
  200. data/yaml/yaml/core/js/yaml-focusfix.js +70 -0
  201. data/yaml/yaml/forms/gray-theme.css +676 -0
  202. data/yaml/yaml/navigation/hlist.css +109 -0
  203. data/yaml/yaml/navigation/vlist.css +144 -0
  204. data/yaml/yaml/print/print.css +42 -0
  205. data/yaml/yaml/screen/grid-960gs-12.css +164 -0
  206. data/yaml/yaml/screen/grid-960gs-16.css +212 -0
  207. data/yaml/yaml/screen/grid-blueprint.css +308 -0
  208. data/yaml/yaml/screen/grid-fluid-12col.css +164 -0
  209. data/yaml/yaml/screen/screen-FULLPAGE-layout.css +184 -0
  210. data/yaml/yaml/screen/screen-PAGE-layout.css +196 -0
  211. data/yaml/yaml/screen/typography.css +486 -0
  212. data/yamlcss.gemspec +30 -0
  213. metadata +314 -0
@@ -0,0 +1,782 @@
1
+ /*
2
+ * Snippet :: jQuery Syntax Highlighter v2.0.0
3
+ * http://steamdev.com/snippet
4
+ *
5
+ * Copyright 2011, SteamDev
6
+ * Released under the MIT license.
7
+ * http://www.opensource.org/licenses/mit-license.php
8
+ *
9
+ * Date: Wed Jan 19, 2011
10
+ */
11
+
12
+ (function($) {
13
+
14
+ //enables console.log() in all browsers for error messages
15
+ window.log=function(){log.history=log.history||[];log.history.push(arguments);if(this.console){console.log(Array.prototype.slice.call(arguments))}};
16
+
17
+ $.fn.snippet = function(language,settings) {
18
+
19
+ if(typeof language == "object"){settings = language;}
20
+
21
+ if(typeof language == "string"){
22
+ language = language.toLowerCase();
23
+ }
24
+
25
+ var defaults = {
26
+ style:"random",
27
+ showNum:true,
28
+ transparent:false,
29
+ collapse:false,
30
+ menu:true,
31
+ showMsg:"Expand Code",
32
+ hideMsg:"Collapse Code",
33
+ clipboard:"",
34
+ startCollapsed:true,
35
+ startText:false,
36
+ box:"",
37
+ boxColor:"",
38
+ boxFill:""
39
+ };
40
+
41
+ // array containing all style names
42
+ var styleArr = ["acid","berries-dark","berries-light","bipolar","blacknblue","bright","contrast","darkblue","darkness","desert","dull","easter","emacs","golden","greenlcd","ide-anjuta","ide-codewarrior","ide-devcpp","ide-eclipse","ide-kdev","ide-msvcpp","kwrite","matlab","navy","nedit","neon","night","pablo","peachpuff","print","rand01","the","typical","vampire","vim","vim-dark","whatis","whitengrey","zellner"];
43
+
44
+ if(settings){$.extend(defaults,settings)}
45
+
46
+ return this.each(function() {
47
+
48
+ // variable containing the style to be used
49
+ var useStyle = defaults.style.toLowerCase();
50
+ if(defaults.style == "random"){
51
+ var randomnumber=Math.floor(Math.random()*(styleArr.length));
52
+ useStyle = styleArr[randomnumber];
53
+ }
54
+
55
+ // variable containing the selected node
56
+ var o = $(this);
57
+
58
+ // the name of the selected node
59
+ var node = this.nodeName.toLowerCase();
60
+
61
+ // if the node is indeed a <pre> element...
62
+ if(node == "pre"){
63
+
64
+ // saves the original html as a data on the node
65
+ if(o.data('orgHtml')==undefined || o.data('orgHtml')==null){
66
+ var orgHtml = o.html();
67
+ o.data('orgHtml',orgHtml);
68
+ }
69
+
70
+ // if node IS NOT an existing Snippet...
71
+ if(!o.parent().hasClass("snippet-wrap")){
72
+
73
+ // if language is NOT a string...
74
+ if(typeof language != "string"){
75
+ if(o.attr('class').length>0){var errclass=" class=\""+o.attr('class')+"\""}else{var errclass="";}
76
+ if(o.attr('id').length>0){var errid=" id=\""+o.attr('id')+"\""}else{var errid="";}
77
+ var error = "Snippet Error: You must specify a language on inital usage of Snippet. Reference <pre"+errclass+errid+">";
78
+ console.log(error);
79
+ return false;
80
+ }
81
+
82
+ o.addClass("sh_"+language).addClass("snippet-formatted").wrap("<div class='snippet-container' style='"+o.attr('style')+";'><div class='sh_"+useStyle+" snippet-wrap'></div></div>");
83
+ o.removeAttr('style');
84
+ sh_highlightDocument();
85
+
86
+ // build an ordered list if showNum is true
87
+ if(defaults.showNum){
88
+ var newhtml = o.html();
89
+ newhtml=newhtml.replace(/\n/g, "</li><li>");
90
+ newhtml="<ol class='snippet-num'><li>"+newhtml+"</li></ol>";
91
+ while(newhtml.indexOf("<li></li></ol>") != -1){
92
+ newhtml=newhtml.replace("<li></li></ol>","</ol>");
93
+ }
94
+ }
95
+ // build an unordered list if showNum is false
96
+ else {
97
+ var newhtml = o.html();
98
+ newhtml=newhtml.replace(/\n/g, "</li><li>");
99
+ newhtml="<ul class='snippet-no-num'><li>"+newhtml+"</li></ul>";
100
+ while(newhtml.indexOf("<li></li></ul>") != -1){
101
+ newhtml=newhtml.replace("<li></li></ul>","</ul>");
102
+ }
103
+ }
104
+
105
+ // normalizes tab space by replacing them with 4 non-breaking spaces
106
+ newhtml=newhtml.replace(/\t/g, "&nbsp;&nbsp;&nbsp;&nbsp;");
107
+
108
+
109
+ // insert highlighted code into <pre> element
110
+ o.html(newhtml);
111
+
112
+ // cleans up the highlighted html
113
+ while(o.find("li").eq(0).html() == ""){
114
+ o.find("li").eq(0).remove();
115
+ }
116
+ o.find("li").each(function(){
117
+ if($(this).html().length<2){
118
+ var rep = ($(this).html()).replace(/\s/g,"");
119
+ if(rep==""){
120
+ if($.browser.opera){
121
+ $(this).html("&nbsp;");
122
+ } else {
123
+ $(this).html("<span style='display:none;'>&nbsp;</span>");
124
+ }
125
+ }
126
+ }
127
+ });
128
+
129
+ // builds text-only view and hover menu
130
+ var txtOnly = "<pre class='snippet-textonly sh_sourceCode' style='display:none;'>"+o.data('orgHtml')+"</pre>";
131
+ var controls = "<div class='snippet-menu sh_sourceCode' style='display:none;'><pre>"
132
+ +"<a class='snippet-copy' href='#'>copy</a>"
133
+ +"<a class='snippet-text' href='#'>text</a>"
134
+ +"<a class='snippet-window' href='#'>pop-up</a>"
135
+ +"</pre></div>";
136
+
137
+ o.parent().append(txtOnly);
138
+ o.parent().prepend(controls);
139
+ o.parent().hover(function(){$(this).find('.snippet-menu').fadeIn("fast");},function(){$(this).find('.snippet-menu').fadeOut("fast");});
140
+
141
+ // builds clipboard
142
+ if(defaults.clipboard!="" && defaults.clipboard!=false){
143
+ var cpy = o.parent().find('a.snippet-copy');
144
+ cpy.show();
145
+ cpy.parents('.snippet-menu').show();
146
+ var txt = o.parents('.snippet-wrap').find('.snippet-textonly').text();
147
+ ZeroClipboard.setMoviePath(defaults.clipboard);
148
+ var clip = new ZeroClipboard.Client();
149
+ clip.setText(txt);
150
+ clip.glue(cpy[0], cpy.parents('.snippet-menu')[0]);
151
+ clip.addEventListener( 'complete', function(client, text) {
152
+ if(text.length > 500){
153
+ text = text.substr(0,500)+"...\n\n("+(text.length-500)+" characters not shown)";
154
+ }
155
+ alert("Copied text to clipboard:\n\n " + text );
156
+ });
157
+
158
+ cpy.parents('.snippet-menu').hide();
159
+
160
+ } else {
161
+ o.parent().find('a.snippet-copy').hide();
162
+ }
163
+
164
+ // click event for text-only view
165
+ o.parent().find("a.snippet-text").click(function(){
166
+ var org = $(this).parents('.snippet-wrap').find('.snippet-formatted');
167
+ var txt = $(this).parents('.snippet-wrap').find('.snippet-textonly');
168
+ org.toggle();
169
+ txt.toggle();
170
+
171
+ if(txt.is(':visible')){
172
+ $(this).html("html");
173
+ } else {
174
+ $(this).html("text");
175
+ }
176
+ $(this).blur();
177
+ return false;
178
+ });
179
+
180
+ // click event for popup view
181
+ o.parent().find("a.snippet-window").click(function(){
182
+ var txt = $(this).parents('.snippet-wrap').find('.snippet-textonly').html();
183
+ snippetPopup(txt);
184
+ $(this).blur();
185
+ return false;
186
+ });
187
+
188
+ // disables menu
189
+ if(!defaults.menu){
190
+ o.prev('.snippet-menu').find('pre,.snippet-clipboard').hide();
191
+ }
192
+
193
+ // collapse functionality
194
+ if(defaults.collapse){
195
+ var styleClass = o.parent().attr('class');
196
+ var collapseShow = "<div class='snippet-reveal "+styleClass+"'><pre class='sh_sourceCode'><a href='#' class='snippet-toggle'>"+defaults.showMsg+"</a></pre></div>";
197
+ var collapseHide = "<div class='sh_sourceCode snippet-hide'><pre><a href='#' class='snippet-revealed snippet-toggle'>"+defaults.hideMsg+"</a></pre></div>";
198
+
199
+ o.parents('.snippet-container').append(collapseShow);
200
+ o.parent().append(collapseHide);
201
+
202
+ var root = o.parents('.snippet-container');
203
+ if(defaults.startCollapsed){
204
+ root.find('.snippet-reveal').show();
205
+ root.find('.snippet-wrap').eq(0).hide();
206
+ } else {
207
+ root.find('.snippet-reveal').hide();
208
+ root.find('.snippet-wrap').eq(0).show();
209
+ }
210
+
211
+ root.find('a.snippet-toggle').click(function(){
212
+ root.find('.snippet-wrap').toggle();
213
+ return false;
214
+ });
215
+
216
+ }
217
+
218
+ // makes snippet background transparent
219
+ if(defaults.transparent){
220
+ var styleObj = {"background-color":"transparent","box-shadow":"none","-moz-box-shadow":"none","-webkit-box-shadow":"none"}
221
+ o.css(styleObj);
222
+ o.next(".snippet-textonly").css(styleObj);
223
+ o.parents('.snippet-container').find('.snippet-reveal pre').css(styleObj);
224
+ }
225
+
226
+ // starts snippet on text-only view
227
+ if(defaults.startText){
228
+ o.hide();
229
+ o.next(".snippet-textonly").show();
230
+ o.parent().find(".snippet-text").html("html");
231
+
232
+ }
233
+
234
+ // boxes in specified lines of code
235
+ if(defaults.box!=""){
236
+ var spacer = "<span class='box-sp'>&nbsp;</span>";
237
+ var boxNums = defaults.box.split(',');
238
+ for(var i=0;i<boxNums.length;i++){
239
+ var boxNum = boxNums[i];
240
+ if(boxNum.indexOf('-')==-1){
241
+ boxNum = parseFloat(boxNum)-1;
242
+ o.find("li").eq(boxNum).addClass('box').prepend(spacer);
243
+ } else {
244
+ var numStart = parseFloat(boxNum.split('-')[0])-1;
245
+ var numEnd = parseFloat(boxNum.split('-')[1])-1;
246
+ if(numStart<numEnd){
247
+ o.find("li").eq(numStart).addClass('box box-top').prepend(spacer);
248
+ o.find("li").eq(numEnd).addClass('box box-bot').prepend(spacer);
249
+ for(var x=numStart+1; x<numEnd; x++){
250
+ o.find("li").eq(x).addClass('box box-mid').prepend(spacer);
251
+ }
252
+ } else if (numStart==numEnd){
253
+ o.find("li").eq(numStart).addClass('box').prepend(spacer);
254
+ }
255
+ }
256
+
257
+ }
258
+
259
+ // sets the color of the box
260
+ if(defaults.boxColor!=""){
261
+ o.find("li.box").css('border-color',defaults.boxColor);
262
+ }
263
+
264
+ // sets the fill (background color) of the box
265
+ if(defaults.boxFill!=""){
266
+ o.find("li.box, li.box-top, li.box-mid, li.box-bot").addClass('box-bg').css('background-color',defaults.boxFill);
267
+ }
268
+
269
+ if($.browser.webkit){
270
+ o.find(".snippet-num li.box").css('margin-left','-3.3em');
271
+ o.find(".snippet-num li .box-sp").css('width','21px');
272
+ }
273
+
274
+ }
275
+
276
+ // adds a css class to all links in the snippet so they are themed properly
277
+ o.parents('.snippet-container').find("a").addClass("sh_url");
278
+
279
+ }
280
+ // if node IS an existing Snippet...
281
+ else {
282
+
283
+ // set new style classes, remove boxes
284
+ o.parent().attr("class","sh_"+useStyle+" snippet-wrap");
285
+ o.parents('.snippet-container').find('.snippet-reveal').attr("class","sh_"+useStyle+" snippet-wrap snippet-reveal");
286
+ o.find("li.box, li.box-top, li.box-mid, li.box-bot").removeAttr('style').removeAttr('class');
287
+ o.find("li .box-sp").remove();
288
+
289
+ // set background to transparent
290
+ if(defaults.transparent){
291
+ var styleObj = {"background-color":"transparent","box-shadow":"none","-moz-box-shadow":"none","-webkit-box-shadow":"none"}
292
+ o.css(styleObj);
293
+ o.next(".snippet-textonly").css(styleObj);
294
+ o.parents('.snippet-container').find('.snippet-hide pre').css(styleObj);
295
+ }
296
+ // remove transparency
297
+ else {
298
+ var styleObj = {"background-color":"","box-shadow":"","-moz-box-shadow":"","-webkit-box-shadow":""}
299
+ o.css(styleObj);
300
+ o.next(".snippet-textonly").css(styleObj);
301
+ o.parents('.snippet-container').find('.snippet-reveal pre').css(styleObj);
302
+ }
303
+
304
+ // show numbers by switching <ul> to <ol>
305
+ if(defaults.showNum){
306
+
307
+ var list = o.find("li").eq(0).parent();
308
+ if(list.hasClass("snippet-no-num")){
309
+ list.wrap("<ol class='snippet-num'></ol>");
310
+ var li = o.find("li").eq(0);
311
+ li.unwrap();
312
+ }
313
+ }
314
+ // hide numbers by switching <ol> to <ul>
315
+ else {
316
+ var list = o.find("li").eq(0).parent();
317
+ if(list.hasClass("snippet-num")){
318
+ list.wrap("<ul class='snippet-no-num'></ul>");
319
+ var li = o.find("li").eq(0);
320
+ li.unwrap();
321
+ }
322
+ }
323
+
324
+ // box in specified lines
325
+ if(defaults.box!=""){
326
+ var spacer = "<span class='box-sp'>&nbsp;</span>";
327
+ var boxNums = defaults.box.split(',');
328
+ for(var i=0;i<boxNums.length;i++){
329
+ var boxNum = boxNums[i];
330
+ if(boxNum.indexOf('-')==-1){
331
+ boxNum = parseFloat(boxNum)-1;
332
+ o.find("li").eq(boxNum).addClass('box').prepend(spacer);
333
+ } else {
334
+ var numStart = parseFloat(boxNum.split('-')[0])-1;
335
+ var numEnd = parseFloat(boxNum.split('-')[1])-1;
336
+ if(numStart<numEnd){
337
+ o.find("li").eq(numStart).addClass('box box-top').prepend(spacer);
338
+ o.find("li").eq(numEnd).addClass('box box-bot').prepend(spacer);
339
+ for(var x=numStart+1; x<numEnd; x++){
340
+ o.find("li").eq(x).addClass('box box-mid').prepend(spacer);
341
+ }
342
+ } else if (numStart==numEnd){
343
+ o.find("li").eq(numStart).addClass('box').prepend(spacer);
344
+ }
345
+ }
346
+
347
+ }
348
+
349
+ if(defaults.boxColor!=""){
350
+ o.find("li.box").css('border-color',defaults.boxColor);
351
+ }
352
+
353
+ if(defaults.boxFill!=""){
354
+ o.find("li.box").addClass('box-bg').css('background-color',defaults.boxFill);
355
+ }
356
+
357
+ if($.browser.webkit){
358
+ o.find(".snippet-num li.box").css('margin-left','-3.3em');
359
+ o.find(".snippet-num li .box-sp").css('width','21px');
360
+ }
361
+
362
+ }
363
+
364
+
365
+
366
+ sh_highlightDocument();
367
+
368
+ // show/hide hover menu
369
+ if(!defaults.menu){
370
+ o.prev('.snippet-menu').find('pre,.snippet-clipboard').hide();
371
+ } else {
372
+ o.prev('.snippet-menu').find('pre,.snippet-clipboard').show();
373
+ }
374
+
375
+ }
376
+
377
+ } else {
378
+ var error = "Snippet Error: Sorry, Snippet only formats '<pre>' elements. '<"+node+">' elements are currently unsupported.";
379
+ console.log(error);
380
+ return false;
381
+ }
382
+
383
+ });
384
+
385
+ };
386
+
387
+ })(jQuery);
388
+
389
+
390
+ // snippet new window popup function
391
+ function snippetPopup(content) {
392
+ top.consoleRef=window.open('','myconsole',
393
+ 'width=600,height=300'
394
+ +',left=50,top=50'
395
+ +',menubar=0'
396
+ +',toolbar=0'
397
+ +',location=0'
398
+ +',status=0'
399
+ +',scrollbars=1'
400
+ +',resizable=1');
401
+ top.consoleRef.document.writeln(
402
+ '<html><head><title>Snippet :: Code View :: '+location.href+'</title></head>'
403
+ +'<body bgcolor=white onLoad="self.focus()">'
404
+ +'<pre>'+content+'</pre>'
405
+ +'</body></html>'
406
+ );
407
+ top.consoleRef.document.close();
408
+ }
409
+
410
+
411
+
412
+
413
+
414
+ // ZeroClipboard
415
+ // Simple Set Clipboard System
416
+ // Author: Joseph Huckaby
417
+
418
+ var ZeroClipboard = {
419
+
420
+ version: "1.0.7",
421
+ clients: {}, // registered upload clients on page, indexed by id
422
+ moviePath: 'ZeroClipboard.swf', // URL to movie
423
+ nextId: 1, // ID of next movie
424
+
425
+ $: function(thingy) {
426
+ // simple DOM lookup utility function
427
+ if (typeof(thingy) == 'string') thingy = document.getElementById(thingy);
428
+ if (!thingy.addClass) {
429
+ // extend element with a few useful methods
430
+ thingy.hide = function() { this.style.display = 'none'; };
431
+ thingy.show = function() { this.style.display = ''; };
432
+ thingy.addClass = function(name) { this.removeClass(name); this.className += ' ' + name; };
433
+ thingy.removeClass = function(name) {
434
+ var classes = this.className.split(/\s+/);
435
+ var idx = -1;
436
+ for (var k = 0; k < classes.length; k++) {
437
+ if (classes[k] == name) { idx = k; k = classes.length; }
438
+ }
439
+ if (idx > -1) {
440
+ classes.splice( idx, 1 );
441
+ this.className = classes.join(' ');
442
+ }
443
+ return this;
444
+ };
445
+ thingy.hasClass = function(name) {
446
+ return !!this.className.match( new RegExp("\\s*" + name + "\\s*") );
447
+ };
448
+ }
449
+ return thingy;
450
+ },
451
+
452
+ setMoviePath: function(path) {
453
+ // set path to ZeroClipboard.swf
454
+ this.moviePath = path;
455
+ },
456
+
457
+ dispatch: function(id, eventName, args) {
458
+ // receive event from flash movie, send to client
459
+ var client = this.clients[id];
460
+ if (client) {
461
+ client.receiveEvent(eventName, args);
462
+ }
463
+ },
464
+
465
+ register: function(id, client) {
466
+ // register new client to receive events
467
+ this.clients[id] = client;
468
+ },
469
+
470
+ getDOMObjectPosition: function(obj, stopObj) {
471
+ // get absolute coordinates for dom element
472
+ var info = {
473
+ left: 0,
474
+ top: 0,
475
+ width: obj.width ? obj.width : obj.offsetWidth,
476
+ height: obj.height ? obj.height : obj.offsetHeight
477
+ };
478
+
479
+ while (obj && (obj != stopObj)) {
480
+ info.left += obj.offsetLeft;
481
+ info.top += obj.offsetTop;
482
+ obj = obj.offsetParent;
483
+ }
484
+
485
+ return info;
486
+ },
487
+
488
+ Client: function(elem) {
489
+ // constructor for new simple upload client
490
+ this.handlers = {};
491
+
492
+ // unique ID
493
+ this.id = ZeroClipboard.nextId++;
494
+ this.movieId = 'ZeroClipboardMovie_' + this.id;
495
+
496
+ // register client with singleton to receive flash events
497
+ ZeroClipboard.register(this.id, this);
498
+
499
+ // create movie
500
+ if (elem) this.glue(elem);
501
+ }
502
+ };
503
+
504
+ ZeroClipboard.Client.prototype = {
505
+
506
+ id: 0, // unique ID for us
507
+ ready: false, // whether movie is ready to receive events or not
508
+ movie: null, // reference to movie object
509
+ clipText: '', // text to copy to clipboard
510
+ handCursorEnabled: true, // whether to show hand cursor, or default pointer cursor
511
+ cssEffects: true, // enable CSS mouse effects on dom container
512
+ handlers: null, // user event handlers
513
+
514
+ glue: function(elem, appendElem, stylesToAdd) {
515
+ // glue to DOM element
516
+ // elem can be ID or actual DOM element object
517
+ this.domElement = ZeroClipboard.$(elem);
518
+
519
+ // float just above object, or zIndex 99 if dom element isn't set
520
+ var zIndex = 99;
521
+ if (this.domElement.style.zIndex) {
522
+ zIndex = parseInt(this.domElement.style.zIndex, 10) + 1;
523
+ }
524
+
525
+ if (typeof(appendElem) == 'string') {
526
+ appendElem = ZeroClipboard.$(appendElem);
527
+ }
528
+ else if (typeof(appendElem) == 'undefined') {
529
+ appendElem = document.getElementsByTagName('body')[0];
530
+ }
531
+
532
+ // find X/Y position of domElement
533
+ var box = ZeroClipboard.getDOMObjectPosition(this.domElement, appendElem);
534
+
535
+ // create floating DIV above element
536
+ this.div = document.createElement('div');
537
+ this.div.className = "snippet-clipboard";
538
+ var style = this.div.style;
539
+ style.position = 'absolute';
540
+ style.left = '' + box.left + 'px';
541
+ style.top = '' + box.top + 'px';
542
+ style.width = '' + box.width + 'px';
543
+ style.height = '' + box.height + 'px';
544
+ style.zIndex = zIndex;
545
+
546
+ if (typeof(stylesToAdd) == 'object') {
547
+ for (addedStyle in stylesToAdd) {
548
+ style[addedStyle] = stylesToAdd[addedStyle];
549
+ }
550
+ }
551
+
552
+ // style.backgroundColor = '#f00'; // debug
553
+
554
+ appendElem.appendChild(this.div);
555
+
556
+ this.div.innerHTML = this.getHTML( box.width, box.height );
557
+ },
558
+
559
+ getHTML: function(width, height) {
560
+ // return HTML for movie
561
+ var html = '';
562
+ var flashvars = 'id=' + this.id +
563
+ '&width=' + width +
564
+ '&height=' + height;
565
+
566
+ if (navigator.userAgent.match(/MSIE/)) {
567
+ // IE gets an OBJECT tag
568
+ var protocol = location.href.match(/^https/i) ? 'https://' : 'http://';
569
+ html += '<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="'+protocol+'download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="'+width+'" height="'+height+'" id="'+this.movieId+'" align="middle"><param name="allowScriptAccess" value="always" /><param name="allowFullScreen" value="false" /><param name="movie" value="'+ZeroClipboard.moviePath+'" /><param name="loop" value="false" /><param name="menu" value="false" /><param name="quality" value="best" /><param name="bgcolor" value="#ffffff" /><param name="flashvars" value="'+flashvars+'"/><param name="wmode" value="transparent"/></object>';
570
+ }
571
+ else {
572
+ // all other browsers get an EMBED tag
573
+ html += '<embed id="'+this.movieId+'" src="'+ZeroClipboard.moviePath+'" loop="false" menu="false" quality="best" bgcolor="#ffffff" width="'+width+'" height="'+height+'" name="'+this.movieId+'" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" flashvars="'+flashvars+'" wmode="transparent" />';
574
+ }
575
+ return html;
576
+ },
577
+
578
+ hide: function() {
579
+ // temporarily hide floater offscreen
580
+ if (this.div) {
581
+ this.div.style.left = '-2000px';
582
+ }
583
+ },
584
+
585
+ show: function() {
586
+ // show ourselves after a call to hide()
587
+ this.reposition();
588
+ },
589
+
590
+ destroy: function() {
591
+ // destroy control and floater
592
+ if (this.domElement && this.div) {
593
+ this.hide();
594
+ this.div.innerHTML = '';
595
+
596
+ var body = document.getElementsByTagName('body')[0];
597
+ try { body.removeChild( this.div ); } catch(e) {;}
598
+
599
+ this.domElement = null;
600
+ this.div = null;
601
+ }
602
+ },
603
+
604
+ reposition: function(elem) {
605
+ // reposition our floating div, optionally to new container
606
+ // warning: container CANNOT change size, only position
607
+ if (elem) {
608
+ this.domElement = ZeroClipboard.$(elem);
609
+ if (!this.domElement) this.hide();
610
+ }
611
+
612
+ if (this.domElement && this.div) {
613
+ var box = ZeroClipboard.getDOMObjectPosition(this.domElement);
614
+ var style = this.div.style;
615
+ style.left = '' + box.left + 'px';
616
+ style.top = '' + box.top + 'px';
617
+ }
618
+ },
619
+
620
+ setText: function(newText) {
621
+ // set text to be copied to clipboard
622
+ this.clipText = newText;
623
+ if (this.ready){ this.movie.setText(newText);}
624
+ },
625
+
626
+ addEventListener: function(eventName, func) {
627
+ // add user event listener for event
628
+ // event types: load, queueStart, fileStart, fileComplete, queueComplete, progress, error, cancel
629
+ eventName = eventName.toString().toLowerCase().replace(/^on/, '');
630
+ if (!this.handlers[eventName]){ this.handlers[eventName] = [];}
631
+ this.handlers[eventName].push(func);
632
+ },
633
+
634
+ setHandCursor: function(enabled) {
635
+ // enable hand cursor (true), or default arrow cursor (false)
636
+ this.handCursorEnabled = enabled;
637
+ if (this.ready){ this.movie.setHandCursor(enabled);}
638
+ },
639
+
640
+ setCSSEffects: function(enabled) {
641
+ // enable or disable CSS effects on DOM container
642
+ this.cssEffects = !!enabled;
643
+ },
644
+
645
+ receiveEvent: function(eventName, args) {
646
+ // receive event from flash
647
+ eventName = eventName.toString().toLowerCase().replace(/^on/, '');
648
+
649
+ // special behavior for certain events
650
+ switch (eventName) {
651
+ case 'load':
652
+ // movie claims it is ready, but in IE this isn't always the case...
653
+ // bug fix: Cannot extend EMBED DOM elements in Firefox, must use traditional function
654
+ this.movie = document.getElementById(this.movieId);
655
+ if (!this.movie) {
656
+ var self = this;
657
+ setTimeout( function() { self.receiveEvent('load', null); }, 1 );
658
+ return;
659
+ }
660
+
661
+ // firefox on pc needs a "kick" in order to set these in certain cases
662
+ if (!this.ready && navigator.userAgent.match(/Firefox/) && navigator.userAgent.match(/Windows/)) {
663
+ var self = this;
664
+ setTimeout( function() { self.receiveEvent('load', null); }, 100 );
665
+ this.ready = true;
666
+ return;
667
+ }
668
+
669
+ this.ready = true;
670
+ try{
671
+ this.movie.setText( this.clipText );
672
+ }catch(e){}
673
+ try{
674
+ this.movie.setHandCursor( this.handCursorEnabled );
675
+ }catch(e){}
676
+ break;
677
+
678
+ case 'mouseover':
679
+ if (this.domElement && this.cssEffects) {
680
+ this.domElement.addClass('hover');
681
+ if (this.recoverActive){ this.domElement.addClass('active');}
682
+ }
683
+ break;
684
+
685
+ case 'mouseout':
686
+ if (this.domElement && this.cssEffects) {
687
+ this.recoverActive = false;
688
+ if (this.domElement.hasClass('active')) {
689
+ this.domElement.removeClass('active');
690
+ this.recoverActive = true;
691
+ }
692
+ this.domElement.removeClass('hover');
693
+ }
694
+ break;
695
+
696
+ case 'mousedown':
697
+ if (this.domElement && this.cssEffects) {
698
+ this.domElement.addClass('active');
699
+ }
700
+ break;
701
+
702
+ case 'mouseup':
703
+ if (this.domElement && this.cssEffects) {
704
+ this.domElement.removeClass('active');
705
+ this.recoverActive = false;
706
+ }
707
+ break;
708
+ } // switch eventName
709
+
710
+ if (this.handlers[eventName]) {
711
+ for (var idx = 0, len = this.handlers[eventName].length; idx < len; idx++) {
712
+ var func = this.handlers[eventName][idx];
713
+
714
+ if (typeof(func) == 'function') {
715
+ // actual function reference
716
+ func(this, args);
717
+ }
718
+ else if ((typeof(func) == 'object') && (func.length == 2)) {
719
+ // PHP style object + method, i.e. [myObject, 'myMethod']
720
+ func[0][ func[1] ](this, args);
721
+ }
722
+ else if (typeof(func) == 'string') {
723
+ // name of function
724
+ window[func](this, args);
725
+ }
726
+ } // foreach event handler defined
727
+ } // user defined handler for event
728
+ }
729
+
730
+ };
731
+
732
+
733
+ /* SHJS */
734
+ /* Copyright (C) 2007, 2008 gnombat@users.sourceforge.net */
735
+ /* License: http://shjs.sourceforge.net/doc/gplv3.html */
736
+
737
+ if(!this.sh_languages){this.sh_languages={}}var sh_requests={};function sh_isEmailAddress(a){if(/^mailto:/.test(a)){return false}return a.indexOf("@")!==-1}function sh_setHref(b,c,d){var a=d.substring(b[c-2].pos,b[c-1].pos);if(a.length>=2&&a.charAt(0)==="<"&&a.charAt(a.length-1)===">"){a=a.substr(1,a.length-2)}if(sh_isEmailAddress(a)){a="mailto:"+a}b[c-2].node.href=a}function sh_konquerorExec(b){var a=[""];a.index=b.length;a.input=b;return a}function sh_highlightString(B,o){if(/Konqueror/.test(navigator.userAgent)){if(!o.konquered){for(var F=0;F<o.length;F++){for(var H=0;H<o[F].length;H++){var G=o[F][H][0];if(G.source==="$"){G.exec=sh_konquerorExec}}}o.konquered=true}}var N=document.createElement("a");var q=document.createElement("span");var A=[];var j=0;var n=[];var C=0;var k=null;var x=function(i,a){var p=i.length;if(p===0){return}if(!a){var Q=n.length;if(Q!==0){var r=n[Q-1];if(!r[3]){a=r[1]}}}if(k!==a){if(k){A[j++]={pos:C};if(k==="sh_url"){sh_setHref(A,j,B)}}if(a){var P;if(a==="sh_url"){P=N.cloneNode(false)}else{P=q.cloneNode(false)}P.className=a;A[j++]={node:P,pos:C}}}C+=p;k=a};var t=/\r\n|\r|\n/g;t.lastIndex=0;var d=B.length;while(C<d){var v=C;var l;var w;var h=t.exec(B);if(h===null){l=d;w=d}else{l=h.index;w=t.lastIndex}var g=B.substring(v,l);var M=[];for(;;){var I=C-v;var D;var y=n.length;if(y===0){D=0}else{D=n[y-1][2]}var O=o[D];var z=O.length;var m=M[D];if(!m){m=M[D]=[]}var E=null;var u=-1;for(var K=0;K<z;K++){var f;if(K<m.length&&(m[K]===null||I<=m[K].index)){f=m[K]}else{var c=O[K][0];c.lastIndex=I;f=c.exec(g);m[K]=f}if(f!==null&&(E===null||f.index<E.index)){E=f;u=K;if(f.index===I){break}}}if(E===null){x(g.substring(I),null);break}else{if(E.index>I){x(g.substring(I,E.index),null)}var e=O[u];var J=e[1];var b;if(J instanceof Array){for(var L=0;L<J.length;L++){b=E[L+1];x(b,J[L])}}else{b=E[0];x(b,J)}switch(e[2]){case -1:break;case -2:n.pop();break;case -3:n.length=0;break;default:n.push(e);break}}}if(k){A[j++]={pos:C};if(k==="sh_url"){sh_setHref(A,j,B)}k=null}C=w}return A}function sh_getClasses(d){var a=[];var b=d.className;if(b&&b.length>0){var e=b.split(" ");for(var c=0;c<e.length;c++){if(e[c].length>0){a.push(e[c])}}}return a}function sh_addClass(c,a){var d=sh_getClasses(c);for(var b=0;b<d.length;b++){if(a.toLowerCase()===d[b].toLowerCase()){return}}d.push(a);c.className=d.join(" ")}function sh_extractTagsFromNodeList(c,a){var f=c.length;for(var d=0;d<f;d++){var e=c.item(d);switch(e.nodeType){case 1:if(e.nodeName.toLowerCase()==="br"){var b;if(/MSIE/.test(navigator.userAgent)){b="\r"}else{b="\n"}a.text.push(b);a.pos++}else{a.tags.push({node:e.cloneNode(false),pos:a.pos});sh_extractTagsFromNodeList(e.childNodes,a);a.tags.push({pos:a.pos})}break;case 3:case 4:a.text.push(e.data);a.pos+=e.length;break}}}function sh_extractTags(c,b){var a={};a.text=[];a.tags=b;a.pos=0;sh_extractTagsFromNodeList(c.childNodes,a);return a.text.join("")}function sh_mergeTags(d,f){var a=d.length;if(a===0){return f}var c=f.length;if(c===0){return d}var i=[];var e=0;var b=0;while(e<a&&b<c){var h=d[e];var g=f[b];if(h.pos<=g.pos){i.push(h);e++}else{i.push(g);if(f[b+1].pos<=h.pos){b++;i.push(f[b]);b++}else{i.push({pos:h.pos});f[b]={node:g.node.cloneNode(false),pos:h.pos}}}}while(e<a){i.push(d[e]);e++}while(b<c){i.push(f[b]);b++}return i}function sh_insertTags(k,h){var g=document;var l=document.createDocumentFragment();var e=0;var d=k.length;var b=0;var j=h.length;var c=l;while(b<j||e<d){var i;var a;if(e<d){i=k[e];a=i.pos}else{a=j}if(a<=b){if(i.node){var f=i.node;c.appendChild(f);c=f}else{c=c.parentNode}e++}else{c.appendChild(g.createTextNode(h.substring(b,a)));b=a}}return l}function sh_highlightElement(d,g){sh_addClass(d,"sh_sourceCode");var c=[];var e=sh_extractTags(d,c);var f=sh_highlightString(e,g);var b=sh_mergeTags(c,f);var a=sh_insertTags(b,e);while(d.hasChildNodes()){d.removeChild(d.firstChild)}d.appendChild(a)}function sh_getXMLHttpRequest(){if(window.ActiveXObject){return new ActiveXObject("Msxml2.XMLHTTP")}else{if(window.XMLHttpRequest){return new XMLHttpRequest()}}throw"No XMLHttpRequest implementation available"}function sh_load(language,element,prefix,suffix){if(language in sh_requests){sh_requests[language].push(element);return}sh_requests[language]=[element];var request=sh_getXMLHttpRequest();var url=prefix+"sh_"+language+suffix;request.open("GET",url,true);request.onreadystatechange=function(){if(request.readyState===4){try{if(!request.status||request.status===200){eval(request.responseText);var elements=sh_requests[language];for(var i=0;i<elements.length;i++){sh_highlightElement(elements[i],sh_languages[language])}}else{throw"HTTP error: status "+request.status}}finally{request=null}}};request.send(null)}
738
+
739
+
740
+
741
+
742
+ function sh_highlightDocument(prefix, suffix) {
743
+ var nodeList = document.getElementsByTagName('pre');
744
+ for (var i = 0; i < nodeList.length; i++) {
745
+ var element = nodeList.item(i);
746
+ var htmlClasses = element.className.toLowerCase();
747
+ var htmlClass = htmlClasses.replace(/sh_sourcecode/g,'');
748
+ if(htmlClass.indexOf("sh_")!=-1){htmlClass=htmlClass.match(/(\bsh_)\w+\b/g)[0];}
749
+ if (htmlClasses.indexOf('sh_sourcecode') != -1) {continue;}
750
+ if (htmlClass.substr(0, 3) === 'sh_') {
751
+ var language = htmlClass.substring(3);
752
+ if (language in sh_languages) {
753
+ sh_highlightElement(element, sh_languages[language]);
754
+ } else if (typeof(prefix) === 'string' && typeof(suffix) === 'string') {
755
+ sh_load(language, element, prefix, suffix);
756
+ } else {
757
+ console.log('Found <pre> element with class="' + htmlClass + '", but no such language exists');
758
+ continue;
759
+ }
760
+ break;
761
+ }
762
+ }
763
+ }
764
+
765
+ /* CSS language (http://shjs.sourceforge.net/lang/sh_css.min.js) */
766
+ if(!this.sh_languages){this.sh_languages={}}sh_languages.css=[[[/\/\/\//g,"sh_comment",1],[/@/g,"sh_comment",1],[/\/\//g,"sh_comment",7],[/\/\*\*/g,"sh_comment",8],[/\/\*/g,"sh_comment",9],[/(?:\.|#)[A-Za-z0-9_:\- >\[\]\(\)+\*=",]+/g,"sh_selector",-1],[/\{/g,"sh_cbracket",10,1],[/~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|\/|\?|&|<|>|\|/g,"sh_symbol",-1]],[[/$/g,null,-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/<\?xml/g,"sh_preproc",2,1],[/<!DOCTYPE/g,"sh_preproc",4,1],[/<!--/g,"sh_comment",5],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,"sh_keyword",6,1],[/&(?:[A-Za-z0-9]+);/g,"sh_preproc",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,"sh_keyword",6,1],[/@[A-Za-z]+/g,"sh_type",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/\?>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",3]],[[/\\(?:\\|")/g,null,-1],[/"/g,"sh_string",-2]],[[/>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",3]],[[/-->/g,"sh_comment",-2],[/<!--/g,"sh_comment",5]],[[/(?:\/)?>/g,"sh_keyword",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",3]],[[/$/g,null,-2]],[[/\*\//g,"sh_comment",-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/<\?xml/g,"sh_preproc",2,1],[/<!DOCTYPE/g,"sh_preproc",4,1],[/<!--/g,"sh_comment",5],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,"sh_keyword",6,1],[/&(?:[A-Za-z0-9]+);/g,"sh_preproc",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,"sh_keyword",6,1],[/@[A-Za-z]+/g,"sh_type",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/\*\//g,"sh_comment",-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/\}/g,"sh_cbracket",-2],[/\/\/\//g,"sh_comment",1],[/\/\//g,"sh_comment",7],[/\/\*\*/g,"sh_comment",8],[/\/\*/g,"sh_comment",9],[/[A-Za-z0-9_-]+[ \t]*:/g,"sh_property",-1],[/[.%A-Za-z0-9_-]+/g,"sh_value",-1],[/#(?:[A-Za-z0-9_]+)/g,"sh_string",-1]]];
767
+
768
+ /* HTML language (http://shjs.sourceforge.net/lang/sh_html.min.js) */
769
+ if(!this.sh_languages){this.sh_languages={}}sh_languages.html=[[[/<\?xml/g,"sh_preproc",1,1],[/<!DOCTYPE/g,"sh_preproc",3,1],[/<!--/g,"sh_comment",4],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,"sh_keyword",5,1],[/&(?:[A-Za-z0-9]+);/g,"sh_preproc",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,"sh_keyword",5,1]],[[/\?>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",2]],[[/\\(?:\\|")/g,null,-1],[/"/g,"sh_string",-2]],[[/>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",2]],[[/-->/g,"sh_comment",-2],[/<!--/g,"sh_comment",4]],[[/(?:\/)?>/g,"sh_keyword",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",2]]];
770
+
771
+ /* Javascript language (http://shjs.sourceforge.net/lang/sh_javascript.min.js) */
772
+ if(!this.sh_languages){this.sh_languages={}}sh_languages.javascript=[[[/\/\/\//g,"sh_comment",1],[/\/\//g,"sh_comment",7],[/\/\*\*/g,"sh_comment",8],[/\/\*/g,"sh_comment",9],[/\b(?:abstract|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|final|finally|for|function|goto|if|implements|in|instanceof|interface|native|new|null|private|protected|prototype|public|return|static|super|switch|synchronized|throw|throws|this|transient|true|try|typeof|var|volatile|while|with)\b/g,"sh_keyword",-1],[/(\+\+|--|\)|\])(\s*)(\/=?(?![*\/]))/g,["sh_symbol","sh_normal","sh_symbol"],-1],[/(0x[A-Fa-f0-9]+|(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?)(\s*)(\/(?![*\/]))/g,["sh_number","sh_normal","sh_symbol"],-1],[/([A-Za-z$_][A-Za-z0-9$_]*\s*)(\/=?(?![*\/]))/g,["sh_normal","sh_symbol"],-1],[/\/(?:\\.|[^*\\\/])(?:\\.|[^\\\/])*\/[gim]*/g,"sh_regexp",-1],[/\b[+-]?(?:(?:0x[A-Fa-f0-9]+)|(?:(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?))u?(?:(?:int(?:8|16|32|64))|L)?\b/g,"sh_number",-1],[/"/g,"sh_string",10],[/'/g,"sh_string",11],[/~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|\/|\?|&|<|>|\|/g,"sh_symbol",-1],[/\{|\}/g,"sh_cbracket",-1],[/\b(?:Math|Infinity|NaN|undefined|arguments)\b/g,"sh_predef_var",-1],[/\b(?:Array|Boolean|Date|Error|EvalError|Function|Number|Object|RangeError|ReferenceError|RegExp|String|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt)\b/g,"sh_predef_func",-1],[/(?:[A-Za-z]|_)[A-Za-z0-9_]*(?=[ \t]*\()/g,"sh_function",-1]],[[/$/g,null,-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/<\?xml/g,"sh_preproc",2,1],[/<!DOCTYPE/g,"sh_preproc",4,1],[/<!--/g,"sh_comment",5],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,"sh_keyword",6,1],[/&(?:[A-Za-z0-9]+);/g,"sh_preproc",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,"sh_keyword",6,1],[/@[A-Za-z]+/g,"sh_type",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/\?>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",3]],[[/\\(?:\\|")/g,null,-1],[/"/g,"sh_string",-2]],[[/>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",3]],[[/-->/g,"sh_comment",-2],[/<!--/g,"sh_comment",5]],[[/(?:\/)?>/g,"sh_keyword",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",3]],[[/$/g,null,-2]],[[/\*\//g,"sh_comment",-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/<\?xml/g,"sh_preproc",2,1],[/<!DOCTYPE/g,"sh_preproc",4,1],[/<!--/g,"sh_comment",5],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,"sh_keyword",6,1],[/&(?:[A-Za-z0-9]+);/g,"sh_preproc",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,"sh_keyword",6,1],[/@[A-Za-z]+/g,"sh_type",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/\*\//g,"sh_comment",-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/"/g,"sh_string",-2],[/\\./g,"sh_specialchar",-1]],[[/'/g,"sh_string",-2],[/\\./g,"sh_specialchar",-1]]];
773
+
774
+ /* Javascript DOM language (http://shjs.sourceforge.net/lang/sh_javascript_dom.min.js) */
775
+ if(!this.sh_languages){this.sh_languages={}}sh_languages.javascript_dom=[[[/\/\/\//g,"sh_comment",1],[/\/\//g,"sh_comment",7],[/\/\*\*/g,"sh_comment",8],[/\/\*/g,"sh_comment",9],[/\b(?:abstract|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|false|final|finally|for|function|goto|if|implements|in|instanceof|interface|native|new|null|private|protected|prototype|public|return|static|super|switch|synchronized|throw|throws|this|transient|true|try|typeof|var|volatile|while|with)\b/g,"sh_keyword",-1],[/(\+\+|--|\)|\])(\s*)(\/=?(?![*\/]))/g,["sh_symbol","sh_normal","sh_symbol"],-1],[/(0x[A-Fa-f0-9]+|(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?)(\s*)(\/(?![*\/]))/g,["sh_number","sh_normal","sh_symbol"],-1],[/([A-Za-z$_][A-Za-z0-9$_]*\s*)(\/=?(?![*\/]))/g,["sh_normal","sh_symbol"],-1],[/\/(?:\\.|[^*\\\/])(?:\\.|[^\\\/])*\/[gim]*/g,"sh_regexp",-1],[/\b[+-]?(?:(?:0x[A-Fa-f0-9]+)|(?:(?:[\d]*\.)?[\d]+(?:[eE][+-]?[\d]+)?))u?(?:(?:int(?:8|16|32|64))|L)?\b/g,"sh_number",-1],[/"/g,"sh_string",10],[/'/g,"sh_string",11],[/~|!|%|\^|\*|\(|\)|-|\+|=|\[|\]|\\|:|;|,|\.|\/|\?|&|<|>|\|/g,"sh_symbol",-1],[/\{|\}/g,"sh_cbracket",-1],[/\b(?:Math|Infinity|NaN|undefined|arguments)\b/g,"sh_predef_var",-1],[/\b(?:Array|Boolean|Date|Error|EvalError|Function|Number|Object|RangeError|ReferenceError|RegExp|String|SyntaxError|TypeError|URIError|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|eval|isFinite|isNaN|parseFloat|parseInt)\b/g,"sh_predef_func",-1],[/\b(?:applicationCache|closed|Components|content|controllers|crypto|defaultStatus|dialogArguments|directories|document|frameElement|frames|fullScreen|globalStorage|history|innerHeight|innerWidth|length|location|locationbar|menubar|name|navigator|opener|outerHeight|outerWidth|pageXOffset|pageYOffset|parent|personalbar|pkcs11|returnValue|screen|availTop|availLeft|availHeight|availWidth|colorDepth|height|left|pixelDepth|top|width|screenX|screenY|scrollbars|scrollMaxX|scrollMaxY|scrollX|scrollY|self|sessionStorage|sidebar|status|statusbar|toolbar|top|window)\b/g,"sh_predef_var",-1],[/\b(?:alert|addEventListener|atob|back|blur|btoa|captureEvents|clearInterval|clearTimeout|close|confirm|dump|escape|find|focus|forward|getAttention|getComputedStyle|getSelection|home|moveBy|moveTo|open|openDialog|postMessage|print|prompt|releaseEvents|removeEventListener|resizeBy|resizeTo|scroll|scrollBy|scrollByLines|scrollByPages|scrollTo|setInterval|setTimeout|showModalDialog|sizeToContent|stop|unescape|updateCommands|onabort|onbeforeunload|onblur|onchange|onclick|onclose|oncontextmenu|ondragdrop|onerror|onfocus|onkeydown|onkeypress|onkeyup|onload|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|onpaint|onreset|onresize|onscroll|onselect|onsubmit|onunload)\b/g,"sh_predef_func",-1],[/(?:[A-Za-z]|_)[A-Za-z0-9_]*(?=[ \t]*\()/g,"sh_function",-1]],[[/$/g,null,-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/<\?xml/g,"sh_preproc",2,1],[/<!DOCTYPE/g,"sh_preproc",4,1],[/<!--/g,"sh_comment",5],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,"sh_keyword",6,1],[/&(?:[A-Za-z0-9]+);/g,"sh_preproc",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,"sh_keyword",6,1],[/@[A-Za-z]+/g,"sh_type",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/\?>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",3]],[[/\\(?:\\|")/g,null,-1],[/"/g,"sh_string",-2]],[[/>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",3]],[[/-->/g,"sh_comment",-2],[/<!--/g,"sh_comment",5]],[[/(?:\/)?>/g,"sh_keyword",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",3]],[[/$/g,null,-2]],[[/\*\//g,"sh_comment",-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/<\?xml/g,"sh_preproc",2,1],[/<!DOCTYPE/g,"sh_preproc",4,1],[/<!--/g,"sh_comment",5],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,"sh_keyword",6,1],[/&(?:[A-Za-z0-9]+);/g,"sh_preproc",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z][A-Za-z0-9]*/g,"sh_keyword",6,1],[/@[A-Za-z]+/g,"sh_type",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/\*\//g,"sh_comment",-2],[/(?:<?)[A-Za-z0-9_\.\/\-_~]+@[A-Za-z0-9_\.\/\-_~]+(?:>?)|(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_~]+(?:>?)/g,"sh_url",-1],[/(?:TODO|FIXME|BUG)(?:[:]?)/g,"sh_todo",-1]],[[/"/g,"sh_string",-2],[/\\./g,"sh_specialchar",-1]],[[/'/g,"sh_string",-2],[/\\./g,"sh_specialchar",-1]]];
776
+
777
+ /* URL language (http://shjs.sourceforge.net/lang/sh_url.min.js) */
778
+ if(!this.sh_languages){this.sh_languages={};}
779
+ sh_languages['url']=[[{'regex':/(?:<?)[A-Za-z0-9_\.\/\-_]+@[A-Za-z0-9_\.\/\-_]+(?:>?)/g,'style':'sh_url'},{'regex':/(?:<?)[A-Za-z0-9_]+:\/\/[A-Za-z0-9_\.\/\-_]+(?:>?)/g,'style':'sh_url'}]];
780
+
781
+ /* XML language (http://shjs.sourceforge.net/lang/sh_xml.min.js) */
782
+ if(!this.sh_languages){this.sh_languages={}}sh_languages.xml=[[[/<\?xml/g,"sh_preproc",1,1],[/<!DOCTYPE/g,"sh_preproc",3,1],[/<!--/g,"sh_comment",4],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)(?:\/)?>/g,"sh_keyword",-1],[/<(?:\/)?[A-Za-z](?:[A-Za-z0-9_:.-]*)/g,"sh_keyword",5,1],[/&(?:[A-Za-z0-9]+);/g,"sh_preproc",-1]],[[/\?>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",2]],[[/\\(?:\\|")/g,null,-1],[/"/g,"sh_string",-2]],[[/>/g,"sh_preproc",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",2]],[[/-->/g,"sh_comment",-2],[/<!--/g,"sh_comment",4]],[[/(?:\/)?>/g,"sh_keyword",-2],[/([^=" \t>]+)([ \t]*)(=?)/g,["sh_type","sh_normal","sh_symbol"],-1],[/"/g,"sh_string",2]]];