├── .editorconfig ├── .gitignore ├── CHECKLIST.txt ├── History.md ├── LICENSE.txt ├── README.md ├── demo ├── index.html └── styles │ ├── generic.css │ └── style.css ├── package-lock.json ├── package.json ├── prettify ├── closure.map ├── prettify.css ├── prettify.js ├── prettify.min.css └── prettify.min.js ├── scripts ├── jquery.syntaxhighlighter.js ├── jquery.syntaxhighlighter.min.js └── resources │ ├── core.console.js │ ├── jquery.appendscriptstyle.js │ └── jquery.syntaxhighlighter.js └── styles ├── ie.css ├── ie.min.css ├── style.css ├── style.min.css ├── theme-balupton.css ├── theme-balupton.min.css ├── theme-google.css └── theme-google.min.css /.editorconfig: -------------------------------------------------------------------------------- 1 | # 2018 September 26 2 | # https://github.com/bevry/base 3 | 4 | root = true 5 | 6 | [*] 7 | end_of_line = lf 8 | charset = utf-8 9 | trim_trailing_whitespace = true 10 | insert_final_newline = false 11 | indent_style = tab 12 | 13 | [{*.mk,*.py}] 14 | indent_style = tab 15 | indent_size = 4 16 | 17 | [*.md] 18 | indent_style = space 19 | indent_size = 4 20 | 21 | [{*.json,*.lsrules,*.yml,*.bowerrc,*.babelrc}] 22 | indent_style = space 23 | indent_size = 2 24 | 25 | [{*.json,*.lsrules}] 26 | insert_final_newline = true 27 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # 2019 January 26 2 | # https://github.com/bevry/base 3 | 4 | # System Files 5 | **/.DS_Store 6 | 7 | # Temp Files 8 | **/.docpad.db 9 | **/*.log 10 | **/*.cpuprofile 11 | **/*.heapsnapshot 12 | 13 | # Editor Files 14 | .c9/ 15 | .vscode/ 16 | 17 | # Private Files 18 | .env 19 | .idea 20 | .cake_task_cache 21 | 22 | # Build Caches 23 | build/ 24 | bower_components/ 25 | node_modules/ 26 | .next/ 27 | .pnp/ 28 | .pnp.js 29 | 30 | # Build Outputs 31 | **/out.* 32 | **/*.out.* 33 | **/out/ 34 | **/output/ 35 | edition*/ 36 | coffeejs/ 37 | coffee/ 38 | es5/ 39 | es2015/ 40 | esnext/ 41 | docs/ 42 | 43 | # ===================================== 44 | # CUSTOM 45 | -------------------------------------------------------------------------------- /CHECKLIST.txt: -------------------------------------------------------------------------------- 1 | Benjamin "balupton" Lupton's Project Checklist v0.1.1 (July 09, 2010) 2 | 3 | All Projects: 4 | - Have you run all the unit tests for the project? 5 | - Have you remembered to remake the project? [make all] 6 | - Have you tested in all major browsers? 7 | - Have you ensured all documentation dates are correct? 8 | - Have you ensured all documentation project links are current? 9 | - Have you ensured version changelog entries have been added to appropriate file? 10 | - If yes; then you are good to tag this release if you like [git tag -s "v..."] 11 | - To push; use [git push --all] then [git push --tags] 12 | 13 | Project Specific: 14 | - Have you remembered to set it back to the minified version in the demo? -------------------------------------------------------------------------------- /History.md: -------------------------------------------------------------------------------- 1 | # History 2 | 3 | Master 4 | 5 | - Corrected for new repository location at https://github.com/bevry-archive/jquery-syntaxhighlighter 6 | - Corrected inconsistent licensing information 7 | - Moved resources that are available via CDN to their CDN locations 8 | - Replaced the demo's usage of yui-reset with normalize 9 | - Removed resources that are no longer relevant from the demo (Google Analystics, PayPal, Get Satisfaction) 10 | - Moved from the Makefile to `package.json` scripts, as the Makefile used Closure and YUI Minifier for compression, which require Java which I do not wish to install 11 | - Added the relevant [Bevry base files](https://github.com/bevry/base) 12 | 13 | v1.1.0-beta, September 01, 2010 14 | 15 | - Changed defaultCssClass option to defaultClassname. 16 | - Fixed issue with firefox sometimes not applying the properties to the rendered code, causing text overflow. 17 | - We are now a bit more explicit with the css, this will help safari and opera render properly if stylesheets are still loading 18 | - Increased the load delay so that highlight will run when themes should have loaded. 19 | - Updated demo to use PRE elements instead. 20 | 21 | v1.0.1-beta, August 16, 2010 22 | 23 | - Now uses a local copy of prettify which contains a fix to only prettify something once. 24 | - Fixed some issues with IE and newlines 25 | - Set tab width to 4 instead of 8 26 | - IE does not have nice formatting for line numbers unfortunately so we have an alternate stylesheet 27 | 28 | v1.0.0-beta, August 16, 2010 29 | 30 | - Now uses Google's Prettify instead of Alex's Syntax Highlighter v3. There were just too many issues with Alex's and I couldn't fix them all. This fixes the IE error for all users. 31 | - Added themes. 32 | - Re-did nearly all the wording on the demo page to reflect the new syntax highlighter direction and features. 33 | 34 | v0.2.1-beta, August 15, 2010 35 | 36 | - Fixed an issue with IE and wraplines. 37 | 38 | v0.2.0-beta, July 28, 2010 39 | 40 | - Updated licensing information. Still using the same license, as it is the best there is, but just provided some more information on it to make life simpler. 41 | - Fixed autoloading. 42 | 43 | v0.1.0-dev, July 23, 2010 44 | 45 | - Initial Release 46 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | (The MIT License) 2 | 3 | Copyright (c) 2010 Benjamin Lupton 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the 'Software'), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 6 | 7 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 8 | 9 | THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # jQuery Syntax Highlighter 2 | 3 | jQuery Extension for [Google's Prettify Syntax Highlighter](https://code.google.com/p/google-code-prettify/) 4 | 5 | ## Usage 6 | 7 | Refer to the [demo](https://bevry-archive.github.io/jquery-syntaxhighlighter/demo/) for usage instructions 8 | 9 | ## History 10 | 11 | You can discover the history inside the [History.md](https://github.com/bevry-archive/jquery-syntaxhighlighter/blob/master/History.md#files) file 12 | 13 | ## License 14 | 15 | Licensed under the [MIT License](https://spdx.org/licenses/MIT.html) 16 |
Copyright © 2010+ [Benjamin Arthur Lupton](https://balupton.com) 17 | -------------------------------------------------------------------------------- /demo/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | jQuery Syntax Highlighter - Based on Google's Prettify 7 | 8 | 9 | 10 | 14 | 15 | 16 | 17 | 21 | 22 | 27 | 28 | 29 | 35 | 36 | 37 | 68 | 69 |
70 |

About

71 | 72 |

73 | jQuery Syntax Highlighter provides an elegant and 74 | simplistic interface for using 75 | Google's Prettify 78 | with jQuery. We also add a series of features that aren't possible just 79 | using Prettify, to ensure that you get the best experience possible: 80 |

81 | 82 | 154 | 155 |

So let's walk through it.

156 |
157 | 158 |
159 |

Installation via CDN (Content Delivery Network)

160 | 161 |

Step 1. Include jQuery (insert into your page's head tag)

162 |

163 | If your page already has jQuery included then you can skip this step. 164 |

165 |
166 | 			<!-- Include jQuery (Syntax Highlighter Requirement) -->
167 | 			<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script>
168 | 		
170 | 171 |

172 | Step 2. Include jQuery Syntax Highlighter (insert into your page's head 173 | tag) 174 |

175 |
176 | 			<!-- Include jQuery Syntax Highlighter -->
177 | 			<script type="text/javascript" src="https://bevry-archive.github.io/jquery-syntaxhighlighter/scripts/jquery.syntaxhighlighter.min.js"></script>
178 | 		
180 | 181 |

182 | Step 3. Initialise jQuery Syntax Highlighter (insert into your page's 183 | head tag) 184 |

185 |
186 | 			<!-- Initialise jQuery Syntax Highlighter -->
187 | 			<script type="text/javascript">$.SyntaxHighlighter.init();</script>
188 | 		
190 | 191 |

192 | And that's all there is to it in regards to installation. You don't 193 | actually have to download anything! now that is neat. Alternatively you 194 | could use a local copy of jQuery Syntax Highlighter instead of the CDN 195 | copy, but we'll leave that to you. So moving on, how do we let Syntax 196 | Highlighter know that we want to highlight our code block? 197 |

198 |
199 | 200 |
201 |

Usage

202 | 203 |

204 | So you have you standard code block of let's say javascript code, which 205 | looks like this: 206 |

207 |
208 | 			The following code block is what I would like to syntax highlight:
209 | 			<pre>
210 | 				// Define our Function
211 | 				function checkMeaningOfLife ( decimal, success ) {
212 | 					if ( parseInt(decimal,10) === 42 ) {
213 | 						window.console.log(success);
214 | 					}
215 | 				};
216 | 				// Define our Variables
217 | 				var	str = 'The meaning of life is true',
218 | 					decimal = 42.00;
219 | 				// Fire our Function
220 | 				checkMeaningOfLife(decimal,success);
221 | 			</pre>
222 | 		
224 | 225 |

226 | And we want to highlight it. We can do this two ways. One is letting the 227 | Syntax Highlighter auto-detect which language you are using, the other 228 | is a more SEO friendly approach where we explicitly specify which 229 | language we want to use. 230 |

231 | 232 |

Auto-detection of the language

233 |

234 | To highlight our code and auto-detect the language, we would simply add 235 | the classname highlight to our code block. This will look 236 | like so: 237 |

238 |
239 | 			The following code block is what I would like to syntax highlight:
240 | 			<pre class="highlight">
241 | 				// Define our Function
242 | 				function checkMeaningOfLife ( decimal, success ) {
243 | 					if ( parseInt(decimal,10) === 42 ) {
244 | 						window.console.log(success);
245 | 					}
246 | 				};
247 | 				// Define our Variables
248 | 				var	str = 'The meaning of life is true',
249 | 					decimal = 42.00;
250 | 				// Fire our Function
251 | 				checkMeaningOfLife(decimal,success);
252 | 			</pre>
253 | 		
255 | 256 |

Explicit specification of the language

257 |

258 | We can also highlight our code by specifying the language used 259 | explicitly. This is good in case we don't trust the auto-detection 260 | script or if we would like some 261 | SEO benefits 266 | by being more semantic (explicit with our markup). To do this we would 267 | simply add the classname language-javascript to our code 268 | block, where the text javascript is the name of the 269 | language we are using. This will look like so: 270 |

271 |
272 | 			The following code block is what I would like to syntax highlight:
273 | 			<pre class="language-javascript">
274 | 				// Define our Function
275 | 				function checkMeaningOfLife ( decimal, success ) {
276 | 					if ( parseInt(decimal,10) === 42 ) {
277 | 						window.console.log(success);
278 | 					}
279 | 				};
280 | 				// Define our Variables
281 | 				var	str = 'The meaning of life is true',
282 | 					decimal = 42.00;
283 | 				// Fire our Function
284 | 				checkMeaningOfLife(decimal,success);
285 | 			</pre>
286 | 		
288 | 289 |

290 | Sweet! That was too easy!. But there is one every important thing we 291 | have to take note of before we continue. And that is encoding our HTML 292 | within code blocks such that it is not actually interpreted by the 293 | browser as html! Eeee. So let's read about that. 294 |

295 | 296 |

Encoding HTML

297 |

298 | An extremely important thing with using code blocks is making sure you 299 | are encoding your HTML properly within your code blocks. This is because 300 | if you don't your web browser will think it has to run that code, 301 | despite it being in a code or pre element! 302 | Argh! That could really cause problems... So what we want to do is 303 | whenever we want to include code blocks (regardless of whether or not we 304 | are wanting to syntax highlight them) we always must remember to encode 305 | the HTML entities appropriately! So we do this by converting all the 306 | characters which are < to &lt; and all 307 | the > to &gt;. So for instance let's 308 | look at the following code sample: 309 |

310 |
311 | 			<pre class="language-html">
312 | 				<span>
313 | 					I'm a span element. I hope I've been escaped properly... as otherwise I will be :-( and the browser will be :-O
314 | 				</span>
315 | 			</pre>
316 | 		
318 |

Looks good, but this is how we actually code it in our HTML:

319 |
320 | 			<pre class="language-html">
321 | 				&lt;span&gt;
322 | 					I'm a span element. I hope I've been escaped properly... as otherwise I will be :-( and the browser will be :-O
323 | 				&lt;/span&gt;
324 | 			</pre>
325 | 		
327 |

328 | Hrmmm. Interesting... But once you've got that nailed, then there really 329 | are not worries and you're all good to go. If you are a keen person, you 330 | may want also want check out the source code for this demo to gain a 331 | better grasp of this issue. 332 |

333 | 334 |

335 | There is also one quite important thing. Internet Explorer 6-8 will 336 | struggle displaying newlines using code elements. This is a 337 | known issue and has been documented in various locations with no known 338 | fix 339 | 340 | 1 341 | 2 345 | 3 349 | 350 | . In the meantime please use pre elements instead of 351 | code elements. You can achieve the same SEO semantic 352 | benefits by adding the classname code to your 353 | pre element like so: 354 |

355 |
356 | 			<pre class="code language-html">
357 | 				&lt;span&gt;
358 | 					I'm a span element. I hope I've been escaped properly... as otherwise I will be :-( and the browser will be :-O
359 | 				&lt;/span&gt;
360 | 			</pre>
361 | 		
363 | 364 |

365 | Great! So that is all there is too it and all you need to know to 366 | install and use the Syntax Highlighter. You can quit reading and start 367 | working on your project right now, or you could learn a little bit more. 368 |

369 |
370 | 371 |
372 |

Highlighting Dynamic/Ajax Content

373 |

374 | Syntax Highlighter is also ajax friendly. This means we can load in 375 | dynamic code blocks into our page which we would like highlighted, and 376 | actually highlight them without problem. Let's see how we can do this 377 | with the following snippet of javascript code: 378 |

379 |
380 | 			var $content = $('<div>This is an upcoming code black:<code class="language-javascript">// I am some code</code></div>');
381 | 			$content.syntaxHighlight(); // will highlight the code block found inside
382 | 		
384 | 385 |

386 | If you are using 387 | jQuery Sparkle 393 | (a Do-Not-Repeat-Yourself jQuery Framework aimed at simplifying your 394 | development with powerful tools) then calling 395 | $content.sparkle() will also call 396 | $content.syntaxHighlight() automatically for us. 397 |

398 |
399 | 400 |
401 |

Configurable Options

402 |

403 | jQuery Syntax Highlighter comes with a whole bunch of configurable 404 | options. Here they are: 405 |

406 |
407 | 			/**
408 | 			 * Whether or not we should load in Google Prettify automatically if it was not detected.
409 | 			 */
410 | 			'load': true,
411 | 
412 | 			/**
413 | 			 * Whether or not we should highlight all appropriate code blocks automatically once the page has finished loading.
414 | 			 */
415 | 			'highlight': true,
416 | 
417 | 			/**
418 | 			 * Whether or not we should output debug information in case something is not working correctly.
419 | 			 */
420 | 			'debug': false,
421 | 
422 | 			/**
423 | 			 * Whether or not we should wrap the code blocks lines, or have them scrollable.
424 | 			 */
425 | 			'wrapLines': true,
426 | 
427 | 			/**
428 | 			 * Whether or not we should display line numbers next to the code blocks.
429 | 			 */
430 | 			'lineNumbers': true,
431 | 
432 | 			/**
433 | 			 * Whether or not we should strip empty start and finish lines from the code blocks.
434 | 			 */
435 | 			'stripEmptyStartFinishLines': true,
436 | 
437 | 			/**
438 | 			 * Whether or not we should remove whitespaces/indentations which are only there for HTML formatting of our code block.
439 | 			 */
440 | 			'stripInitialWhitespace': true,
441 | 
442 | 			/**
443 | 			 * Whether or not we should alternate the lines background colours on odd and even rows.
444 | 			 */
445 | 			'alternateLines': false,
446 | 
447 | 			/**
448 | 			 * The default class to look for in case we have not explicitly specified a language.
449 | 			 */
450 | 			'defaultCssClass': 'highlight',
451 | 
452 | 			/**
453 | 			 * The theme that should be used by our highlighted code blocks.
454 | 			 */
455 | 			'theme': 'balupton',
456 | 
457 | 			/**
458 | 			 * The themes to load in for use with our highlighted code blocks.
459 | 			 */
460 | 			'themes': ['balupton'],
461 | 
462 | 			/**
463 | 			 * The baseUrl to load Google's Prettify from.
464 | 			 * This is used to load in Google's Prettify if the load option is true and it was not found.
465 | 			 */
466 | 			'prettifyBaseUrl': 'https://bevry-archive.github.io/jquery-syntaxhighlighter/prettify',
467 | 
468 | 			/**
469 | 			 * The baseUrl to load our Syntax Highlighter from.
470 | 			 * This is used to load in the stylesheet and additional themes.
471 | 			 */
472 | 			'baseUrl': 'https://bevry-archive.github.io/balupton/jquery-syntaxhighlighter'
473 | 		
475 | 476 |

477 | To use one, all we need to do is add it to our init call 478 | way back in our head tag when we initialise the jQuery 479 | Syntax Highlighter. So let's see how we would do this to disable line 480 | wrapping: 481 |

482 |
483 | 			<!-- Initialise jQuery Syntax Highlighter -->
484 | 			<script type="text/javascript">
485 | 				$.SyntaxHighlighter.init({
486 | 					'wrapLines':false
487 | 				});
488 | 			</script>
489 | 		
491 |
492 | 493 |
494 |

Enjoy!!!

495 |

496 | This work is powered by coffee and distributed for free. 497 | Donations are how we afford 498 | our coffee. Coffee is how we stay awake after our day job hours to work 499 | on things like this free open-source project which you're looking at. So 500 | go ahead, and get that warm fuzzy feeling knowing you just helped some 501 | poor fellow working after hours for free to buy his coffee. You only 502 | need to spare a few dollars, or as much as you feel this piece of work 503 | is worth. Thanks so much. Alternatively; if you are not in a donating 504 | mood, then spreading the word about this project on twitter, your blog, 505 | or whatever is just as good. Thanks a bunch, we appreciate the help 506 | deeply. 507 |

508 |

509 | This work is licensed under a 510 | MIT License. 513 |

514 |
515 |
516 | 517 | 521 | 522 | 523 | -------------------------------------------------------------------------------- /demo/styles/generic.css: -------------------------------------------------------------------------------- 1 | /* CSS */ 2 | 3 | body { 4 | font-size: 1em; 5 | font-weight:normal; 6 | font-family: Arial, Helvetica, sans-serif; 7 | padding-left: 0px; 8 | padding-right: 0px; 9 | color: #000000; 10 | } 11 | strong { 12 | font-weight:bold; 13 | } 14 | em { 15 | font-style:italic; 16 | } 17 | body.loading { 18 | cursor:wait; 19 | } 20 | 21 | h1 { 22 | font-size: 2.5em; 23 | font-weight: bold; 24 | margin: 0.67em 0px 0.5em; 25 | } 26 | h2 { 27 | font-size: 2em; 28 | font-weight: bold; 29 | margin: 0.83em 0px 0.4em; 30 | } 31 | h3 { 32 | font-size: 1.5em; 33 | font-weight: bold; 34 | margin: 0.83em 0px 0.3em; 35 | } 36 | h4 { 37 | font-size: 1.2em; 38 | font-weight: bold; 39 | margin: 0.83em 0px 0.3em; 40 | } 41 | .section .title { 42 | font-size: 1.2em; 43 | font-weight: bold; 44 | } 45 | 46 | code.code, pre.code { 47 | border: 5px solid #DDD; 48 | padding: 7px 0 5px; 49 | font-size: 14px; 50 | overflow: auto; 51 | max-height: 500px; 52 | width: 100%; 53 | white-space: pre; 54 | display: block; 55 | } 56 | body code.prettyprint, body pre.prettyprint { 57 | border: 5px solid #DDD; 58 | padding: 7px 0 5px; 59 | } 60 | 61 | p, 62 | .section div { 63 | padding: 0px; 64 | margin:1em 0; 65 | } 66 | .section.install p, 67 | .section.install div { 68 | margin:0.2em 0 1em; 69 | } 70 | 71 | 72 | textarea { 73 | width: 100%; 74 | } 75 | 76 | label { 77 | font-weight:bold; 78 | } 79 | 80 | .cols.two { 81 | position:relative; 82 | overflow:auto; 83 | } 84 | .cols .one { 85 | width:49%; 86 | float:left; 87 | } 88 | .cols .two { 89 | width:49%; 90 | float:right; 91 | } 92 | 93 | .section { 94 | border-top: 1px solid #BBB; 95 | margin-top: 15px; 96 | margin-left: 5%; 97 | margin-right: 5%; 98 | padding: 5px; 99 | padding-bottom: 0px; 100 | background-color: white; 101 | } 102 | 103 | .section ul { 104 | list-style: none; 105 | margin-top: 5px; 106 | } 107 | 108 | .section ul li { 109 | display: inline; 110 | } 111 | 112 | a.help { 113 | text-decoration:none; 114 | border-bottom:1px dotted #00E; 115 | } 116 | a.help:visited { 117 | border-bottom:1px dotted #551A8B; 118 | } 119 | 120 | .section ul.features { 121 | display: block; 122 | list-style: disc; 123 | margin-left:2em; 124 | } 125 | .section ul.features li { 126 | list-style: disc; 127 | display: list-item; 128 | } 129 | 130 | .section ul.install, 131 | .section ul.install li { 132 | list-style:disc outside none; 133 | } 134 | .section ul.install { 135 | margin-left:2em; 136 | } 137 | .section ul.install li { 138 | display: list-item; 139 | } 140 | 141 | .section span.code { 142 | font-family: "Courier New", Courier, monospace; 143 | margin-left: 10px; 144 | padding-left: 10px; 145 | font-size: 0.8em; 146 | border-left: 1px solid #000; 147 | } 148 | 149 | .section .link { 150 | font-size: 0.8em; 151 | font-style: italic; 152 | padding-left: 10px; 153 | margin-left: 10px; 154 | } 155 | 156 | .section .important { 157 | text-decoration: underline; 158 | } 159 | 160 | .clear { 161 | clear: left; 162 | } 163 | 164 | .section.header, 165 | .section.footer { 166 | text-align: center; 167 | padding-top: 10px; 168 | } 169 | .section.header { 170 | border-top: none; 171 | } 172 | -------------------------------------------------------------------------------- /demo/styles/style.css: -------------------------------------------------------------------------------- 1 | /* Imports*/ 2 | @import url('https://cdnjs.cloudflare.com/ajax/libs/normalize/8.0.1/normalize.min.css'); 3 | @import url('./generic.css'); 4 | 5 | #demo { 6 | margin: 1em 0; 7 | padding: 0; 8 | border: 5px solid #ddd; 9 | font-size: 14px; 10 | } 11 | #menu { 12 | margin: 0; 13 | padding: 0; 14 | background: #ddd; 15 | border-bottom: 5px solid #ddd; 16 | } 17 | #menu li { 18 | margin: 0; 19 | padding: 0; 20 | background: white; 21 | padding: 0 1em; 22 | } 23 | #menu .active { 24 | background: yellow; 25 | font-weight: bold; 26 | } 27 | #content { 28 | padding: 1em; 29 | } 30 | #current { 31 | margin: 0; 32 | padding: 0; 33 | padding-left: 1em; 34 | border-top: 5px solid #ddd; 35 | } 36 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery-syntaxhighlighter", 3 | "version": "1.1.0-beta", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "buffer-from": { 8 | "version": "1.1.1", 9 | "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", 10 | "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", 11 | "dev": true 12 | }, 13 | "camel-case": { 14 | "version": "3.0.0", 15 | "resolved": "https://registry.npmjs.org/camel-case/-/camel-case-3.0.0.tgz", 16 | "integrity": "sha1-yjw2iKTpzzpM2nd9xNy8cTJJz3M=", 17 | "dev": true, 18 | "requires": { 19 | "no-case": "^2.2.0", 20 | "upper-case": "^1.1.1" 21 | } 22 | }, 23 | "clean-css": { 24 | "version": "4.2.1", 25 | "resolved": "https://registry.npmjs.org/clean-css/-/clean-css-4.2.1.tgz", 26 | "integrity": "sha512-4ZxI6dy4lrY6FHzfiy1aEOXgu4LIsW2MhwG0VBKdcoGoH/XLFgaHSdLTGr4O8Be6A8r3MOphEiI8Gc1n0ecf3g==", 27 | "dev": true, 28 | "requires": { 29 | "source-map": "~0.6.0" 30 | } 31 | }, 32 | "commander": { 33 | "version": "2.20.0", 34 | "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.0.tgz", 35 | "integrity": "sha512-7j2y+40w61zy6YC2iRNpUe/NwhNyoXrYpHMrSunaMG64nRnaf96zO/KMQR4OyN/UnE5KLyEBnKHd4aG3rskjpQ==", 36 | "dev": true 37 | }, 38 | "css-b64-images": { 39 | "version": "0.2.5", 40 | "resolved": "https://registry.npmjs.org/css-b64-images/-/css-b64-images-0.2.5.tgz", 41 | "integrity": "sha1-QgBdgyBLK0pdk7axpWRBM7WSegI=", 42 | "dev": true 43 | }, 44 | "debug": { 45 | "version": "4.1.1", 46 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", 47 | "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", 48 | "dev": true, 49 | "requires": { 50 | "ms": "^2.1.1" 51 | } 52 | }, 53 | "he": { 54 | "version": "1.2.0", 55 | "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", 56 | "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", 57 | "dev": true 58 | }, 59 | "html-minifier": { 60 | "version": "4.0.0", 61 | "resolved": "https://registry.npmjs.org/html-minifier/-/html-minifier-4.0.0.tgz", 62 | "integrity": "sha512-aoGxanpFPLg7MkIl/DDFYtb0iWz7jMFGqFhvEDZga6/4QTjneiD8I/NXL1x5aaoCp7FSIT6h/OhykDdPsbtMig==", 63 | "dev": true, 64 | "requires": { 65 | "camel-case": "^3.0.0", 66 | "clean-css": "^4.2.1", 67 | "commander": "^2.19.0", 68 | "he": "^1.2.0", 69 | "param-case": "^2.1.1", 70 | "relateurl": "^0.2.7", 71 | "uglify-js": "^3.5.1" 72 | } 73 | }, 74 | "lower-case": { 75 | "version": "1.1.4", 76 | "resolved": "https://registry.npmjs.org/lower-case/-/lower-case-1.1.4.tgz", 77 | "integrity": "sha1-miyr0bno4K6ZOkv31YdcOcQujqw=", 78 | "dev": true 79 | }, 80 | "minify": { 81 | "version": "4.1.3", 82 | "resolved": "https://registry.npmjs.org/minify/-/minify-4.1.3.tgz", 83 | "integrity": "sha512-ykuscavxivSmVpcCzsXmsVTukWYLUUtPhHj0w2ILvHDGqC+hsuTCihBn9+PJBd58JNvWTNg9132J9nrrI2anzA==", 84 | "dev": true, 85 | "requires": { 86 | "clean-css": "^4.1.6", 87 | "css-b64-images": "~0.2.5", 88 | "debug": "^4.1.0", 89 | "html-minifier": "^4.0.0", 90 | "terser": "^4.0.0", 91 | "try-catch": "^2.0.0", 92 | "try-to-catch": "^1.0.2" 93 | } 94 | }, 95 | "ms": { 96 | "version": "2.1.2", 97 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 98 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 99 | "dev": true 100 | }, 101 | "no-case": { 102 | "version": "2.3.2", 103 | "resolved": "https://registry.npmjs.org/no-case/-/no-case-2.3.2.tgz", 104 | "integrity": "sha512-rmTZ9kz+f3rCvK2TD1Ue/oZlns7OGoIWP4fc3llxxRXlOkHKoWPPWJOfFYpITabSow43QJbRIoHQXtt10VldyQ==", 105 | "dev": true, 106 | "requires": { 107 | "lower-case": "^1.1.1" 108 | } 109 | }, 110 | "param-case": { 111 | "version": "2.1.1", 112 | "resolved": "https://registry.npmjs.org/param-case/-/param-case-2.1.1.tgz", 113 | "integrity": "sha1-35T9jPZTHs915r75oIWPvHK+Ikc=", 114 | "dev": true, 115 | "requires": { 116 | "no-case": "^2.2.0" 117 | } 118 | }, 119 | "relateurl": { 120 | "version": "0.2.7", 121 | "resolved": "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz", 122 | "integrity": "sha1-VNvzd+UUQKypCkzSdGANP/LYiKk=", 123 | "dev": true 124 | }, 125 | "source-map": { 126 | "version": "0.6.1", 127 | "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", 128 | "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", 129 | "dev": true 130 | }, 131 | "source-map-support": { 132 | "version": "0.5.13", 133 | "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.13.tgz", 134 | "integrity": "sha512-SHSKFHadjVA5oR4PPqhtAVdcBWwRYVd6g6cAXnIbRiIwc2EhPrTuKUBdSLvlEKyIP3GCf89fltvcZiP9MMFA1w==", 135 | "dev": true, 136 | "requires": { 137 | "buffer-from": "^1.0.0", 138 | "source-map": "^0.6.0" 139 | } 140 | }, 141 | "terser": { 142 | "version": "4.1.4", 143 | "resolved": "https://registry.npmjs.org/terser/-/terser-4.1.4.tgz", 144 | "integrity": "sha512-+ZwXJvdSwbd60jG0Illav0F06GDJF0R4ydZ21Q3wGAFKoBGyJGo34F63vzJHgvYxc1ukOtIjvwEvl9MkjzM6Pg==", 145 | "dev": true, 146 | "requires": { 147 | "commander": "^2.20.0", 148 | "source-map": "~0.6.1", 149 | "source-map-support": "~0.5.12" 150 | } 151 | }, 152 | "try-catch": { 153 | "version": "2.0.0", 154 | "resolved": "https://registry.npmjs.org/try-catch/-/try-catch-2.0.0.tgz", 155 | "integrity": "sha512-RPXpVjsbtWgymwGq5F/OWDFsjEzdvzwHFaMjWWW6f/p6+uk/N7YSKJHQfIfGqITfj8qH4cBqCLMnhKZBaKk7Kg==", 156 | "dev": true 157 | }, 158 | "try-to-catch": { 159 | "version": "1.1.1", 160 | "resolved": "https://registry.npmjs.org/try-to-catch/-/try-to-catch-1.1.1.tgz", 161 | "integrity": "sha512-ikUlS+/BcImLhNYyIgZcEmq4byc31QpC+46/6Jm5ECWkVFhf8SM2Fp/0pMVXPX6vk45SMCwrP4Taxucne8I0VA==", 162 | "dev": true 163 | }, 164 | "uglify-js": { 165 | "version": "3.6.0", 166 | "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.6.0.tgz", 167 | "integrity": "sha512-W+jrUHJr3DXKhrsS7NUVxn3zqMOFn0hL/Ei6v0anCIMoKC93TjcflTagwIHLW7SfMFfiQuktQyFVCFHGUE0+yg==", 168 | "dev": true, 169 | "requires": { 170 | "commander": "~2.20.0", 171 | "source-map": "~0.6.1" 172 | } 173 | }, 174 | "upper-case": { 175 | "version": "1.1.3", 176 | "resolved": "https://registry.npmjs.org/upper-case/-/upper-case-1.1.3.tgz", 177 | "integrity": "sha1-9rRQHC7EzdJrp4vnIilh3ndiFZg=", 178 | "dev": true 179 | } 180 | } 181 | } 182 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery-syntaxhighlighter", 3 | "version": "1.1.0-beta", 4 | "description": "jQuery extension for Google's Prettify Syntax Highlighter", 5 | "main": "scripts/jquery.syntaxhighlighter.js", 6 | "scripts": { 7 | "build": "npm run build:refresh && npm run build:minify", 8 | "build:refresh": "npm run build:refresh:console && npm run build:refresh:append && npm run build:refresh:generic", 9 | "build:refresh:console": "wget -q https://bevry-archive.github.io/jquery-sparkle/scripts/resources/core.console.js -O scripts/resources/core.console.js", 10 | "build:refresh:append": "wget -q https://bevry-archive.github.io/jquery-sparkle/scripts/resources/jquery.appendscriptstyle.js -O scripts/resources/jquery.appendscriptstyle.js", 11 | "build:refresh:generic": "wget -q https://bevry-archive.github.io/jquery-history/demo/styles/generic.css -O ./demo/styles/generic.css", 12 | "build:minify": "npm run build:minify:js && npm run build:minify:css && npm run build:minify:balupton && npm run build:minify:google && npm run build:minify:ie && npm run build:minify:prettifyjs && npm run build:minify:prettifycss", 13 | "build:minify:js": "minify ./scripts/jquery.syntaxhighlighter.js > ./scripts/jquery.syntaxhighlighter.min.js", 14 | "build:minify:css": "minify ./styles/style.css > ./styles/style.min.css", 15 | "build:minify:balupton": "minify ./styles/theme-balupton.css > ./styles/theme-balupton.min.css", 16 | "build:minify:google": "minify ./styles/theme-google.css > ./styles/theme-google.min.css", 17 | "build:minify:ie": "minify ./styles/ie.css > ./styles/ie.min.css", 18 | "build:minify:prettifyjs": "minify ./prettify/prettify.js > ./prettify/prettify.min.js", 19 | "build:minify:prettifycss": "minify ./prettify/prettify.css > ./prettify/prettify.min.css", 20 | "test": "echo 'no tests'" 21 | }, 22 | "repository": { 23 | "type": "git", 24 | "url": "git+https://github.com/bevry-archive/jquery-syntaxhighlighter.git" 25 | }, 26 | "keywords": [ 27 | "jquery", 28 | "lightbox" 29 | ], 30 | "author": "2010+ Benjamin Lupton (https://balupton.com)", 31 | "license": "MIT", 32 | "bugs": { 33 | "url": "https://github.com/bevry-archive/jquery-syntaxhighlighter/issues" 34 | }, 35 | "homepage": "https://github.com/bevry-archive/jquery-syntaxhighlighter#readme", 36 | "devDependencies": { 37 | "minify": "^4.1.3" 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /prettify/closure.map: -------------------------------------------------------------------------------- 1 | { 2 | "version":3, 3 | "file":"./prettify/prettify.min.js", 4 | "lineCount":31, 5 | "mappings":"AA8DAA,MAAA,2BAAA,CAAuC,CAAA,CAGvCA,OAAA,aAAA,CAAyB,CAMzBA,OAAA,kBAAA,CAKIA,MAAA,GALJ,CAYIA,MAAA,eAZJ,CAkBIA,MAAA,YAlBJ,CAkB4B,IAAK,EAGjCA,OAAA,UAAA,CAAsB,QAAS,EAAG,CAChC,IAAIC,EAAYC,SAAZD,EAAyBC,SAAAC,UAAzBF,EACAC,SAAAC,UAAAC,MAAA,CAA0B,kBAA1B,CADJ,CAEAH,EAAYA,CAAA,CAAY,CAACA,CAAA,CAAU,CAAV,CAAb,CAA4B,CAAA,CACxCD,OAAA,UAAA,CAAsB,QAAS,EAAG,CAAE,MAAOC,EAAT,CAClC,OAAOA,EALyB,CASjC;SAAS,EAAG,CAuIXI,QAASA,EAAU,CAACC,CAAD,CAAM,CACvB,MAAOA,EAAAC,QAAA,CAAYC,CAAZ,CAAoB,OAApB,CAAAD,QAAA,CACME,CADN,CACa,MADb,CAAAF,QAAA,CAEMG,CAFN,CAEa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F,CAp3CJ,CAAZ,CAAA;", 6 | "sources":["./prettify/prettify.js"], 7 | "names":["window","ieVersion","navigator","userAgent","match","textToHtml","str","replace","pr_amp","pr_lt","pr_gt","normalizedHtml","node","out","opt_sortAttrs","nodeType","name","tagName","toLowerCase","push","attrs","attributes","n","length","sortedAttrs","i","sort","a","b","attr","specified","value","pr_quot","child","firstChild","nextSibling","test","nodeValue","combinePrefixPatterns","regexs","decodeEscape","charsetPart","charAt","charCodeAt","parseInt","substring","encodeEscape","charCode","toString","ch","String","fromCharCode","caseFoldCharset","charSet","charsetParts","RegExp","groups","ranges","inverse","p","start","end","Math","max","min","consolidatedRanges","lastRange","NaN","range","apply","join","allowAnywhereFoldCaseAndRenumberGroups","regex","parts","source","capturedGroups","groupIndex","decimalValue","capturedGroupIndex","undefined","ignoreCase","needToFoldCase","ch0","cc","rewritten","global","multiline","Error","makeTabExpander","tabWidth","charInLine","plainText","pos","nSpaces","SPACES","appendDecorations","basePos","sourceCode","langHandler","job","decorations","createSimpleLexer","shortcutStylePatterns","fallthroughStylePatterns","shortcuts","tokenizer","allPatterns","concat","allRegexs","regexKeys","patternParts","shortcutChars","c","k","hasOwnProperty","nPatterns","decorate","PR_PLAIN","tokens","styleCache","ti","nTokens","token","style","isEmbedded","PR_SOURCE","tokenStart","embeddedSource","embeddedSourceStart","indexOf","embeddedSourceEnd","lang","langHandlerForExtension","sourceDecorator","options","PR_STRING","PR_COMMENT","REGEXP_PRECEDER_PATTERN","keywords","PR_KEYWORD","PR_LITERAL","PR_TYPE","PR_PUNCTUATION","recombineTagsAndDecorations","emitTextUpTo","sourceIdx","outputIdx","openDecoration","currentDecoration","html","htmlChunk","tabExpander","sourceText","lastWasSpace","startOrSpaceRe","adjacentSpaceRe","trailingSpaceRe","newlineRe","lineBreaker","extractedTags","tagPos","decPos","isIE678","lineBreakHtml","sourceNode","numberLines","className","lineBreaks","lineNum","lb","prettyPrintedHtml","registerLangHandler","handler","fileExtensions","ext","langHandlerRegistry","console","extension","applyDecorator","sourceCodeHtml","opt_langExtension","langExtension","matches","pr_chunkPattern","sourceBuf","sourceBufLen","pr_commentPrefix","pr_cdataPrefix","pr_brPrefix","PR_NOCODE","pr_tagNameRe","depth","j","name2","slice","literalText","num","radix","codePoint","isNaN","pr_ltEnt","pr_gtEnt","pr_aposEnt","pr_quotEnt","pr_nbspEnt","pr_ampEnt","e","preceders","pattern","PR_innerHtmlWorks","decorateSource","ALL_KEYWORDS","PR_DECLARATION","PR_ATTRIB_VALUE","PR_TAG","PR_ATTRIB_NAME","CPP_KEYWORDS","CSHARP_KEYWORDS","JAVA_KEYWORDS","SH_KEYWORDS","PYTHON_KEYWORDS","PERL_KEYWORDS","RUBY_KEYWORDS","JSCRIPT_KEYWORDS","prettyPrintOne","prettyPrint","opt_whenDone","doWork","endTime","clock","now","Infinity","elements","cs","nested","parentNode","testNode","document","createElement","appendChild","createTextNode","innerHTML","content","whitespace","currentStyle","whiteSpace","getComputedStyle","prettyPrintingJob","newContent","pre","aname","setAttribute","replaceChild","setTimeout","codeSegments","getElementsByTagName","tn","Date","getTime"] 8 | } 9 | -------------------------------------------------------------------------------- /prettify/prettify.css: -------------------------------------------------------------------------------- 1 | /* Pretty printing styles. Used with prettify.js. */ 2 | 3 | .str { color: #080; } 4 | .kwd { color: #008; } 5 | .com { color: #800; } 6 | .typ { color: #606; } 7 | .lit { color: #066; } 8 | .pun { color: #660; } 9 | .pln { color: #000; } 10 | .tag { color: #008; } 11 | .atn { color: #606; } 12 | .atv { color: #080; } 13 | .dec { color: #606; } 14 | pre.prettyprint { padding: 2px; border: 1px solid #888 } 15 | 16 | /* Specify class=linenums on a pre to get line numbering */ 17 | ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */ 18 | li.L0, 19 | li.L1, 20 | li.L2, 21 | li.L3, 22 | li.L5, 23 | li.L6, 24 | li.L7, 25 | li.L8 { list-style-type: none } 26 | /* Alternate shading for lines */ 27 | li.L1, 28 | li.L3, 29 | li.L5, 30 | li.L7, 31 | li.L9 { background: #eee } 32 | 33 | @media print { 34 | .str { color: #060; } 35 | .kwd { color: #006; font-weight: bold; } 36 | .com { color: #600; font-style: italic; } 37 | .typ { color: #404; font-weight: bold; } 38 | .lit { color: #044; } 39 | .pun { color: #440; } 40 | .pln { color: #000; } 41 | .tag { color: #006; font-weight: bold; } 42 | .atn { color: #404; } 43 | .atv { color: #060; } 44 | } 45 | -------------------------------------------------------------------------------- /prettify/prettify.js: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2006 Google Inc. 2 | // 3 | // Licensed under the Apache License, Version 2.0 (the "License"); 4 | // you may not use this file except in compliance with the License. 5 | // You may obtain a copy of the License at 6 | // 7 | // http://www.apache.org/licenses/LICENSE-2.0 8 | // 9 | // Unless required by applicable law or agreed to in writing, software 10 | // distributed under the License is distributed on an "AS IS" BASIS, 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | // See the License for the specific language governing permissions and 13 | // limitations under the License. 14 | 15 | 16 | /** 17 | * @fileoverview 18 | * some functions for browser-side pretty printing of code contained in html. 19 | *

20 | * 21 | * For a fairly comprehensive set of languages see the 22 | * README 23 | * file that came with this source. At a minimum, the lexer should work on a 24 | * number of languages including C and friends, Java, Python, Bash, SQL, HTML, 25 | * XML, CSS, Javascript, and Makefiles. It works passably on Ruby, PHP and Awk 26 | * and a subset of Perl, but, because of commenting conventions, doesn't work on 27 | * Smalltalk, Lisp-like, or CAML-like languages without an explicit lang class. 28 | *

29 | * Usage:

    30 | *
  1. include this source file in an html page via 31 | * {@code } 32 | *
  2. define style rules. See the example page for examples. 33 | *
  3. mark the {@code
    } and {@code } tags in your source with
      34 |  *    {@code class=prettyprint.}
      35 |  *    You can also use the (html deprecated) {@code } tag, but the pretty
      36 |  *    printer needs to do more substantial DOM manipulations to support that, so
      37 |  *    some css styles may not be preserved.
      38 |  * </ol>
      39 |  * That's it.  I wanted to keep the API as simple as possible, so there's no
      40 |  * need to specify which language the code is in, but if you wish, you can add
      41 |  * another class to the {@code <pre>} or {@code <code>} element to specify the
      42 |  * language, as in {@code <pre class="prettyprint lang-java">}.  Any class that
      43 |  * starts with "lang-" followed by a file extension, specifies the file type.
      44 |  * See the "lang-*.js" files in this directory for code that implements
      45 |  * per-language file handlers.
      46 |  * <p>
      47 |  * Change log:<br>
      48 |  * cbeust, 2006/08/22
      49 |  * <blockquote>
      50 |  *   Java annotations (start with "@") are now captured as literals ("lit")
      51 |  * </blockquote>
      52 |  * @requires console
      53 |  */
      54 | 
      55 | // JSLint declarations
      56 | /*global console, document, navigator, setTimeout, window */
      57 | 
      58 | /**
      59 |  * Split {@code prettyPrint} into multiple timeouts so as not to interfere with
      60 |  * UI events.
      61 |  * If set to {@code false}, {@code prettyPrint()} is synchronous.
      62 |  */
      63 | window['PR_SHOULD_USE_CONTINUATION'] = true;
      64 | 
      65 | /** the number of characters between tab columns */
      66 | window['PR_TAB_WIDTH'] = 4;
      67 | 
      68 | /** Walks the DOM returning a properly escaped version of innerHTML.
      69 |   * @param {Node} node
      70 |   * @param {Array.<string>} out output buffer that receives chunks of HTML.
      71 |   */
      72 | window['PR_normalizedHtml']
      73 | 
      74 | /** Contains functions for creating and registering new language handlers.
      75 |   * @type {Object}
      76 |   */
      77 |   = window['PR']
      78 | 
      79 | /** Pretty print a chunk of code.
      80 |   *
      81 |   * @param {string} sourceCodeHtml code as html
      82 |   * @return {string} code as html, but prettier
      83 |   */
      84 |   = window['prettyPrintOne']
      85 | /** Find all the {@code <pre>} and {@code <code>} tags in the DOM with
      86 |   * {@code class=prettyprint} and prettify them.
      87 |   * @param {Function?} opt_whenDone if specified, called when the last entry
      88 |   *     has been finished.
      89 |   */
      90 |   = window['prettyPrint'] = void 0;
      91 | 
      92 | /** browser detection. @extern @returns false if not IE, otherwise the major version. */
      93 | window['_pr_isIE6'] = function () {
      94 |   var ieVersion = navigator && navigator.userAgent &&
      95 |       navigator.userAgent.match(/\bMSIE ([678])\./);
      96 |   ieVersion = ieVersion ? +ieVersion[1] : false;
      97 |   window['_pr_isIE6'] = function () { return ieVersion; };
      98 |   return ieVersion;
      99 | };
     100 | 
     101 | 
     102 | (function () {
     103 |   // Keyword lists for various languages.
     104 |   var FLOW_CONTROL_KEYWORDS =
     105 |       "break continue do else for if return while ";
     106 |   var C_KEYWORDS = FLOW_CONTROL_KEYWORDS + "auto case char const default " +
     107 |       "double enum extern float goto int long register short signed sizeof " +
     108 |       "static struct switch typedef union unsigned void volatile ";
     109 |   var COMMON_KEYWORDS = C_KEYWORDS + "catch class delete false import " +
     110 |       "new operator private protected public this throw true try typeof ";
     111 |   var CPP_KEYWORDS = COMMON_KEYWORDS + "alignof align_union asm axiom bool " +
     112 |       "concept concept_map const_cast constexpr decltype " +
     113 |       "dynamic_cast explicit export friend inline late_check " +
     114 |       "mutable namespace nullptr reinterpret_cast static_assert static_cast " +
     115 |       "template typeid typename using virtual wchar_t where ";
     116 |   var JAVA_KEYWORDS = COMMON_KEYWORDS +
     117 |       "abstract boolean byte extends final finally implements import " +
     118 |       "instanceof null native package strictfp super synchronized throws " +
     119 |       "transient ";
     120 |   var CSHARP_KEYWORDS = JAVA_KEYWORDS +
     121 |       "as base by checked decimal delegate descending event " +
     122 |       "fixed foreach from group implicit in interface internal into is lock " +
     123 |       "object out override orderby params partial readonly ref sbyte sealed " +
     124 |       "stackalloc string select uint ulong unchecked unsafe ushort var ";
     125 |   var JSCRIPT_KEYWORDS = COMMON_KEYWORDS +
     126 |       "debugger eval export function get null set undefined var with " +
     127 |       "Infinity NaN ";
     128 |   var PERL_KEYWORDS = "caller delete die do dump elsif eval exit foreach for " +
     129 |       "goto if import last local my next no our print package redo require " +
     130 |       "sub undef unless until use wantarray while BEGIN END ";
     131 |   var PYTHON_KEYWORDS = FLOW_CONTROL_KEYWORDS + "and as assert class def del " +
     132 |       "elif except exec finally from global import in is lambda " +
     133 |       "nonlocal not or pass print raise try with yield " +
     134 |       "False True None ";
     135 |   var RUBY_KEYWORDS = FLOW_CONTROL_KEYWORDS + "alias and begin case class def" +
     136 |       " defined elsif end ensure false in module next nil not or redo rescue " +
     137 |       "retry self super then true undef unless until when yield BEGIN END ";
     138 |   var SH_KEYWORDS = FLOW_CONTROL_KEYWORDS + "case done elif esac eval fi " +
     139 |       "function in local set then until ";
     140 |   var ALL_KEYWORDS = (
     141 |       CPP_KEYWORDS + CSHARP_KEYWORDS + JSCRIPT_KEYWORDS + PERL_KEYWORDS +
     142 |       PYTHON_KEYWORDS + RUBY_KEYWORDS + SH_KEYWORDS);
     143 | 
     144 |   // token style names.  correspond to css classes
     145 |   /** token style for a string literal */
     146 |   var PR_STRING = 'str';
     147 |   /** token style for a keyword */
     148 |   var PR_KEYWORD = 'kwd';
     149 |   /** token style for a comment */
     150 |   var PR_COMMENT = 'com';
     151 |   /** token style for a type */
     152 |   var PR_TYPE = 'typ';
     153 |   /** token style for a literal value.  e.g. 1, null, true. */
     154 |   var PR_LITERAL = 'lit';
     155 |   /** token style for a punctuation string. */
     156 |   var PR_PUNCTUATION = 'pun';
     157 |   /** token style for a punctuation string. */
     158 |   var PR_PLAIN = 'pln';
     159 | 
     160 |   /** token style for an sgml tag. */
     161 |   var PR_TAG = 'tag';
     162 |   /** token style for a markup declaration such as a DOCTYPE. */
     163 |   var PR_DECLARATION = 'dec';
     164 |   /** token style for embedded source. */
     165 |   var PR_SOURCE = 'src';
     166 |   /** token style for an sgml attribute name. */
     167 |   var PR_ATTRIB_NAME = 'atn';
     168 |   /** token style for an sgml attribute value. */
     169 |   var PR_ATTRIB_VALUE = 'atv';
     170 | 
     171 |   /**
     172 |    * A class that indicates a section of markup that is not code, e.g. to allow
     173 |    * embedding of line numbers within code listings.
     174 |    */
     175 |   var PR_NOCODE = 'nocode';
     176 | 
     177 |   /** A set of tokens that can precede a regular expression literal in
     178 |     * javascript.
     179 |     * http://www.mozilla.org/js/language/js20/rationale/syntax.html has the full
     180 |     * list, but I've removed ones that might be problematic when seen in
     181 |     * languages that don't support regular expression literals.
     182 |     *
     183 |     * <p>Specifically, I've removed any keywords that can't precede a regexp
     184 |     * literal in a syntactically legal javascript program, and I've removed the
     185 |     * "in" keyword since it's not a keyword in many languages, and might be used
     186 |     * as a count of inches.
     187 |     *
     188 |     * <p>The link a above does not accurately describe EcmaScript rules since
     189 |     * it fails to distinguish between (a=++/b/i) and (a++/b/i) but it works
     190 |     * very well in practice.
     191 |     *
     192 |     * @private
     193 |     */
     194 |   var REGEXP_PRECEDER_PATTERN = function () {
     195 |       var preceders = [
     196 |           "!", "!=", "!==", "#", "%", "%=", "&", "&&", "&&=",
     197 |           "&=", "(", "*", "*=", /* "+", */ "+=", ",", /* "-", */ "-=",
     198 |           "->", /*".", "..", "...", handled below */ "/", "/=", ":", "::", ";",
     199 |           "<", "<<", "<<=", "<=", "=", "==", "===", ">",
     200 |           ">=", ">>", ">>=", ">>>", ">>>=", "?", "@", "[",
     201 |           "^", "^=", "^^", "^^=", "{", "|", "|=", "||",
     202 |           "||=", "~" /* handles =~ and !~ */,
     203 |           "break", "case", "continue", "delete",
     204 |           "do", "else", "finally", "instanceof",
     205 |           "return", "throw", "try", "typeof"
     206 |           ];
     207 |       var pattern = '(?:^^|[+-]';
     208 |       for (var i = 0; i < preceders.length; ++i) {
     209 |         pattern += '|' + preceders[i].replace(/([^=<>:&a-z])/g, '\\$1');
     210 |       }
     211 |       pattern += ')\\s*';  // matches at end, and matches empty string
     212 |       return pattern;
     213 |       // CAVEAT: this does not properly handle the case where a regular
     214 |       // expression immediately follows another since a regular expression may
     215 |       // have flags for case-sensitivity and the like.  Having regexp tokens
     216 |       // adjacent is not valid in any language I'm aware of, so I'm punting.
     217 |       // TODO: maybe style special characters inside a regexp as punctuation.
     218 |     }();
     219 | 
     220 |   // Define regexps here so that the interpreter doesn't have to create an
     221 |   // object each time the function containing them is called.
     222 |   // The language spec requires a new object created even if you don't access
     223 |   // the $1 members.
     224 |   var pr_amp = /&/g;
     225 |   var pr_lt = /</g;
     226 |   var pr_gt = />/g;
     227 |   var pr_quot = /\"/g;
     228 |   /** like textToHtml but escapes double quotes to be attribute safe. */
     229 |   function attribToHtml(str) {
     230 |     return str.replace(pr_amp, '&amp;')
     231 |         .replace(pr_lt, '&lt;')
     232 |         .replace(pr_gt, '&gt;')
     233 |         .replace(pr_quot, '&quot;');
     234 |   }
     235 | 
     236 |   /** escapest html special characters to html. */
     237 |   function textToHtml(str) {
     238 |     return str.replace(pr_amp, '&amp;')
     239 |         .replace(pr_lt, '&lt;')
     240 |         .replace(pr_gt, '&gt;');
     241 |   }
     242 | 
     243 | 
     244 |   var pr_ltEnt = /&lt;/g;
     245 |   var pr_gtEnt = /&gt;/g;
     246 |   var pr_aposEnt = /&apos;/g;
     247 |   var pr_quotEnt = /&quot;/g;
     248 |   var pr_ampEnt = /&amp;/g;
     249 |   var pr_nbspEnt = /&nbsp;/g;
     250 |   /** unescapes html to plain text. */
     251 |   function htmlToText(html) {
     252 |     var pos = html.indexOf('&');
     253 |     if (pos < 0) { return html; }
     254 |     // Handle numeric entities specially.  We can't use functional substitution
     255 |     // since that doesn't work in older versions of Safari.
     256 |     // These should be rare since most browsers convert them to normal chars.
     257 |     for (--pos; (pos = html.indexOf('&#', pos + 1)) >= 0;) {
     258 |       var end = html.indexOf(';', pos);
     259 |       if (end >= 0) {
     260 |         var num = html.substring(pos + 3, end);
     261 |         var radix = 10;
     262 |         if (num && num.charAt(0) === 'x') {
     263 |           num = num.substring(1);
     264 |           radix = 16;
     265 |         }
     266 |         var codePoint = parseInt(num, radix);
     267 |         if (!isNaN(codePoint)) {
     268 |           html = (html.substring(0, pos) + String.fromCharCode(codePoint) +
     269 |                   html.substring(end + 1));
     270 |         }
     271 |       }
     272 |     }
     273 | 
     274 |     return html.replace(pr_ltEnt, '<')
     275 |         .replace(pr_gtEnt, '>')
     276 |         .replace(pr_aposEnt, "'")
     277 |         .replace(pr_quotEnt, '"')
     278 |         .replace(pr_nbspEnt, ' ')
     279 |         .replace(pr_ampEnt, '&');
     280 |   }
     281 | 
     282 |   /** is the given node's innerHTML normally unescaped? */
     283 |   function isRawContent(node) {
     284 |     return 'XMP' === node.tagName;
     285 |   }
     286 | 
     287 |   var newlineRe = /[\r\n]/g;
     288 |   /**
     289 |    * Are newlines and adjacent spaces significant in the given node's innerHTML?
     290 |    */
     291 |   function isPreformatted(node, content) {
     292 |     // PRE means preformatted, and is a very common case, so don't create
     293 |     // unnecessary computed style objects.
     294 |     if ('PRE' === node.tagName) { return true; }
     295 |     if (!newlineRe.test(content)) { return true; }  // Don't care
     296 |     var whitespace = '';
     297 |     // For disconnected nodes, IE has no currentStyle.
     298 |     if (node.currentStyle) {
     299 |       whitespace = node.currentStyle.whiteSpace;
     300 |     } else if (window.getComputedStyle) {
     301 |       // Firefox makes a best guess if node is disconnected whereas Safari
     302 |       // returns the empty string.
     303 |       whitespace = window.getComputedStyle(node, null).whiteSpace;
     304 |     }
     305 |     return !whitespace || whitespace === 'pre';
     306 |   }
     307 | 
     308 |   function normalizedHtml(node, out, opt_sortAttrs) {
     309 |     switch (node.nodeType) {
     310 |       case 1:  // an element
     311 |         var name = node.tagName.toLowerCase();
     312 | 
     313 |         out.push('<', name);
     314 |         var attrs = node.attributes;
     315 |         var n = attrs.length;
     316 |         if (n) {
     317 |           if (opt_sortAttrs) {
     318 |             var sortedAttrs = [];
     319 |             for (var i = n; --i >= 0;) { sortedAttrs[i] = attrs[i]; }
     320 |             sortedAttrs.sort(function (a, b) {
     321 |                 return (a.name < b.name) ? -1 : a.name === b.name ? 0 : 1;
     322 |               });
     323 |             attrs = sortedAttrs;
     324 |           }
     325 |           for (var i = 0; i < n; ++i) {
     326 |             var attr = attrs[i];
     327 |             if (!attr.specified) { continue; }
     328 |             out.push(' ', attr.name.toLowerCase(),
     329 |                      '="', attribToHtml(attr.value), '"');
     330 |           }
     331 |         }
     332 |         out.push('>');
     333 |         for (var child = node.firstChild; child; child = child.nextSibling) {
     334 |           normalizedHtml(child, out, opt_sortAttrs);
     335 |         }
     336 |         if (node.firstChild || !/^(?:br|link|img)$/.test(name)) {
     337 |           out.push('<\/', name, '>');
     338 |         }
     339 |         break;
     340 |       case 3: case 4: // text
     341 |         out.push(textToHtml(node.nodeValue));
     342 |         break;
     343 |     }
     344 |   }
     345 | 
     346 |   /**
     347 |    * Given a group of {@link RegExp}s, returns a {@code RegExp} that globally
     348 |    * matches the union o the sets o strings matched d by the input RegExp.
     349 |    * Since it matches globally, if the input strings have a start-of-input
     350 |    * anchor (/^.../), it is ignored for the purposes of unioning.
     351 |    * @param {Array.<RegExp>} regexs non multiline, non-global regexs.
     352 |    * @return {RegExp} a global regex.
     353 |    */
     354 |   function combinePrefixPatterns(regexs) {
     355 |     var capturedGroupIndex = 0;
     356 | 
     357 |     var needToFoldCase = false;
     358 |     var ignoreCase = false;
     359 |     for (var i = 0, n = regexs.length; i < n; ++i) {
     360 |       var regex = regexs[i];
     361 |       if (regex.ignoreCase) {
     362 |         ignoreCase = true;
     363 |       } else if (/[a-z]/i.test(regex.source.replace(
     364 |                      /\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ''))) {
     365 |         needToFoldCase = true;
     366 |         ignoreCase = false;
     367 |         break;
     368 |       }
     369 |     }
     370 | 
     371 |     function decodeEscape(charsetPart) {
     372 |       if (charsetPart.charAt(0) !== '\\') { return charsetPart.charCodeAt(0); }
     373 |       switch (charsetPart.charAt(1)) {
     374 |         case 'b': return 8;
     375 |         case 't': return 9;
     376 |         case 'n': return 0xa;
     377 |         case 'v': return 0xb;
     378 |         case 'f': return 0xc;
     379 |         case 'r': return 0xd;
     380 |         case 'u': case 'x':
     381 |           return parseInt(charsetPart.substring(2), 16)
     382 |               || charsetPart.charCodeAt(1);
     383 |         case '0': case '1': case '2': case '3': case '4':
     384 |         case '5': case '6': case '7':
     385 |           return parseInt(charsetPart.substring(1), 8);
     386 |         default: return charsetPart.charCodeAt(1);
     387 |       }
     388 |     }
     389 | 
     390 |     function encodeEscape(charCode) {
     391 |       if (charCode < 0x20) {
     392 |         return (charCode < 0x10 ? '\\x0' : '\\x') + charCode.toString(16);
     393 |       }
     394 |       var ch = String.fromCharCode(charCode);
     395 |       if (ch === '\\' || ch === '-' || ch === '[' || ch === ']') {
     396 |         ch = '\\' + ch;
     397 |       }
     398 |       return ch;
     399 |     }
     400 | 
     401 |     function caseFoldCharset(charSet) {
     402 |       var charsetParts = charSet.substring(1, charSet.length - 1).match(
     403 |           new RegExp(
     404 |               '\\\\u[0-9A-Fa-f]{4}'
     405 |               + '|\\\\x[0-9A-Fa-f]{2}'
     406 |               + '|\\\\[0-3][0-7]{0,2}'
     407 |               + '|\\\\[0-7]{1,2}'
     408 |               + '|\\\\[\\s\\S]'
     409 |               + '|-'
     410 |               + '|[^-\\\\]',
     411 |               'g'));
     412 |       var groups = [];
     413 |       var ranges = [];
     414 |       var inverse = charsetParts[0] === '^';
     415 |       for (var i = inverse ? 1 : 0, n = charsetParts.length; i < n; ++i) {
     416 |         var p = charsetParts[i];
     417 |         switch (p) {
     418 |           case '\\B': case '\\b':
     419 |           case '\\D': case '\\d':
     420 |           case '\\S': case '\\s':
     421 |           case '\\W': case '\\w':
     422 |             groups.push(p);
     423 |             continue;
     424 |         }
     425 |         var start = decodeEscape(p);
     426 |         var end;
     427 |         if (i + 2 < n && '-' === charsetParts[i + 1]) {
     428 |           end = decodeEscape(charsetParts[i + 2]);
     429 |           i += 2;
     430 |         } else {
     431 |           end = start;
     432 |         }
     433 |         ranges.push([start, end]);
     434 |         // If the range might intersect letters, then expand it.
     435 |         if (!(end < 65 || start > 122)) {
     436 |           if (!(end < 65 || start > 90)) {
     437 |             ranges.push([Math.max(65, start) | 32, Math.min(end, 90) | 32]);
     438 |           }
     439 |           if (!(end < 97 || start > 122)) {
     440 |             ranges.push([Math.max(97, start) & ~32, Math.min(end, 122) & ~32]);
     441 |           }
     442 |         }
     443 |       }
     444 | 
     445 |       // [[1, 10], [3, 4], [8, 12], [14, 14], [16, 16], [17, 17]]
     446 |       // -> [[1, 12], [14, 14], [16, 17]]
     447 |       ranges.sort(function (a, b) { return (a[0] - b[0]) || (b[1]  - a[1]); });
     448 |       var consolidatedRanges = [];
     449 |       var lastRange = [NaN, NaN];
     450 |       for (var i = 0; i < ranges.length; ++i) {
     451 |         var range = ranges[i];
     452 |         if (range[0] <= lastRange[1] + 1) {
     453 |           lastRange[1] = Math.max(lastRange[1], range[1]);
     454 |         } else {
     455 |           consolidatedRanges.push(lastRange = range);
     456 |         }
     457 |       }
     458 | 
     459 |       var out = ['['];
     460 |       if (inverse) { out.push('^'); }
     461 |       out.push.apply(out, groups);
     462 |       for (var i = 0; i < consolidatedRanges.length; ++i) {
     463 |         var range = consolidatedRanges[i];
     464 |         out.push(encodeEscape(range[0]));
     465 |         if (range[1] > range[0]) {
     466 |           if (range[1] + 1 > range[0]) { out.push('-'); }
     467 |           out.push(encodeEscape(range[1]));
     468 |         }
     469 |       }
     470 |       out.push(']');
     471 |       return out.join('');
     472 |     }
     473 | 
     474 |     function allowAnywhereFoldCaseAndRenumberGroups(regex) {
     475 |       // Split into character sets, escape sequences, punctuation strings
     476 |       // like ('(', '(?:', ')', '^'), and runs of characters that do not
     477 |       // include any of the above.
     478 |       var parts = regex.source.match(
     479 |           new RegExp(
     480 |               '(?:'
     481 |               + '\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]'  // a character set
     482 |               + '|\\\\u[A-Fa-f0-9]{4}'  // a unicode escape
     483 |               + '|\\\\x[A-Fa-f0-9]{2}'  // a hex escape
     484 |               + '|\\\\[0-9]+'  // a back-reference or octal escape
     485 |               + '|\\\\[^ux0-9]'  // other escape sequence
     486 |               + '|\\(\\?[:!=]'  // start of a non-capturing group
     487 |               + '|[\\(\\)\\^]'  // start/emd of a group, or line start
     488 |               + '|[^\\x5B\\x5C\\(\\)\\^]+'  // run of other characters
     489 |               + ')',
     490 |               'g'));
     491 |       var n = parts.length;
     492 | 
     493 |       // Maps captured group numbers to the number they will occupy in
     494 |       // the output or to -1 if that has not been determined, or to
     495 |       // undefined if they need not be capturing in the output.
     496 |       var capturedGroups = [];
     497 | 
     498 |       // Walk over and identify back references to build the capturedGroups
     499 |       // mapping.
     500 |       for (var i = 0, groupIndex = 0; i < n; ++i) {
     501 |         var p = parts[i];
     502 |         if (p === '(') {
     503 |           // groups are 1-indexed, so max group index is count of '('
     504 |           ++groupIndex;
     505 |         } else if ('\\' === p.charAt(0)) {
     506 |           var decimalValue = +p.substring(1);
     507 |           if (decimalValue && decimalValue <= groupIndex) {
     508 |             capturedGroups[decimalValue] = -1;
     509 |           }
     510 |         }
     511 |       }
     512 | 
     513 |       // Renumber groups and reduce capturing groups to non-capturing groups
     514 |       // where possible.
     515 |       for (var i = 1; i < capturedGroups.length; ++i) {
     516 |         if (-1 === capturedGroups[i]) {
     517 |           capturedGroups[i] = ++capturedGroupIndex;
     518 |         }
     519 |       }
     520 |       for (var i = 0, groupIndex = 0; i < n; ++i) {
     521 |         var p = parts[i];
     522 |         if (p === '(') {
     523 |           ++groupIndex;
     524 |           if (capturedGroups[groupIndex] === undefined) {
     525 |             parts[i] = '(?:';
     526 |           }
     527 |         } else if ('\\' === p.charAt(0)) {
     528 |           var decimalValue = +p.substring(1);
     529 |           if (decimalValue && decimalValue <= groupIndex) {
     530 |             parts[i] = '\\' + capturedGroups[groupIndex];
     531 |           }
     532 |         }
     533 |       }
     534 | 
     535 |       // Remove any prefix anchors so that the output will match anywhere.
     536 |       // ^^ really does mean an anchored match though.
     537 |       for (var i = 0, groupIndex = 0; i < n; ++i) {
     538 |         if ('^' === parts[i] && '^' !== parts[i + 1]) { parts[i] = ''; }
     539 |       }
     540 | 
     541 |       // Expand letters to groupts to handle mixing of case-sensitive and
     542 |       // case-insensitive patterns if necessary.
     543 |       if (regex.ignoreCase && needToFoldCase) {
     544 |         for (var i = 0; i < n; ++i) {
     545 |           var p = parts[i];
     546 |           var ch0 = p.charAt(0);
     547 |           if (p.length >= 2 && ch0 === '[') {
     548 |             parts[i] = caseFoldCharset(p);
     549 |           } else if (ch0 !== '\\') {
     550 |             // TODO: handle letters in numeric escapes.
     551 |             parts[i] = p.replace(
     552 |                 /[a-zA-Z]/g,
     553 |                 function (ch) {
     554 |                   var cc = ch.charCodeAt(0);
     555 |                   return '[' + String.fromCharCode(cc & ~32, cc | 32) + ']';
     556 |                 });
     557 |           }
     558 |         }
     559 |       }
     560 | 
     561 |       return parts.join('');
     562 |     }
     563 | 
     564 |     var rewritten = [];
     565 |     for (var i = 0, n = regexs.length; i < n; ++i) {
     566 |       var regex = regexs[i];
     567 |       if (regex.global || regex.multiline) { throw new Error('' + regex); }
     568 |       rewritten.push(
     569 |           '(?:' + allowAnywhereFoldCaseAndRenumberGroups(regex) + ')');
     570 |     }
     571 | 
     572 |     return new RegExp(rewritten.join('|'), ignoreCase ? 'gi' : 'g');
     573 |   }
     574 | 
     575 |   var PR_innerHtmlWorks = null;
     576 |   function getInnerHtml(node) {
     577 |     // inner html is hopelessly broken in Safari 2.0.4 when the content is
     578 |     // an html description of well formed XML and the containing tag is a PRE
     579 |     // tag, so we detect that case and emulate innerHTML.
     580 |     if (null === PR_innerHtmlWorks) {
     581 |       var testNode = document.createElement('PRE');
     582 |       testNode.appendChild(
     583 |           document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />'));
     584 |       PR_innerHtmlWorks = !/</.test(testNode.innerHTML);
     585 |     }
     586 | 
     587 |     if (PR_innerHtmlWorks) {
     588 |       var content = node.innerHTML;
     589 |       // XMP tags contain unescaped entities so require special handling.
     590 |       if (isRawContent(node)) {
     591 |         content = textToHtml(content);
     592 |       } else if (!isPreformatted(node, content)) {
     593 |         content = content.replace(/(<br\s*\/?>)[\r\n]+/g, '$1')
     594 |             .replace(/(?:[\r\n]+[ \t]*)+/g, ' ');
     595 |       }
     596 |       return content;
     597 |     }
     598 | 
     599 |     var out = [];
     600 |     for (var child = node.firstChild; child; child = child.nextSibling) {
     601 |       normalizedHtml(child, out);
     602 |     }
     603 |     return out.join('');
     604 |   }
     605 | 
     606 |   /** returns a function that expand tabs to spaces.  This function can be fed
     607 |     * successive chunks of text, and will maintain its own internal state to
     608 |     * keep track of how tabs are expanded.
     609 |     * @return {function (string) : string} a function that takes
     610 |     *   plain text and return the text with tabs expanded.
     611 |     * @private
     612 |     */
     613 |   function makeTabExpander(tabWidth) {
     614 |     var SPACES = '                ';
     615 |     var charInLine = 0;
     616 | 
     617 |     return function (plainText) {
     618 |       // walk over each character looking for tabs and newlines.
     619 |       // On tabs, expand them.  On newlines, reset charInLine.
     620 |       // Otherwise increment charInLine
     621 |       var out = null;
     622 |       var pos = 0;
     623 |       for (var i = 0, n = plainText.length; i < n; ++i) {
     624 |         var ch = plainText.charAt(i);
     625 | 
     626 |         switch (ch) {
     627 |           case '\t':
     628 |             if (!out) { out = []; }
     629 |             out.push(plainText.substring(pos, i));
     630 |             // calculate how much space we need in front of this part
     631 |             // nSpaces is the amount of padding -- the number of spaces needed
     632 |             // to move us to the next column, where columns occur at factors of
     633 |             // tabWidth.
     634 |             var nSpaces = tabWidth - (charInLine % tabWidth);
     635 |             charInLine += nSpaces;
     636 |             for (; nSpaces >= 0; nSpaces -= SPACES.length) {
     637 |               out.push(SPACES.substring(0, nSpaces));
     638 |             }
     639 |             pos = i + 1;
     640 |             break;
     641 |           case '\n':
     642 |             charInLine = 0;
     643 |             break;
     644 |           default:
     645 |             ++charInLine;
     646 |         }
     647 |       }
     648 |       if (!out) { return plainText; }
     649 |       out.push(plainText.substring(pos));
     650 |       return out.join('');
     651 |     };
     652 |   }
     653 | 
     654 |   var pr_chunkPattern = new RegExp(
     655 |       '[^<]+'  // A run of characters other than '<'
     656 |       + '|<\!--[\\s\\S]*?--\>'  // an HTML comment
     657 |       + '|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>'  // a CDATA section
     658 |       // a probable tag that should not be highlighted
     659 |       + '|<\/?[a-zA-Z](?:[^>\"\']|\'[^\']*\'|\"[^\"]*\")*>'
     660 |       + '|<',  // A '<' that does not begin a larger chunk
     661 |       'g');
     662 |   var pr_commentPrefix = /^<\!--/;
     663 |   var pr_cdataPrefix = /^<!\[CDATA\[/;
     664 |   var pr_brPrefix = /^<br\b/i;
     665 |   var pr_tagNameRe = /^<(\/?)([a-zA-Z][a-zA-Z0-9]*)/;
     666 | 
     667 |   /** split markup into chunks of html tags (style null) and
     668 |     * plain text (style {@link #PR_PLAIN}), converting tags which are
     669 |     * significant for tokenization (<br>) into their textual equivalent.
     670 |     *
     671 |     * @param {string} s html where whitespace is considered significant.
     672 |     * @return {Object} source code and extracted tags.
     673 |     * @private
     674 |     */
     675 |   function extractTags(s) {
     676 |     // since the pattern has the 'g' modifier and defines no capturing groups,
     677 |     // this will return a list of all chunks which we then classify and wrap as
     678 |     // PR_Tokens
     679 |     var matches = s.match(pr_chunkPattern);
     680 |     var sourceBuf = [];
     681 |     var sourceBufLen = 0;
     682 |     var extractedTags = [];
     683 |     if (matches) {
     684 |       for (var i = 0, n = matches.length; i < n; ++i) {
     685 |         var match = matches[i];
     686 |         if (match.length > 1 && match.charAt(0) === '<') {
     687 |           if (pr_commentPrefix.test(match)) { continue; }
     688 |           if (pr_cdataPrefix.test(match)) {
     689 |             // strip CDATA prefix and suffix.  Don't unescape since it's CDATA
     690 |             sourceBuf.push(match.substring(9, match.length - 3));
     691 |             sourceBufLen += match.length - 12;
     692 |           } else if (pr_brPrefix.test(match)) {
     693 |             // <br> tags are lexically significant so convert them to text.
     694 |             // This is undone later.
     695 |             sourceBuf.push('\n');
     696 |             ++sourceBufLen;
     697 |           } else {
     698 |             if (match.indexOf(PR_NOCODE) >= 0 && isNoCodeTag(match)) {
     699 |               // A <span class="nocode"> will start a section that should be
     700 |               // ignored.  Continue walking the list until we see a matching end
     701 |               // tag.
     702 |               var name = match.match(pr_tagNameRe)[2];
     703 |               var depth = 1;
     704 |               var j;
     705 |               end_tag_loop:
     706 |               for (j = i + 1; j < n; ++j) {
     707 |                 var name2 = matches[j].match(pr_tagNameRe);
     708 |                 if (name2 && name2[2] === name) {
     709 |                   if (name2[1] === '/') {
     710 |                     if (--depth === 0) { break end_tag_loop; }
     711 |                   } else {
     712 |                     ++depth;
     713 |                   }
     714 |                 }
     715 |               }
     716 |               if (j < n) {
     717 |                 extractedTags.push(
     718 |                     sourceBufLen, matches.slice(i, j + 1).join(''));
     719 |                 i = j;
     720 |               } else {  // Ignore unclosed sections.
     721 |                 extractedTags.push(sourceBufLen, match);
     722 |               }
     723 |             } else {
     724 |               extractedTags.push(sourceBufLen, match);
     725 |             }
     726 |           }
     727 |         } else {
     728 |           var literalText = htmlToText(match);
     729 |           sourceBuf.push(literalText);
     730 |           sourceBufLen += literalText.length;
     731 |         }
     732 |       }
     733 |     }
     734 |     return { source: sourceBuf.join(''), tags: extractedTags };
     735 |   }
     736 | 
     737 |   /** True if the given tag contains a class attribute with the nocode class. */
     738 |   function isNoCodeTag(tag) {
     739 |     return !!tag
     740 |         // First canonicalize the representation of attributes
     741 |         .replace(/\s(\w+)\s*=\s*(?:\"([^\"]*)\"|'([^\']*)'|(\S+))/g,
     742 |                  ' $1="$2$3$4"')
     743 |         // Then look for the attribute we want.
     744 |         .match(/[cC][lL][aA][sS][sS]=\"[^\"]*\bnocode\b/);
     745 |   }
     746 | 
     747 |   /**
     748 |    * Apply the given language handler to sourceCode and add the resulting
     749 |    * decorations to out.
     750 |    * @param {number} basePos the index of sourceCode within the chunk of source
     751 |    *    whose decorations are already present on out.
     752 |    */
     753 |   function appendDecorations(basePos, sourceCode, langHandler, out) {
     754 |     if (!sourceCode) { return; }
     755 |     var job = {
     756 |       source: sourceCode,
     757 |       basePos: basePos
     758 |     };
     759 |     langHandler(job);
     760 |     out.push.apply(out, job.decorations);
     761 |   }
     762 | 
     763 |   /** Given triples of [style, pattern, context] returns a lexing function,
     764 |     * The lexing function interprets the patterns to find token boundaries and
     765 |     * returns a decoration list of the form
     766 |     * [index_0, style_0, index_1, style_1, ..., index_n, style_n]
     767 |     * where index_n is an index into the sourceCode, and style_n is a style
     768 |     * constant like PR_PLAIN.  index_n-1 <= index_n, and style_n-1 applies to
     769 |     * all characters in sourceCode[index_n-1:index_n].
     770 |     *
     771 |     * The stylePatterns is a list whose elements have the form
     772 |     * [style : string, pattern : RegExp, DEPRECATED, shortcut : string].
     773 |     *
     774 |     * Style is a style constant like PR_PLAIN, or can be a string of the
     775 |     * form 'lang-FOO', where FOO is a language extension describing the
     776 |     * language of the portion of the token in $1 after pattern executes.
     777 |     * E.g., if style is 'lang-lisp', and group 1 contains the text
     778 |     * '(hello (world))', then that portion of the token will be passed to the
     779 |     * registered lisp handler for formatting.
     780 |     * The text before and after group 1 will be restyled using this decorator
     781 |     * so decorators should take care that this doesn't result in infinite
     782 |     * recursion.  For example, the HTML lexer rule for SCRIPT elements looks
     783 |     * something like ['lang-js', /<[s]cript>(.+?)<\/script>/].  This may match
     784 |     * '<script>foo()<\/script>', which would cause the current decorator to
     785 |     * be called with '<script>' which would not match the same rule since
     786 |     * group 1 must not be empty, so it would be instead styled as PR_TAG by
     787 |     * the generic tag rule.  The handler registered for the 'js' extension would
     788 |     * then be called with 'foo()', and finally, the current decorator would
     789 |     * be called with '<\/script>' which would not match the original rule and
     790 |     * so the generic tag rule would identify it as a tag.
     791 |     *
     792 |     * Pattern must only match prefixes, and if it matches a prefix, then that
     793 |     * match is considered a token with the same style.
     794 |     *
     795 |     * Context is applied to the last non-whitespace, non-comment token
     796 |     * recognized.
     797 |     *
     798 |     * Shortcut is an optional string of characters, any of which, if the first
     799 |     * character, gurantee that this pattern and only this pattern matches.
     800 |     *
     801 |     * @param {Array} shortcutStylePatterns patterns that always start with
     802 |     *   a known character.  Must have a shortcut string.
     803 |     * @param {Array} fallthroughStylePatterns patterns that will be tried in
     804 |     *   order if the shortcut ones fail.  May have shortcuts.
     805 |     *
     806 |     * @return {function (Object)} a
     807 |     *   function that takes source code and returns a list of decorations.
     808 |     */
     809 |   function createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns) {
     810 |     var shortcuts = {};
     811 |     var tokenizer;
     812 |     (function () {
     813 |       var allPatterns = shortcutStylePatterns.concat(fallthroughStylePatterns);
     814 |       var allRegexs = [];
     815 |       var regexKeys = {};
     816 |       for (var i = 0, n = allPatterns.length; i < n; ++i) {
     817 |         var patternParts = allPatterns[i];
     818 |         var shortcutChars = patternParts[3];
     819 |         if (shortcutChars) {
     820 |           for (var c = shortcutChars.length; --c >= 0;) {
     821 |             shortcuts[shortcutChars.charAt(c)] = patternParts;
     822 |           }
     823 |         }
     824 |         var regex = patternParts[1];
     825 |         var k = '' + regex;
     826 |         if (!regexKeys.hasOwnProperty(k)) {
     827 |           allRegexs.push(regex);
     828 |           regexKeys[k] = null;
     829 |         }
     830 |       }
     831 |       allRegexs.push(/[\0-\uffff]/);
     832 |       tokenizer = combinePrefixPatterns(allRegexs);
     833 |     })();
     834 | 
     835 |     var nPatterns = fallthroughStylePatterns.length;
     836 |     var notWs = /\S/;
     837 | 
     838 |     /**
     839 |      * Lexes job.source and produces an output array job.decorations of style
     840 |      * classes preceded by the position at which they start in job.source in
     841 |      * order.
     842 |      *
     843 |      * @param {Object} job an object like {@code
     844 |      *    source: {string} sourceText plain text,
     845 |      *    basePos: {int} position of job.source in the larger chunk of
     846 |      *        sourceCode.
     847 |      * }
     848 |      */
     849 |     var decorate = function (job) {
     850 |       var sourceCode = job.source, basePos = job.basePos;
     851 |       /** Even entries are positions in source in ascending order.  Odd enties
     852 |         * are style markers (e.g., PR_COMMENT) that run from that position until
     853 |         * the end.
     854 |         * @type {Array.<number|string>}
     855 |         */
     856 |       var decorations = [basePos, PR_PLAIN];
     857 |       var pos = 0;  // index into sourceCode
     858 |       var tokens = sourceCode.match(tokenizer) || [];
     859 |       var styleCache = {};
     860 | 
     861 |       // loop through
     862 |       for (var ti = 0, nTokens = tokens.length; ti < nTokens; ++ti) {
     863 |         var token = tokens[ti];
     864 |         var style = styleCache[token];
     865 |         var match = void 0;
     866 | 
     867 |         var isEmbedded;
     868 |         if (typeof style === 'string') {
     869 |           isEmbedded = false;
     870 |         } else {
     871 |           var patternParts = shortcuts[token.charAt(0)];
     872 |           if (patternParts) {
     873 |             match = token.match(patternParts[1]);
     874 |             style = patternParts[0];
     875 |           } else {
     876 |             for (var i = 0; i < nPatterns; ++i) {
     877 |               patternParts = fallthroughStylePatterns[i];
     878 |               match = token.match(patternParts[1]);
     879 |               if (match) {
     880 |                 style = patternParts[0];
     881 |                 break;
     882 |               }
     883 |             }
     884 | 
     885 |             if (!match) {  // make sure that we make progress
     886 |               style = PR_PLAIN;
     887 |             }
     888 |           }
     889 | 
     890 |           isEmbedded = style.length >= 5 && 'lang-' === style.substring(0, 5);
     891 |           if (isEmbedded && !(match && typeof match[1] === 'string')) {
     892 |             isEmbedded = false;
     893 |             style = PR_SOURCE;
     894 |           }
     895 | 
     896 |           if (!isEmbedded) { styleCache[token] = style; }
     897 |         }
     898 | 
     899 |         var tokenStart = pos;
     900 |         pos += token.length;
     901 | 
     902 |         if (!isEmbedded) {
     903 |           decorations.push(basePos + tokenStart, style);
     904 |         } else {  // Treat group 1 as an embedded block of source code.
     905 |           var embeddedSource = match[1];
     906 |           var embeddedSourceStart = token.indexOf(embeddedSource);
     907 |           var embeddedSourceEnd = embeddedSourceStart + embeddedSource.length;
     908 |           if (match[2]) {
     909 |             // If embeddedSource can be blank, then it would match at the
     910 |             // beginning which would cause us to infinitely recurse on the
     911 |             // entire token, so we catch the right context in match[2].
     912 |             embeddedSourceEnd = token.length - match[2].length;
     913 |             embeddedSourceStart = embeddedSourceEnd - embeddedSource.length;
     914 |           }
     915 |           var lang = style.substring(5);
     916 |           // Decorate the left of the embedded source
     917 |           appendDecorations(
     918 |               basePos + tokenStart,
     919 |               token.substring(0, embeddedSourceStart),
     920 |               decorate, decorations);
     921 |           // Decorate the embedded source
     922 |           appendDecorations(
     923 |               basePos + tokenStart + embeddedSourceStart,
     924 |               embeddedSource,
     925 |               langHandlerForExtension(lang, embeddedSource),
     926 |               decorations);
     927 |           // Decorate the right of the embedded section
     928 |           appendDecorations(
     929 |               basePos + tokenStart + embeddedSourceEnd,
     930 |               token.substring(embeddedSourceEnd),
     931 |               decorate, decorations);
     932 |         }
     933 |       }
     934 |       job.decorations = decorations;
     935 |     };
     936 |     return decorate;
     937 |   }
     938 | 
     939 |   /** returns a function that produces a list of decorations from source text.
     940 |     *
     941 |     * This code treats ", ', and ` as string delimiters, and \ as a string
     942 |     * escape.  It does not recognize perl's qq() style strings.
     943 |     * It has no special handling for double delimiter escapes as in basic, or
     944 |     * the tripled delimiters used in python, but should work on those regardless
     945 |     * although in those cases a single string literal may be broken up into
     946 |     * multiple adjacent string literals.
     947 |     *
     948 |     * It recognizes C, C++, and shell style comments.
     949 |     *
     950 |     * @param {Object} options a set of optional parameters.
     951 |     * @return {function (Object)} a function that examines the source code
     952 |     *     in the input job and builds the decoration list.
     953 |     */
     954 |   function sourceDecorator(options) {
     955 |     var shortcutStylePatterns = [], fallthroughStylePatterns = [];
     956 |     if (options['tripleQuotedStrings']) {
     957 |       // '''multi-line-string''', 'single-line-string', and double-quoted
     958 |       shortcutStylePatterns.push(
     959 |           [PR_STRING,  /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,
     960 |            null, '\'"']);
     961 |     } else if (options['multiLineStrings']) {
     962 |       // 'multi-line-string', "multi-line-string"
     963 |       shortcutStylePatterns.push(
     964 |           [PR_STRING,  /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,
     965 |            null, '\'"`']);
     966 |     } else {
     967 |       // 'single-line-string', "single-line-string"
     968 |       shortcutStylePatterns.push(
     969 |           [PR_STRING,
     970 |            /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,
     971 |            null, '"\'']);
     972 |     }
     973 |     if (options['verbatimStrings']) {
     974 |       // verbatim-string-literal production from the C# grammar.  See issue 93.
     975 |       fallthroughStylePatterns.push(
     976 |           [PR_STRING, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null]);
     977 |     }
     978 |     if (options['hashComments']) {
     979 |       if (options['cStyleComments']) {
     980 |         // Stop C preprocessor declarations at an unclosed open comment
     981 |         shortcutStylePatterns.push(
     982 |             [PR_COMMENT, /^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,
     983 |              null, '#']);
     984 |         fallthroughStylePatterns.push(
     985 |             [PR_STRING,
     986 |              /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,
     987 |              null]);
     988 |       } else {
     989 |         shortcutStylePatterns.push([PR_COMMENT, /^#[^\r\n]*/, null, '#']);
     990 |       }
     991 |     }
     992 |     if (options['cStyleComments']) {
     993 |       fallthroughStylePatterns.push([PR_COMMENT, /^\/\/[^\r\n]*/, null]);
     994 |       fallthroughStylePatterns.push(
     995 |           [PR_COMMENT, /^\/\*[\s\S]*?(?:\*\/|$)/, null]);
     996 |     }
     997 |     if (options['regexLiterals']) {
     998 |       var REGEX_LITERAL = (
     999 |           // A regular expression literal starts with a slash that is
    1000 |           // not followed by * or / so that it is not confused with
    1001 |           // comments.
    1002 |           '/(?=[^/*])'
    1003 |           // and then contains any number of raw characters,
    1004 |           + '(?:[^/\\x5B\\x5C]'
    1005 |           // escape sequences (\x5C),
    1006 |           +    '|\\x5C[\\s\\S]'
    1007 |           // or non-nesting character sets (\x5B\x5D);
    1008 |           +    '|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+'
    1009 |           // finally closed by a /.
    1010 |           + '/');
    1011 |       fallthroughStylePatterns.push(
    1012 |           ['lang-regex',
    1013 |            new RegExp('^' + REGEXP_PRECEDER_PATTERN + '(' + REGEX_LITERAL + ')')
    1014 |            ]);
    1015 |     }
    1016 | 
    1017 |     var keywords = options['keywords'].replace(/^\s+|\s+$/g, '');
    1018 |     if (keywords.length) {
    1019 |       fallthroughStylePatterns.push(
    1020 |           [PR_KEYWORD,
    1021 |            new RegExp('^(?:' + keywords.replace(/\s+/g, '|') + ')\\b'), null]);
    1022 |     }
    1023 | 
    1024 |     shortcutStylePatterns.push([PR_PLAIN,       /^\s+/, null, ' \r\n\t\xA0']);
    1025 |     fallthroughStylePatterns.push(
    1026 |         // TODO(mikesamuel): recognize non-latin letters and numerals in idents
    1027 |         [PR_LITERAL,     /^@[a-z_$][a-z_$@0-9]*/i, null],
    1028 |         [PR_TYPE,        /^@?[A-Z]+[a-z][A-Za-z_$@0-9]*/, null],
    1029 |         [PR_PLAIN,       /^[a-z_$][a-z_$@0-9]*/i, null],
    1030 |         [PR_LITERAL,
    1031 |          new RegExp(
    1032 |              '^(?:'
    1033 |              // A hex number
    1034 |              + '0x[a-f0-9]+'
    1035 |              // or an octal or decimal number,
    1036 |              + '|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)'
    1037 |              // possibly in scientific notation
    1038 |              + '(?:e[+\\-]?\\d+)?'
    1039 |              + ')'
    1040 |              // with an optional modifier like UL for unsigned long
    1041 |              + '[a-z]*', 'i'),
    1042 |          null, '0123456789'],
    1043 |         [PR_PUNCTUATION, /^.[^\s\w\.$@\'\"\`\/\#]*/, null]);
    1044 | 
    1045 |     return createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns);
    1046 |   }
    1047 | 
    1048 |   var decorateSource = sourceDecorator({
    1049 |         'keywords': ALL_KEYWORDS,
    1050 |         'hashComments': true,
    1051 |         'cStyleComments': true,
    1052 |         'multiLineStrings': true,
    1053 |         'regexLiterals': true
    1054 |       });
    1055 | 
    1056 |   /** Breaks {@code job.source} around style boundaries in
    1057 |     * {@code job.decorations} while re-interleaving {@code job.extractedTags},
    1058 |     * and leaves the result in {@code job.prettyPrintedHtml}.
    1059 |     * @param {Object} job like {
    1060 |     *    source: {string} source as plain text,
    1061 |     *    extractedTags: {Array.<number|string>} extractedTags chunks of raw
    1062 |     *                   html preceded by their position in {@code job.source}
    1063 |     *                   in order
    1064 |     *    decorations: {Array.<number|string} an array of style classes preceded
    1065 |     *                 by the position at which they start in job.source in order
    1066 |     * }
    1067 |     * @private
    1068 |     */
    1069 |   function recombineTagsAndDecorations(job) {
    1070 |     var sourceText = job.source;
    1071 |     var extractedTags = job.extractedTags;
    1072 |     var decorations = job.decorations;
    1073 | 
    1074 |     var html = [];
    1075 |     // index past the last char in sourceText written to html
    1076 |     var outputIdx = 0;
    1077 | 
    1078 |     var openDecoration = null;
    1079 |     var currentDecoration = null;
    1080 |     var tagPos = 0;  // index into extractedTags
    1081 |     var decPos = 0;  // index into decorations
    1082 |     var tabExpander = makeTabExpander(window['PR_TAB_WIDTH']);
    1083 | 
    1084 |     var adjacentSpaceRe = /([\r\n ]) /g;
    1085 |     var startOrSpaceRe = /(^| ) /gm;
    1086 |     var newlineRe = /\r\n?|\n/g;
    1087 |     var trailingSpaceRe = /[ \r\n]$/;
    1088 |     var lastWasSpace = true;  // the last text chunk emitted ended with a space.
    1089 | 
    1090 |     // See bug 71 and http://stackoverflow.com/questions/136443/why-doesnt-ie7-
    1091 |     var isIE678 = window['_pr_isIE6']();
    1092 |     var lineBreakHtml = (
    1093 |         isIE678
    1094 |         ? (job.sourceNode.tagName === 'PRE'
    1095 |            // Use line feeds instead of <br>s so that copying and pasting works
    1096 |            // on IE.
    1097 |            // Doing this on other browsers breaks lots of stuff since \r\n is
    1098 |            // treated as two newlines on Firefox.
    1099 |            ? (isIE678 === 6 ? '&#160;\r\n' :
    1100 |               isIE678 === 7 ? '&#160;<br>\r' : '&#160;\r')
    1101 |            // IE collapses multiple adjacent <br>s into 1 line break.
    1102 |            // Prefix every newline with '&#160;' to prevent such behavior.
    1103 |            // &nbsp; is the same as &#160; but works in XML as well as HTML.
    1104 |            : '&#160;<br />')
    1105 |         : '<br />');
    1106 | 
    1107 |     // Look for a class like linenums or linenums:<n> where <n> is the 1-indexed
    1108 |     // number of the first line.
    1109 |     var numberLines = job.sourceNode.className.match(/\blinenums\b(?::(\d+))?/);
    1110 |     var lineBreaker;
    1111 |     if (numberLines) {
    1112 |       var lineBreaks = [];
    1113 |       for (var i = 0; i < 10; ++i) {
    1114 |         lineBreaks[i] = lineBreakHtml + '</li><li class="L' + i + '">';
    1115 |       }
    1116 |       var lineNum = numberLines[1] && numberLines[1].length 
    1117 |           ? numberLines[1] - 1 : 0;  // Lines are 1-indexed
    1118 |       html.push('<ol class="linenums"><li class="L', (lineNum) % 10, '"');
    1119 |       if (lineNum) {
    1120 |         html.push(' value="', lineNum + 1, '"');
    1121 |       }
    1122 |       html.push('>');
    1123 |       lineBreaker = function () {
    1124 |         var lb = lineBreaks[++lineNum % 10];
    1125 |         // If a decoration is open, we need to close it before closing a list-item
    1126 |         // and reopen it on the other side of the list item.
    1127 |         return openDecoration
    1128 |             ? ('</span>' + lb + '<span class="' + openDecoration + '">') : lb;
    1129 |       };
    1130 |     } else {
    1131 |       lineBreaker = lineBreakHtml;
    1132 |     }
    1133 | 
    1134 |     // A helper function that is responsible for opening sections of decoration
    1135 |     // and outputing properly escaped chunks of source
    1136 |     function emitTextUpTo(sourceIdx) {
    1137 |       if (sourceIdx > outputIdx) {
    1138 |         if (openDecoration && openDecoration !== currentDecoration) {
    1139 |           // Close the current decoration
    1140 |           html.push('</span>');
    1141 |           openDecoration = null;
    1142 |         }
    1143 |         if (!openDecoration && currentDecoration) {
    1144 |           openDecoration = currentDecoration;
    1145 |           html.push('<span class="', openDecoration, '">');
    1146 |         }
    1147 |         // This interacts badly with some wikis which introduces paragraph tags
    1148 |         // into pre blocks for some strange reason.
    1149 |         // It's necessary for IE though which seems to lose the preformattedness
    1150 |         // of <pre> tags when their innerHTML is assigned.
    1151 |         // http://stud3.tuwien.ac.at/~e0226430/innerHtmlQuirk.html
    1152 |         // and it serves to undo the conversion of <br>s to newlines done in
    1153 |         // chunkify.
    1154 |         var htmlChunk = textToHtml(
    1155 |             tabExpander(sourceText.substring(outputIdx, sourceIdx)))
    1156 |             .replace(lastWasSpace
    1157 |                      ? startOrSpaceRe
    1158 |                      : adjacentSpaceRe, '$1&#160;');
    1159 |         // Keep track of whether we need to escape space at the beginning of the
    1160 |         // next chunk.
    1161 |         lastWasSpace = trailingSpaceRe.test(htmlChunk);
    1162 |         html.push(htmlChunk.replace(newlineRe, lineBreaker));
    1163 |         outputIdx = sourceIdx;
    1164 |       }
    1165 |     }
    1166 | 
    1167 |     while (true) {
    1168 |       // Determine if we're going to consume a tag this time around.  Otherwise
    1169 |       // we consume a decoration or exit.
    1170 |       var outputTag;
    1171 |       if (tagPos < extractedTags.length) {
    1172 |         if (decPos < decorations.length) {
    1173 |           // Pick one giving preference to extractedTags since we shouldn't open
    1174 |           // a new style that we're going to have to immediately close in order
    1175 |           // to output a tag.
    1176 |           outputTag = extractedTags[tagPos] <= decorations[decPos];
    1177 |         } else {
    1178 |           outputTag = true;
    1179 |         }
    1180 |       } else {
    1181 |         outputTag = false;
    1182 |       }
    1183 |       // Consume either a decoration or a tag or exit.
    1184 |       if (outputTag) {
    1185 |         emitTextUpTo(extractedTags[tagPos]);
    1186 |         if (openDecoration) {
    1187 |           // Close the current decoration
    1188 |           html.push('</span>');
    1189 |           openDecoration = null;
    1190 |         }
    1191 |         html.push(extractedTags[tagPos + 1]);
    1192 |         tagPos += 2;
    1193 |       } else if (decPos < decorations.length) {
    1194 |         emitTextUpTo(decorations[decPos]);
    1195 |         currentDecoration = decorations[decPos + 1];
    1196 |         decPos += 2;
    1197 |       } else {
    1198 |         break;
    1199 |       }
    1200 |     }
    1201 |     emitTextUpTo(sourceText.length);
    1202 |     if (openDecoration) {
    1203 |       html.push('</span>');
    1204 |     }
    1205 |     if (numberLines) { html.push('</li></ol>'); }
    1206 |     job.prettyPrintedHtml = html.join('');
    1207 |   }
    1208 | 
    1209 |   /** Maps language-specific file extensions to handlers. */
    1210 |   var langHandlerRegistry = {};
    1211 |   /** Register a language handler for the given file extensions.
    1212 |     * @param {function (Object)} handler a function from source code to a list
    1213 |     *      of decorations.  Takes a single argument job which describes the
    1214 |     *      state of the computation.   The single parameter has the form
    1215 |     *      {@code {
    1216 |     *        source: {string} as plain text.
    1217 |     *        decorations: {Array.<number|string>} an array of style classes
    1218 |     *                     preceded by the position at which they start in
    1219 |     *                     job.source in order.
    1220 |     *                     The language handler should assigned this field.
    1221 |     *        basePos: {int} the position of source in the larger source chunk.
    1222 |     *                 All positions in the output decorations array are relative
    1223 |     *                 to the larger source chunk.
    1224 |     *      } }
    1225 |     * @param {Array.<string>} fileExtensions
    1226 |     */
    1227 |   function registerLangHandler(handler, fileExtensions) {
    1228 |     for (var i = fileExtensions.length; --i >= 0;) {
    1229 |       var ext = fileExtensions[i];
    1230 |       if (!langHandlerRegistry.hasOwnProperty(ext)) {
    1231 |         langHandlerRegistry[ext] = handler;
    1232 |       } else if ('console' in window) {
    1233 |         console['warn']('cannot override language handler %s', ext);
    1234 |       }
    1235 |     }
    1236 |   }
    1237 |   function langHandlerForExtension(extension, source) {
    1238 |     if (!(extension && langHandlerRegistry.hasOwnProperty(extension))) {
    1239 |       // Treat it as markup if the first non whitespace character is a < and
    1240 |       // the last non-whitespace character is a >.
    1241 |       extension = /^\s*</.test(source)
    1242 |           ? 'default-markup'
    1243 |           : 'default-code';
    1244 |     }
    1245 |     return langHandlerRegistry[extension];
    1246 |   }
    1247 |   registerLangHandler(decorateSource, ['default-code']);
    1248 |   registerLangHandler(
    1249 |       createSimpleLexer(
    1250 |           [],
    1251 |           [
    1252 |            [PR_PLAIN,       /^[^<?]+/],
    1253 |            [PR_DECLARATION, /^<!\w[^>]*(?:>|$)/],
    1254 |            [PR_COMMENT,     /^<\!--[\s\S]*?(?:-\->|$)/],
    1255 |            // Unescaped content in an unknown language
    1256 |            ['lang-',        /^<\?([\s\S]+?)(?:\?>|$)/],
    1257 |            ['lang-',        /^<%([\s\S]+?)(?:%>|$)/],
    1258 |            [PR_PUNCTUATION, /^(?:<[%?]|[%?]>)/],
    1259 |            ['lang-',        /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],
    1260 |            // Unescaped content in javascript.  (Or possibly vbscript).
    1261 |            ['lang-js',      /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],
    1262 |            // Contains unescaped stylesheet content
    1263 |            ['lang-css',     /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],
    1264 |            ['lang-in.tag',  /^(<\/?[a-z][^<>]*>)/i]
    1265 |           ]),
    1266 |       ['default-markup', 'htm', 'html', 'mxml', 'xhtml', 'xml', 'xsl']);
    1267 |   registerLangHandler(
    1268 |       createSimpleLexer(
    1269 |           [
    1270 |            [PR_PLAIN,        /^[\s]+/, null, ' \t\r\n'],
    1271 |            [PR_ATTRIB_VALUE, /^(?:\"[^\"]*\"?|\'[^\']*\'?)/, null, '\"\'']
    1272 |            ],
    1273 |           [
    1274 |            [PR_TAG,          /^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],
    1275 |            [PR_ATTRIB_NAME,  /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],
    1276 |            ['lang-uq.val',   /^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],
    1277 |            [PR_PUNCTUATION,  /^[=<>\/]+/],
    1278 |            ['lang-js',       /^on\w+\s*=\s*\"([^\"]+)\"/i],
    1279 |            ['lang-js',       /^on\w+\s*=\s*\'([^\']+)\'/i],
    1280 |            ['lang-js',       /^on\w+\s*=\s*([^\"\'>\s]+)/i],
    1281 |            ['lang-css',      /^style\s*=\s*\"([^\"]+)\"/i],
    1282 |            ['lang-css',      /^style\s*=\s*\'([^\']+)\'/i],
    1283 |            ['lang-css',      /^style\s*=\s*([^\"\'>\s]+)/i]
    1284 |            ]),
    1285 |       ['in.tag']);
    1286 |   registerLangHandler(
    1287 |       createSimpleLexer([], [[PR_ATTRIB_VALUE, /^[\s\S]+/]]), ['uq.val']);
    1288 |   registerLangHandler(sourceDecorator({
    1289 |           'keywords': CPP_KEYWORDS,
    1290 |           'hashComments': true,
    1291 |           'cStyleComments': true
    1292 |         }), ['c', 'cc', 'cpp', 'cxx', 'cyc', 'm']);
    1293 |   registerLangHandler(sourceDecorator({
    1294 |           'keywords': 'null true false'
    1295 |         }), ['json']);
    1296 |   registerLangHandler(sourceDecorator({
    1297 |           'keywords': CSHARP_KEYWORDS,
    1298 |           'hashComments': true,
    1299 |           'cStyleComments': true,
    1300 |           'verbatimStrings': true
    1301 |         }), ['cs']);
    1302 |   registerLangHandler(sourceDecorator({
    1303 |           'keywords': JAVA_KEYWORDS,
    1304 |           'cStyleComments': true
    1305 |         }), ['java']);
    1306 |   registerLangHandler(sourceDecorator({
    1307 |           'keywords': SH_KEYWORDS,
    1308 |           'hashComments': true,
    1309 |           'multiLineStrings': true
    1310 |         }), ['bsh', 'csh', 'sh']);
    1311 |   registerLangHandler(sourceDecorator({
    1312 |           'keywords': PYTHON_KEYWORDS,
    1313 |           'hashComments': true,
    1314 |           'multiLineStrings': true,
    1315 |           'tripleQuotedStrings': true
    1316 |         }), ['cv', 'py']);
    1317 |   registerLangHandler(sourceDecorator({
    1318 |           'keywords': PERL_KEYWORDS,
    1319 |           'hashComments': true,
    1320 |           'multiLineStrings': true,
    1321 |           'regexLiterals': true
    1322 |         }), ['perl', 'pl', 'pm']);
    1323 |   registerLangHandler(sourceDecorator({
    1324 |           'keywords': RUBY_KEYWORDS,
    1325 |           'hashComments': true,
    1326 |           'multiLineStrings': true,
    1327 |           'regexLiterals': true
    1328 |         }), ['rb']);
    1329 |   registerLangHandler(sourceDecorator({
    1330 |           'keywords': JSCRIPT_KEYWORDS,
    1331 |           'cStyleComments': true,
    1332 |           'regexLiterals': true
    1333 |         }), ['js']);
    1334 |   registerLangHandler(
    1335 |       createSimpleLexer([], [[PR_STRING, /^[\s\S]+/]]), ['regex']);
    1336 | 
    1337 |   function applyDecorator(job) {
    1338 |     var sourceCodeHtml = job.sourceCodeHtml;
    1339 |     var opt_langExtension = job.langExtension;
    1340 | 
    1341 |     // Prepopulate output in case processing fails with an exception.
    1342 |     job.prettyPrintedHtml = sourceCodeHtml;
    1343 | 
    1344 |     try {
    1345 |       // Extract tags, and convert the source code to plain text.
    1346 |       var sourceAndExtractedTags = extractTags(sourceCodeHtml);
    1347 |       /** Plain text. @type {string} */
    1348 |       var source = sourceAndExtractedTags.source;
    1349 |       job.source = source;
    1350 |       job.basePos = 0;
    1351 | 
    1352 |       /** Even entries are positions in source in ascending order.  Odd entries
    1353 |         * are tags that were extracted at that position.
    1354 |         * @type {Array.<number|string>}
    1355 |         */
    1356 |       job.extractedTags = sourceAndExtractedTags.tags;
    1357 | 
    1358 |       // Apply the appropriate language handler
    1359 |       langHandlerForExtension(opt_langExtension, source)(job);
    1360 |       // Integrate the decorations and tags back into the source code to produce
    1361 |       // a decorated html string which is left in job.prettyPrintedHtml.
    1362 |       recombineTagsAndDecorations(job);
    1363 |     } catch (e) {
    1364 |       if ('console' in window) {
    1365 |         console['log'](e && e['stack'] ? e['stack'] : e);
    1366 |       }
    1367 |     }
    1368 |   }
    1369 | 
    1370 |   function prettyPrintOne(sourceCodeHtml, opt_langExtension) {
    1371 |     var job = {
    1372 |       sourceCodeHtml: sourceCodeHtml,
    1373 |       langExtension: opt_langExtension
    1374 |     };
    1375 |     applyDecorator(job);
    1376 |     return job.prettyPrintedHtml;
    1377 |   }
    1378 | 
    1379 |   function prettyPrint(opt_whenDone) {
    1380 |     function byTagName(tn) { return document.getElementsByTagName(tn); }
    1381 |     // fetch a list of nodes to rewrite
    1382 |     var codeSegments = [byTagName('pre'), byTagName('code'), byTagName('xmp')];
    1383 |     var elements = [];
    1384 |     for (var i = 0; i < codeSegments.length; ++i) {
    1385 |       for (var j = 0, n = codeSegments[i].length; j < n; ++j) {
    1386 |         elements.push(codeSegments[i][j]);
    1387 |       }
    1388 |     }
    1389 |     codeSegments = null;
    1390 | 
    1391 |     var clock = Date;
    1392 |     if (!clock['now']) {
    1393 |       clock = { 'now': function () { return (new Date).getTime(); } };
    1394 |     }
    1395 | 
    1396 |     // The loop is broken into a series of continuations to make sure that we
    1397 |     // don't make the browser unresponsive when rewriting a large page.
    1398 |     var k = 0;
    1399 |     var prettyPrintingJob;
    1400 | 
    1401 |     function doWork() {
    1402 |       var endTime = (window['PR_SHOULD_USE_CONTINUATION'] ?
    1403 |                      clock.now() + 250 /* ms */ :
    1404 |                      Infinity);
    1405 |       for (; k < elements.length && clock.now() < endTime; k++) {
    1406 |         var cs = elements[k];
    1407 |         if (cs.className && cs.className.indexOf('prettyprint') >= 0) {
    1408 |           // If the classes includes a language extensions, use it.
    1409 |           // Language extensions can be specified like
    1410 |           //     <pre class="prettyprint lang-cpp">
    1411 |           // the language extension "cpp" is used to find a language handler as
    1412 |           // passed to PR_registerLangHandler.
    1413 |           var langExtension = cs.className.match(/\blang-(\w+)\b/);
    1414 |           if (langExtension) { langExtension = langExtension[1]; }
    1415 |           
    1416 |           // make sure this is not nested in an already prettified element
    1417 |           var nested = false;
    1418 |           for (var p = cs.parentNode; p; p = p.parentNode) {
    1419 |             if ((p.tagName === 'pre' || p.tagName === 'code' ||
    1420 |                  p.tagName === 'xmp') &&
    1421 |                 p.className && p.className.indexOf('prettyprint') >= 0) {
    1422 |               nested = true;
    1423 |               break;
    1424 |             }
    1425 |           }
    1426 | 
    1427 |           // make sure we haven't already prettified this element
    1428 |           if ( cs.className && cs.className.indexOf('prettyprint-has') >= 0 ) {
    1429 |             nested = true;
    1430 |           }
    1431 |           
    1432 | 		  // handle
    1433 |           if (!nested) {
    1434 |             // fetch the content as a snippet of properly escaped HTML.
    1435 |             // Firefox adds newlines at the end.
    1436 |             var content = getInnerHtml(cs);
    1437 |             content = content.replace(/(?:\r\n?|\n)$/, '');
    1438 | 
    1439 |             // do the pretty printing
    1440 |             prettyPrintingJob = {
    1441 |               sourceCodeHtml: content,
    1442 |               langExtension: langExtension,
    1443 |               sourceNode: cs
    1444 |             };
    1445 |             applyDecorator(prettyPrintingJob);
    1446 |             replaceWithPrettyPrintedHtml();
    1447 | 			cs.className += ' prettyprint-has';
    1448 |           }
    1449 |         }
    1450 |       }
    1451 |       if (k < elements.length) {
    1452 |         // finish up in a continuation
    1453 |         setTimeout(doWork, 250);
    1454 |       } else if (opt_whenDone) {
    1455 |         opt_whenDone();
    1456 |       }
    1457 |     }
    1458 | 
    1459 |     function replaceWithPrettyPrintedHtml() {
    1460 |       var newContent = prettyPrintingJob.prettyPrintedHtml;
    1461 |       if (!newContent) { return; }
    1462 |       var cs = prettyPrintingJob.sourceNode;
    1463 |       
    1464 |       // push the prettified html back into the tag.
    1465 |       if (!isRawContent(cs)) {
    1466 |         // just replace the old html with the new
    1467 |         cs.innerHTML = newContent;
    1468 |       } else {
    1469 |         // we need to change the tag to a <pre> since <xmp>s do not allow
    1470 |         // embedded tags such as the span tags used to attach styles to
    1471 |         // sections of source code.
    1472 |         var pre = document.createElement('PRE');
    1473 |         for (var i = 0; i < cs.attributes.length; ++i) {
    1474 |           var a = cs.attributes[i];
    1475 |           if (a.specified) {
    1476 |             var aname = a.name.toLowerCase();
    1477 |             if (aname === 'class') {
    1478 |               pre.className = a.value;  // For IE 6
    1479 |             } else {
    1480 |               pre.setAttribute(a.name, a.value);
    1481 |             }
    1482 |           }
    1483 |         }
    1484 |         pre.innerHTML = newContent;
    1485 | 
    1486 |         // remove the old
    1487 |         cs.parentNode.replaceChild(pre, cs);
    1488 |         cs = pre;
    1489 |       }
    1490 |     }
    1491 | 
    1492 |     doWork();
    1493 |   }
    1494 | 
    1495 |   window['PR_normalizedHtml'] = normalizedHtml;
    1496 |   window['prettyPrintOne'] = prettyPrintOne;
    1497 |   window['prettyPrint'] = prettyPrint;
    1498 |   window['PR'] = {
    1499 |         'combinePrefixPatterns': combinePrefixPatterns,
    1500 |         'createSimpleLexer': createSimpleLexer,
    1501 |         'registerLangHandler': registerLangHandler,
    1502 |         'sourceDecorator': sourceDecorator,
    1503 |         'PR_ATTRIB_NAME': PR_ATTRIB_NAME,
    1504 |         'PR_ATTRIB_VALUE': PR_ATTRIB_VALUE,
    1505 |         'PR_COMMENT': PR_COMMENT,
    1506 |         'PR_DECLARATION': PR_DECLARATION,
    1507 |         'PR_KEYWORD': PR_KEYWORD,
    1508 |         'PR_LITERAL': PR_LITERAL,
    1509 |         'PR_NOCODE': PR_NOCODE,
    1510 |         'PR_PLAIN': PR_PLAIN,
    1511 |         'PR_PUNCTUATION': PR_PUNCTUATION,
    1512 |         'PR_SOURCE': PR_SOURCE,
    1513 |         'PR_STRING': PR_STRING,
    1514 |         'PR_TAG': PR_TAG,
    1515 |         'PR_TYPE': PR_TYPE
    1516 |       };
    1517 | })();
    1518 | 
    
    
    --------------------------------------------------------------------------------
    /prettify/prettify.min.css:
    --------------------------------------------------------------------------------
    1 | .str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun{color:#660}.pln{color:#000}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec{color:#606}pre.prettyprint{padding:2px;border:1px solid #888}ol.linenums{margin-top:0;margin-bottom:0}li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8{list-style-type:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}@media print{.str{color:#060}.kwd{color:#006;font-weight:700}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:700}.lit{color:#044}.pun{color:#440}.pln{color:#000}.tag{color:#006;font-weight:700}.atn{color:#404}.atv{color:#060}}
    2 | 
    
    
    --------------------------------------------------------------------------------
    /prettify/prettify.min.js:
    --------------------------------------------------------------------------------
    1 | window.PR_SHOULD_USE_CONTINUATION=!0,window.PR_TAB_WIDTH=4,window.PR_normalizedHtml=window.PR=window.prettyPrintOne=window.prettyPrint=void 0,window._pr_isIE6=function(){var e=navigator&&navigator.userAgent&&navigator.userAgent.match(/\bMSIE ([678])\./);return e=!!e&&+e[1],window._pr_isIE6=function(){return e},e},function(){var e="break continue do else for if return while ",t="break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof ",n=t+"alignof align_union asm axiom bool concept concept_map const_cast constexpr decltype dynamic_cast explicit export friend inline late_check mutable namespace nullptr reinterpret_cast static_assert static_cast template typeid typename using virtual wchar_t where ",r=t+"abstract boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient ",a=r+"as base by checked decimal delegate descending event fixed foreach from group implicit in interface internal into is lock object out override orderby params partial readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var ",s=t+"debugger eval export function get null set undefined var with Infinity NaN ",i="caller delete die do dump elsif eval exit foreach for goto if import last local my next no our print package redo require sub undef unless until use wantarray while BEGIN END ",l=e+"and as assert class def del elif except exec finally from global import in is lambda nonlocal not or pass print raise try with yield False True None ",o=e+"alias and begin case class def defined elsif end ensure false in module next nil not or redo rescue retry self super then true undef unless until when yield BEGIN END ",c=e+"case done elif esac eval fi function in local set then until ",u="str",f="kwd",p="com",d="typ",h="lit",g="pun",m="pln",v="src",w="nocode",b=function(){for(var e=["!","!=","!==","#","%","%=","&","&&","&&=","&=","(","*","*=","+=",",","-=","->","/","/=",":","::",";","<","<<","<<=","<=","=","==","===",">",">=",">>",">>=",">>>",">>>=","?","@","[","^","^=","^^","^^=","{","|","|=","||","||=","~","break","case","continue","delete","do","else","finally","instanceof","return","throw","try","typeof"],t="(?:^^|[+-]",n=0;n<e.length;++n)t+="|"+e[n].replace(/([^=<>:&a-z])/g,"\\$1");return t+=")\\s*"}(),y=/&/g,x=/</g,S=/>/g,N=/\"/g;function C(e){return e.replace(y,"&amp;").replace(x,"&lt;").replace(S,"&gt;")}var _=/&lt;/g,k=/&gt;/g,P=/&apos;/g,A=/&quot;/g,E=/&amp;/g,R=/&nbsp;/g;function T(e){var t=e.indexOf("&");if(t<0)return e;for(--t;(t=e.indexOf("&#",t+1))>=0;){var n=e.indexOf(";",t);if(n>=0){var r=e.substring(t+3,n),a=10;r&&"x"===r.charAt(0)&&(r=r.substring(1),a=16);var s=parseInt(r,a);isNaN(s)||(e=e.substring(0,t)+String.fromCharCode(s)+e.substring(n+1))}}return e.replace(_,"<").replace(k,">").replace(P,"'").replace(A,'"').replace(R," ").replace(E,"&")}function $(e){return"XMP"===e.tagName}var L=/[\r\n]/g;function I(e,t,n){switch(e.nodeType){case 1:var r=e.tagName.toLowerCase();t.push("<",r);var a=e.attributes,s=a.length;if(s){if(n){for(var i=[],l=s;--l>=0;)i[l]=a[l];i.sort(function(e,t){return e.name<t.name?-1:e.name===t.name?0:1}),a=i}for(l=0;l<s;++l){var o=a[l];o.specified&&t.push(" ",o.name.toLowerCase(),'="',o.value.replace(y,"&amp;").replace(x,"&lt;").replace(S,"&gt;").replace(N,"&quot;"),'"')}}t.push(">");for(var c=e.firstChild;c;c=c.nextSibling)I(c,t,n);!e.firstChild&&/^(?:br|link|img)$/.test(r)||t.push("</",r,">");break;case 3:case 4:t.push(C(e.nodeValue))}}function O(e){for(var t=0,n=!1,r=!1,a=0,s=e.length;a<s;++a){if((f=e[a]).ignoreCase)r=!0;else if(/[a-z]/i.test(f.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,""))){n=!0,r=!1;break}}function i(e){if("\\"!==e.charAt(0))return e.charCodeAt(0);switch(e.charAt(1)){case"b":return 8;case"t":return 9;case"n":return 10;case"v":return 11;case"f":return 12;case"r":return 13;case"u":case"x":return parseInt(e.substring(2),16)||e.charCodeAt(1);case"0":case"1":case"2":case"3":case"4":case"5":case"6":case"7":return parseInt(e.substring(1),8);default:return e.charCodeAt(1)}}function l(e){if(e<32)return(e<16?"\\x0":"\\x")+e.toString(16);var t=String.fromCharCode(e);return"\\"!==t&&"-"!==t&&"["!==t&&"]"!==t||(t="\\"+t),t}function o(e){for(var t=e.substring(1,e.length-1).match(new RegExp("\\\\u[0-9A-Fa-f]{4}|\\\\x[0-9A-Fa-f]{2}|\\\\[0-3][0-7]{0,2}|\\\\[0-7]{1,2}|\\\\[\\s\\S]|-|[^-\\\\]","g")),n=[],r=[],a="^"===t[0],s=a?1:0,o=t.length;s<o;++s){var c=t[s];switch(c){case"\\B":case"\\b":case"\\D":case"\\d":case"\\S":case"\\s":case"\\W":case"\\w":n.push(c);continue}var u,f=i(c);s+2<o&&"-"===t[s+1]?(u=i(t[s+2]),s+=2):u=f,r.push([f,u]),u<65||f>122||(u<65||f>90||r.push([32|Math.max(65,f),32|Math.min(u,90)]),u<97||f>122||r.push([-33&Math.max(97,f),-33&Math.min(u,122)]))}r.sort(function(e,t){return e[0]-t[0]||t[1]-e[1]});var p=[],d=[NaN,NaN];for(s=0;s<r.length;++s){(g=r[s])[0]<=d[1]+1?d[1]=Math.max(d[1],g[1]):p.push(d=g)}var h=["["];a&&h.push("^"),h.push.apply(h,n);for(s=0;s<p.length;++s){var g=p[s];h.push(l(g[0])),g[1]>g[0]&&(g[1]+1>g[0]&&h.push("-"),h.push(l(g[1])))}return h.push("]"),h.join("")}function c(e){for(var r=e.source.match(new RegExp("(?:\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]|\\\\u[A-Fa-f0-9]{4}|\\\\x[A-Fa-f0-9]{2}|\\\\[0-9]+|\\\\[^ux0-9]|\\(\\?[:!=]|[\\(\\)\\^]|[^\\x5B\\x5C\\(\\)\\^]+)","g")),a=r.length,s=[],i=0,l=0;i<a;++i){if("("===(u=r[i]))++l;else if("\\"===u.charAt(0)){(c=+u.substring(1))&&c<=l&&(s[c]=-1)}}for(i=1;i<s.length;++i)-1===s[i]&&(s[i]=++t);for(i=0,l=0;i<a;++i){if("("===(u=r[i]))void 0===s[++l]&&(r[i]="(?:");else if("\\"===u.charAt(0)){var c;(c=+u.substring(1))&&c<=l&&(r[i]="\\"+s[l])}}for(i=0,l=0;i<a;++i)"^"===r[i]&&"^"!==r[i+1]&&(r[i]="");if(e.ignoreCase&&n)for(i=0;i<a;++i){var u,f=(u=r[i]).charAt(0);u.length>=2&&"["===f?r[i]=o(u):"\\"!==f&&(r[i]=u.replace(/[a-zA-Z]/g,function(e){var t=e.charCodeAt(0);return"["+String.fromCharCode(-33&t,32|t)+"]"}))}return r.join("")}var u=[];for(a=0,s=e.length;a<s;++a){var f;if((f=e[a]).global||f.multiline)throw new Error(""+f);u.push("(?:"+c(f)+")")}return new RegExp(u.join("|"),r?"gi":"g")}var z=null;function D(e){if(null===z){var t=document.createElement("PRE");t.appendChild(document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />')),z=!/</.test(t.innerHTML)}if(z){var n=e.innerHTML;return $(e)?n=C(n):function(e,t){if("PRE"===e.tagName)return!0;if(!L.test(t))return!0;var n="";return e.currentStyle?n=e.currentStyle.whiteSpace:window.getComputedStyle&&(n=window.getComputedStyle(e,null).whiteSpace),!n||"pre"===n}(e,n)||(n=n.replace(/(<br\s*\/?>)[\r\n]+/g,"$1").replace(/(?:[\r\n]+[ \t]*)+/g," ")),n}for(var r=[],a=e.firstChild;a;a=a.nextSibling)I(a,r);return r.join("")}var H=new RegExp("[^<]+|\x3c!--[\\s\\S]*?--\x3e|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>|</?[a-zA-Z](?:[^>\"']|'[^']*'|\"[^\"]*\")*>|<","g"),j=/^<\!--/,B=/^<!\[CDATA\[/,M=/^<br\b/i,U=/^<(\/?)([a-zA-Z][a-zA-Z0-9]*)/;function q(e,t,n,r){if(t){var a={source:t,basePos:e};n(a),r.push.apply(r,a.decorations)}}function F(e,t){var n,r={};!function(){for(var a=e.concat(t),s=[],i={},l=0,o=a.length;l<o;++l){var c=a[l],u=c[3];if(u)for(var f=u.length;--f>=0;)r[u.charAt(f)]=c;var p=c[1],d=""+p;i.hasOwnProperty(d)||(s.push(p),i[d]=null)}s.push(/[\0-\uffff]/),n=O(s)}();var a=t.length,s=function(e){for(var i=e.source,l=e.basePos,o=[l,m],c=0,u=i.match(n)||[],f={},p=0,d=u.length;p<d;++p){var h,g=u[p],w=f[g],b=void 0;if("string"==typeof w)h=!1;else{var y=r[g.charAt(0)];if(y)b=g.match(y[1]),w=y[0];else{for(var x=0;x<a;++x)if(y=t[x],b=g.match(y[1])){w=y[0];break}b||(w=m)}!(h=w.length>=5&&"lang-"===w.substring(0,5))||b&&"string"==typeof b[1]||(h=!1,w=v),h||(f[g]=w)}var S=c;if(c+=g.length,h){var N=b[1],C=g.indexOf(N),_=C+N.length;b[2]&&(C=(_=g.length-b[2].length)-N.length);var k=w.substring(5);q(l+S,g.substring(0,C),s,o),q(l+S+C,N,Q(k,N),o),q(l+S+_,g.substring(_),s,o)}else o.push(l+S,w)}e.decorations=o};return s}function G(e){var t=[],n=[];if(e.tripleQuotedStrings?t.push([u,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,null,"'\""]):e.multiLineStrings?t.push([u,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):t.push([u,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]),e.verbatimStrings&&n.push([u,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]),e.hashComments&&(e.cStyleComments?(t.push([p,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]),n.push([u,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,null])):t.push([p,/^#[^\r\n]*/,null,"#"])),e.cStyleComments&&(n.push([p,/^\/\/[^\r\n]*/,null]),n.push([p,/^\/\*[\s\S]*?(?:\*\/|$)/,null])),e.regexLiterals){n.push(["lang-regex",new RegExp("^"+b+"(/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/)")])}var r=e.keywords.replace(/^\s+|\s+$/g,"");return r.length&&n.push([f,new RegExp("^(?:"+r.replace(/\s+/g,"|")+")\\b"),null]),t.push([m,/^\s+/,null," \r\n\t "]),n.push([h,/^@[a-z_$][a-z_$@0-9]*/i,null],[d,/^@?[A-Z]+[a-z][A-Za-z_$@0-9]*/,null],[m,/^[a-z_$][a-z_$@0-9]*/i,null],[h,new RegExp("^(?:0x[a-f0-9]+|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)(?:e[+\\-]?\\d+)?)[a-z]*","i"),null,"0123456789"],[g,/^.[^\s\w\.$@\'\"\`\/\#]*/,null]),F(t,n)}var Z=G({keywords:"break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof alignof align_union asm axiom bool concept concept_map const_cast constexpr decltype dynamic_cast explicit export friend inline late_check mutable namespace nullptr reinterpret_cast static_assert static_cast template typeid typename using virtual wchar_t where break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof abstract boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient as base by checked decimal delegate descending event fixed foreach from group implicit in interface internal into is lock object out override orderby params partial readonly ref sbyte sealed stackalloc string select uint ulong unchecked unsafe ushort var break continue do else for if return while auto case char const default double enum extern float goto int long register short signed sizeof static struct switch typedef union unsigned void volatile catch class delete false import new operator private protected public this throw true try typeof debugger eval export function get null set undefined var with Infinity NaN caller delete die do dump elsif eval exit foreach for goto if import last local my next no our print package redo require sub undef unless until use wantarray while BEGIN END break continue do else for if return while and as assert class def del elif except exec finally from global import in is lambda nonlocal not or pass print raise try with yield False True None break continue do else for if return while alias and begin case class def defined elsif end ensure false in module next nil not or redo rescue retry self super then true undef unless until when yield BEGIN END break continue do else for if return while case done elif esac eval fi function in local set then until ",hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0});var W={};function Y(e,t){for(var n=t.length;--n>=0;){var r=t[n];W.hasOwnProperty(r)?"console"in window&&console.warn("cannot override language handler %s",r):W[r]=e}}function Q(e,t){return e&&W.hasOwnProperty(e)||(e=/^\s*</.test(t)?"default-markup":"default-code"),W[e]}function V(e){var t=e.sourceCodeHtml,n=e.langExtension;e.prettyPrintedHtml=t;try{var r=function(e){var t=e.match(H),n=[],r=0,a=[];if(t)for(var s=0,i=t.length;s<i;++s){var l=t[s];if(l.length>1&&"<"===l.charAt(0)){if(j.test(l))continue;if(B.test(l))n.push(l.substring(9,l.length-3)),r+=l.length-12;else if(M.test(l))n.push("\n"),++r;else if(l.indexOf(w)>=0&&l.replace(/\s(\w+)\s*=\s*(?:\"([^\"]*)\"|'([^\']*)'|(\S+))/g,' $1="$2$3$4"').match(/[cC][lL][aA][sS][sS]=\"[^\"]*\bnocode\b/)){var o,c=l.match(U)[2],u=1;e:for(o=s+1;o<i;++o){var f=t[o].match(U);if(f&&f[2]===c)if("/"===f[1]){if(0==--u)break e}else++u}o<i?(a.push(r,t.slice(s,o+1).join("")),s=o):a.push(r,l)}else a.push(r,l)}else{var p=T(l);n.push(p),r+=p.length}}return{source:n.join(""),tags:a}}(t),a=r.source;e.source=a,e.basePos=0,e.extractedTags=r.tags,Q(n,a)(e),function(e){var t,n,r,a=e.source,s=e.extractedTags,i=e.decorations,l=[],o=0,c=null,u=null,f=0,p=0,d=(t=window.PR_TAB_WIDTH,n=0,function(e){for(var r=null,a=0,s=0,i=e.length;s<i;++s)switch(e.charAt(s)){case"\t":r||(r=[]),r.push(e.substring(a,s));var l=t-n%t;for(n+=l;l>=0;l-="                ".length)r.push("                ".substring(0,l));a=s+1;break;case"\n":n=0;break;default:++n}return r?(r.push(e.substring(a)),r.join("")):e}),h=/([\r\n ]) /g,g=/(^| ) /gm,m=/\r\n?|\n/g,v=/[ \r\n]$/,w=!0,b=window._pr_isIE6(),y=b?"PRE"===e.sourceNode.tagName?6===b?"&#160;\r\n":7===b?"&#160;<br>\r":"&#160;\r":"&#160;<br />":"<br />",x=e.sourceNode.className.match(/\blinenums\b(?::(\d+))?/);if(x){for(var S=[],N=0;N<10;++N)S[N]=y+'</li><li class="L'+N+'">';var _=x[1]&&x[1].length?x[1]-1:0;l.push('<ol class="linenums"><li class="L',_%10,'"'),_&&l.push(' value="',_+1,'"'),l.push(">"),r=function(){var e=S[++_%10];return c?"</span>"+e+'<span class="'+c+'">':e}}else r=y;function k(e){if(e>o){c&&c!==u&&(l.push("</span>"),c=null),!c&&u&&(c=u,l.push('<span class="',c,'">'));var t=C(d(a.substring(o,e))).replace(w?g:h,"$1&#160;");w=v.test(t),l.push(t.replace(m,r)),o=e}}for(;;){if(f<s.length&&(!(p<i.length)||s[f]<=i[p]))k(s[f]),c&&(l.push("</span>"),c=null),l.push(s[f+1]),f+=2;else{if(!(p<i.length))break;k(i[p]),u=i[p+1],p+=2}}k(a.length),c&&l.push("</span>"),x&&l.push("</li></ol>"),e.prettyPrintedHtml=l.join("")}(e)}catch(e){"console"in window&&console.log(e&&e.stack?e.stack:e)}}Y(Z,["default-code"]),Y(F([],[[m,/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],[p,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[g,/^(?:<[%?]|[%?]>)/],["lang-",/^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],["lang-js",/^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],["lang-css",/^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]),["default-markup","htm","html","mxml","xhtml","xml","xsl"]),Y(F([[m,/^[\s]+/,null," \t\r\n"],["atv",/^(?:\"[^\"]*\"?|\'[^\']*\'?)/,null,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],[g,/^[=<>\/]+/],["lang-js",/^on\w+\s*=\s*\"([^\"]+)\"/i],["lang-js",/^on\w+\s*=\s*\'([^\']+)\'/i],["lang-js",/^on\w+\s*=\s*([^\"\'>\s]+)/i],["lang-css",/^style\s*=\s*\"([^\"]+)\"/i],["lang-css",/^style\s*=\s*\'([^\']+)\'/i],["lang-css",/^style\s*=\s*([^\"\'>\s]+)/i]]),["in.tag"]),Y(F([],[["atv",/^[\s\S]+/]]),["uq.val"]),Y(G({keywords:n,hashComments:!0,cStyleComments:!0}),["c","cc","cpp","cxx","cyc","m"]),Y(G({keywords:"null true false"}),["json"]),Y(G({keywords:a,hashComments:!0,cStyleComments:!0,verbatimStrings:!0}),["cs"]),Y(G({keywords:r,cStyleComments:!0}),["java"]),Y(G({keywords:c,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]),Y(G({keywords:l,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),["cv","py"]),Y(G({keywords:i,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]),Y(G({keywords:o,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]),Y(G({keywords:s,cStyleComments:!0,regexLiterals:!0}),["js"]),Y(F([],[[u,/^[\s\S]+/]]),["regex"]),window.PR_normalizedHtml=I,window.prettyPrintOne=function(e,t){var n={sourceCodeHtml:e,langExtension:t};return V(n),n.prettyPrintedHtml},window.prettyPrint=function(e){function t(e){return document.getElementsByTagName(e)}for(var n=[t("pre"),t("code"),t("xmp")],r=[],a=0;a<n.length;++a)for(var s=0,i=n[a].length;s<i;++s)r.push(n[a][s]);n=null;var l=Date;l.now||(l={now:function(){return(new Date).getTime()}});var o,c=0;function u(){var e=o.prettyPrintedHtml;if(e){var t=o.sourceNode;if($(t)){for(var n=document.createElement("PRE"),r=0;r<t.attributes.length;++r){var a=t.attributes[r];if(a.specified)"class"===a.name.toLowerCase()?n.className=a.value:n.setAttribute(a.name,a.value)}n.innerHTML=e,t.parentNode.replaceChild(n,t),t=n}else t.innerHTML=e}}!function t(){for(var n=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:1/0;c<r.length&&l.now()<n;c++){var a=r[c];if(a.className&&a.className.indexOf("prettyprint")>=0){var s=a.className.match(/\blang-(\w+)\b/);s&&(s=s[1]);for(var i=!1,f=a.parentNode;f;f=f.parentNode)if(("pre"===f.tagName||"code"===f.tagName||"xmp"===f.tagName)&&f.className&&f.className.indexOf("prettyprint")>=0){i=!0;break}if(a.className&&a.className.indexOf("prettyprint-has")>=0&&(i=!0),!i){var p=D(a);p=p.replace(/(?:\r\n?|\n)$/,""),V(o={sourceCodeHtml:p,langExtension:s,sourceNode:a}),u(),a.className+=" prettyprint-has"}}}c<r.length?setTimeout(t,250):e&&e()}()},window.PR={combinePrefixPatterns:O,createSimpleLexer:F,registerLangHandler:Y,sourceDecorator:G,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:p,PR_DECLARATION:"dec",PR_KEYWORD:f,PR_LITERAL:h,PR_NOCODE:w,PR_PLAIN:m,PR_PUNCTUATION:g,PR_SOURCE:v,PR_STRING:u,PR_TAG:"tag",PR_TYPE:d}}();
    2 | 
    
    
    --------------------------------------------------------------------------------
    /scripts/jquery.syntaxhighlighter.js:
    --------------------------------------------------------------------------------
      1 | /**
      2 |  * @depends nothing
      3 |  * @name core.console
      4 |  * @package jquery-sparkle {@link https://balupton.com/projects/jquery-sparkle}
      5 |  */
      6 | 
      7 | /**
      8 |  * Console Emulator
      9 |  * We have to convert arguments into arrays, and do this explicitly as webkit (chrome) hates function references, and arguments cannot be passed as is
     10 |  * @version 1.0.3
     11 |  * @date August 31, 2010
     12 |  * @since 0.1.0-dev, December 01, 2009
     13 |  * @package jquery-sparkle {@link https://balupton.com/projects/jquery-sparkle}
     14 |  * @author Benjamin "balupton" Lupton {@link http://balupton.com}
     15 |  * @copyright (c) 2009+ Benjamin Arthur Lupton {@link https://balupton.com}
     16 |  * @license MIT License {@link https://spdx.org/licenses/MIT.html}
     17 |  */
     18 | 
     19 | // Check to see if console exists, if not define it
     20 | if (typeof window.console === 'undefined') {
     21 | 	window.console = {}
     22 | }
     23 | 
     24 | // Check to see if we have emulated the console yet
     25 | if (typeof window.console.emulated === 'undefined') {
     26 | 	// Emulate Log
     27 | 	if (typeof window.console.log === 'function') {
     28 | 		window.console.hasLog = true
     29 | 	} else {
     30 | 		if (typeof window.console.log === 'undefined') {
     31 | 			window.console.log = function() {}
     32 | 		}
     33 | 		window.console.hasLog = false
     34 | 	}
     35 | 
     36 | 	// Emulate Debug
     37 | 	if (typeof window.console.debug === 'function') {
     38 | 		window.console.hasDebug = true
     39 | 	} else {
     40 | 		if (typeof window.console.debug === 'undefined') {
     41 | 			window.console.debug = !window.console.hasLog
     42 | 				? function() {}
     43 | 				: function() {
     44 | 						var arr = ['console.debug:']
     45 | 						for (var i = 0; i < arguments.length; i++) {
     46 | 							arr.push(arguments[i])
     47 | 						}
     48 | 						window.console.log.apply(window.console, arr)
     49 | 				  }
     50 | 		}
     51 | 		window.console.hasDebug = false
     52 | 	}
     53 | 
     54 | 	// Emulate Warn
     55 | 	if (typeof window.console.warn === 'function') {
     56 | 		window.console.hasWarn = true
     57 | 	} else {
     58 | 		if (typeof window.console.warn === 'undefined') {
     59 | 			window.console.warn = !window.console.hasLog
     60 | 				? function() {}
     61 | 				: function() {
     62 | 						var arr = ['console.warn:']
     63 | 						for (var i = 0; i < arguments.length; i++) {
     64 | 							arr.push(arguments[i])
     65 | 						}
     66 | 						window.console.log.apply(window.console, arr)
     67 | 				  }
     68 | 		}
     69 | 		window.console.hasWarn = false
     70 | 	}
     71 | 
     72 | 	// Emulate Error
     73 | 	if (typeof window.console.error === 'function') {
     74 | 		window.console.hasError = true
     75 | 	} else {
     76 | 		if (typeof window.console.error === 'undefined') {
     77 | 			window.console.error = function() {
     78 | 				var msg = 'An error has occured.'
     79 | 
     80 | 				// Log
     81 | 				if (window.console.hasLog) {
     82 | 					var arr = ['console.error:']
     83 | 					for (var i = 0; i < arguments.length; i++) {
     84 | 						arr.push(arguments[i])
     85 | 					}
     86 | 					window.console.log.apply(window.console, arr)
     87 | 					// Adjust Message
     88 | 					msg =
     89 | 						"An error has occured. More information is available in your browser's javascript console."
     90 | 				}
     91 | 
     92 | 				// Prepare Arguments
     93 | 				for (var i = 0; i < arguments.length; ++i) {
     94 | 					if (typeof arguments[i] !== 'string') {
     95 | 						break
     96 | 					}
     97 | 					msg += '\n' + arguments[i]
     98 | 				}
     99 | 
    100 | 				// Throw Error
    101 | 				if (typeof Error !== 'undefined') {
    102 | 					throw new Error(msg)
    103 | 				} else {
    104 | 					throw msg
    105 | 				}
    106 | 			}
    107 | 		}
    108 | 		window.console.hasError = false
    109 | 	}
    110 | 
    111 | 	// Emulate Trace
    112 | 	if (typeof window.console.trace === 'function') {
    113 | 		window.console.hasTrace = true
    114 | 	} else {
    115 | 		if (typeof window.console.trace === 'undefined') {
    116 | 			window.console.trace = function() {
    117 | 				window.console.error('console.trace does not exist')
    118 | 			}
    119 | 		}
    120 | 		window.console.hasTrace = false
    121 | 	}
    122 | 
    123 | 	// Done
    124 | 	window.console.emulated = true
    125 | }
    126 | /**
    127 |  * @depends jquery
    128 |  * @name jquery.appendscriptstyle
    129 |  * @package jquery-sparkle {@link https://balupton.com/projects/jquery-sparkle}
    130 |  */
    131 | 
    132 | /**
    133 |  * jQuery Aliaser
    134 |  */
    135 | ;(function($) {
    136 | 	/**
    137 | 	 * Append a Stylesheet to the DOM
    138 | 	 * @version 1.1.0
    139 | 	 * @date July 23, 2010
    140 | 	 * @since 1.0.0, June 30, 2010
    141 | 	 * @package jquery-sparkle {@link https://balupton.com/projects/jquery-sparkle}
    142 | 	 * @author Benjamin "balupton" Lupton {@link http://balupton.com}
    143 | 	 * @copyright (c) 2009+ Benjamin Arthur Lupton {@link https://balupton.com}
    144 | 	 * @license MIT License {@link https://spdx.org/licenses/MIT.html}
    145 | 	 */
    146 | 	$.appendStylesheet =
    147 | 		$.appendStylesheet ||
    148 | 		function(url, overwrite) {
    149 | 			// Check
    150 | 			if (!(document.body || false)) {
    151 | 				setTimeout(function() {
    152 | 					$.appendStylesheet.apply($, [url, overwrite])
    153 | 				}, 500)
    154 | 				// Chain
    155 | 				return $
    156 | 			}
    157 | 
    158 | 			// Prepare
    159 | 			var id = 'stylesheet-' + url.replace(/[^a-zA-Z0-9]/g, '')
    160 | 			var $old = $('#' + id)
    161 | 			if (typeof overwrite === 'undefined') {
    162 | 				overwrite = false
    163 | 			}
    164 | 
    165 | 			// Check
    166 | 			if ($old.length === 1) {
    167 | 				if (overwrite) {
    168 | 					$old.remove()
    169 | 				} else {
    170 | 					// Chain
    171 | 					return $
    172 | 				}
    173 | 			}
    174 | 
    175 | 			// Create
    176 | 			var bodyEl = document.getElementsByTagName(
    177 | 				$.browser.safari ? 'head' : 'body'
    178 | 			)[0]
    179 | 			var linkEl = document.createElement('link')
    180 | 			linkEl.type = 'text/css'
    181 | 			linkEl.rel = 'stylesheet'
    182 | 			linkEl.media = 'screen'
    183 | 			linkEl.href = url
    184 | 			linkEl.id = id
    185 | 			bodyEl.appendChild(linkEl)
    186 | 
    187 | 			// Chain
    188 | 			return $
    189 | 		}
    190 | 
    191 | 	/**
    192 | 	 * Append a Script to the DOM
    193 | 	 * @version 1.1.0
    194 | 	 * @date July 23, 2010
    195 | 	 * @since 1.0.0, June 30, 2010
    196 | 	 * @package jquery-sparkle {@link https://balupton.com/projects/jquery-sparkle}
    197 | 	 * @author Benjamin "balupton" Lupton {@link http://balupton.com}
    198 | 	 * @copyright (c) 2009+ Benjamin Arthur Lupton {@link https://balupton.com}
    199 | 	 * @license MIT License {@link https://spdx.org/licenses/MIT.html}
    200 | 	 */
    201 | 	$.appendScript =
    202 | 		$.appendScript ||
    203 | 		function(url, overwrite) {
    204 | 			// Check
    205 | 			if (!(document.body || false)) {
    206 | 				setTimeout(function() {
    207 | 					$.appendScript.apply($, [url, overwrite])
    208 | 				}, 500)
    209 | 				// Chain
    210 | 				return $
    211 | 			}
    212 | 
    213 | 			// Prepare
    214 | 			var id = 'script-' + url.replace(/[^a-zA-Z0-9]/g, '')
    215 | 			var $old = $('#' + id)
    216 | 			if (typeof overwrite === 'undefined') {
    217 | 				overwrite = false
    218 | 			}
    219 | 
    220 | 			// Check
    221 | 			if ($old.length === 1) {
    222 | 				if (overwrite) {
    223 | 					$old.remove()
    224 | 				} else {
    225 | 					// Chain
    226 | 					return $
    227 | 				}
    228 | 			}
    229 | 
    230 | 			// Create
    231 | 			var bodyEl = document.getElementsByTagName(
    232 | 				$.browser.safari ? 'head' : 'body'
    233 | 			)[0]
    234 | 			var scriptEl = document.createElement('script')
    235 | 			scriptEl.type = 'text/javascript'
    236 | 			scriptEl.src = url
    237 | 			scriptEl.id = id
    238 | 			bodyEl.appendChild(scriptEl)
    239 | 
    240 | 			// Chain
    241 | 			return $
    242 | 		}
    243 | })(jQuery)
    244 | /**
    245 |  * @depends core.console, jquery, jquery.appendscriptstyle
    246 |  * @name jquery.syntaxhighlighter
    247 |  * @package jquery-syntaxhighlighter {@link https://balupton.com/projects/jquery-syntaxhighlighter}
    248 |  */
    249 | 
    250 | /**
    251 |  * jQuery Aliaser
    252 |  */
    253 | ;(function($) {
    254 | 	/**
    255 | 	 * Get all elements within ourself which match the selector, and include ourself in the search
    256 | 	 * @version 1.0.0
    257 | 	 * @date June 30, 2010
    258 | 	 * @package jquery-sparkle {@link https://balupton.com/projects/jquery-sparkle}
    259 | 	 * @author Benjamin "balupton" Lupton {@link http://balupton.com}
    260 | 	 * @copyright (c) 2009+ Benjamin Arthur Lupton {@link https://balupton.com}
    261 | 	 * @license MIT License {@link https://spdx.org/licenses/MIT.html}
    262 | 	 */
    263 | 	$.fn.findAndSelf =
    264 | 		$.fn.findAndSelf ||
    265 | 		function(selector) {
    266 | 			var $this = $(this)
    267 | 			return $this
    268 | 				.find(selector)
    269 | 				.andSelf()
    270 | 				.filter(selector)
    271 | 		}
    272 | 
    273 | 	/**
    274 | 	 * Add the String replace method to the Number prototype
    275 | 	 * This is to fix an error with jQuery v1.4.2 when $('#el').val() contains a numeric value on Firefox.
    276 | 	 * Error is here: http://getsatisfaction.com/balupton/topics/word_jumbles
    277 | 	 * @version 1.0.0
    278 | 	 * @date September 01, 2010
    279 | 	 * @package jquery-sparkle {@link https://balupton.com/projects/jquery-sparkle}
    280 | 	 * @author Benjamin "balupton" Lupton {@link http://balupton.com}
    281 | 	 * @copyright (c) 2009+ Benjamin Arthur Lupton {@link https://balupton.com}
    282 | 	 * @license MIT License {@link https://spdx.org/licenses/MIT.html}
    283 | 	 */
    284 | 	Number.prototype.replace =
    285 | 		Number.prototype.replace ||
    286 | 		function() {
    287 | 			var str = String(this)
    288 | 			return str.replace.apply(this, arguments)
    289 | 		}
    290 | 
    291 | 	/**
    292 | 	 * jQuery SyntaxHighlighter
    293 | 	 * @version 1.0.1-beta
    294 | 	 * @date August 16, 2010
    295 | 	 * @since 0.1.0-dev, July 23, 2010
    296 | 	 * @package jquery-syntaxhighlighter {@link https://balupton.com/projects/jquery-syntaxhighlighter}
    297 | 	 * @author Benjamin "balupton" Lupton {@link http://balupton.com}
    298 | 	 * @copyright (c) 2009+ Benjamin Arthur Lupton {@link https://balupton.com}
    299 | 	 * @license MIT License {@link https://spdx.org/licenses/MIT.html}
    300 | 	 */
    301 | 	if (!($.SyntaxHighlighter || false)) {
    302 | 		$.SyntaxHighlighter = {
    303 | 			// Configuration
    304 | 			config: {
    305 | 				/**
    306 | 				 * Whether or not we should load in Google Prettify automatically if it was not detected.
    307 | 				 */
    308 | 				load: true,
    309 | 
    310 | 				/**
    311 | 				 * Whether or not we should highlight all appropriate code blocks automatically once the page has finished loading.
    312 | 				 */
    313 | 				highlight: true,
    314 | 
    315 | 				/**
    316 | 				 * Whether or not we should output debug information in case something is not working correctly.
    317 | 				 */
    318 | 				debug: false,
    319 | 
    320 | 				/**
    321 | 				 * Whether or not we should wrap the code blocks lines, or have them scrollable.
    322 | 				 */
    323 | 				wrapLines: true,
    324 | 
    325 | 				/**
    326 | 				 * Whether or not we should display line numbers next to the code blocks.
    327 | 				 */
    328 | 				lineNumbers: true,
    329 | 
    330 | 				/**
    331 | 				 * Whether or not we should strip empty start and finish lines from the code blocks.
    332 | 				 */
    333 | 				stripEmptyStartFinishLines: true,
    334 | 
    335 | 				/**
    336 | 				 * Whether or not we should remove whitespaces/indentations which are only there for HTML formatting of our code block.
    337 | 				 */
    338 | 				stripInitialWhitespace: true,
    339 | 
    340 | 				/**
    341 | 				 * Whether or not we should alternate the lines background colours on odd and even rows.
    342 | 				 */
    343 | 				alternateLines: false,
    344 | 
    345 | 				/**
    346 | 				 * The default class to look for in case we have not explicitly specified a language.
    347 | 				 */
    348 | 				defaultClassname: 'highlight',
    349 | 
    350 | 				/**
    351 | 				 * The theme that should be used by our highlighted code blocks.
    352 | 				 */
    353 | 				theme: 'balupton',
    354 | 
    355 | 				/**
    356 | 				 * The themes to load in for use with our highlighted code blocks.
    357 | 				 */
    358 | 				themes: ['balupton'],
    359 | 
    360 | 				/**
    361 | 				 * Whether or not we should add a Syntax Highlighter Sparkle extension if jQuery Sparkle is detected.
    362 | 				 */
    363 | 				addSparkleExtension: true,
    364 | 
    365 | 				/**
    366 | 				 * The baseUrl to load Google's Prettify from.
    367 | 				 * This is used to load in Google's Prettify if the load option is true and it was not found.
    368 | 				 */
    369 | 				prettifyBaseUrl:
    370 | 					'https://bevry-archive.github.io/jquery-syntaxhighlighter/prettify',
    371 | 
    372 | 				/**
    373 | 				 * The baseUrl to load our Syntax Highlighter from.
    374 | 				 * This is used to load in the stylesheet and additional themes.
    375 | 				 */
    376 | 				baseUrl: 'https://bevry-archive.github.io/jquery-syntaxhighlighter'
    377 | 			},
    378 | 
    379 | 			// Init
    380 | 			init: function(options) {
    381 | 				// Prepare
    382 | 				var SyntaxHighlighter = this,
    383 | 					config = SyntaxHighlighter.config
    384 | 
    385 | 				// Fix baseUrl
    386 | 				var baseUrl = config.baseUrl
    387 | 				if (baseUrl[baseUrl.length - 1] === '/') {
    388 | 					config.baseUrl = baseUrl.substr(0, baseUrl.length - 2)
    389 | 				}
    390 | 				delete baseUrl
    391 | 
    392 | 				// Configure
    393 | 				$.extend(true, SyntaxHighlighter.config, options || {})
    394 | 
    395 | 				// Sparkle
    396 | 				if ($.Sparkle || (false && config.addSparkleExtension)) {
    397 | 					// Add Syntax Highlighter to Sparkle
    398 | 					$.Sparkle.addExtension('syntaxhighlighter', function() {
    399 | 						$(this).syntaxHighlight()
    400 | 					})
    401 | 				}
    402 | 
    403 | 				// Attach
    404 | 				$.fn.syntaxHighlight = $.fn.SyntaxHighlight = SyntaxHighlighter.fn
    405 | 
    406 | 				// Load
    407 | 				if (config.load) SyntaxHighlighter.load()
    408 | 
    409 | 				// Highlight
    410 | 				if (config.highlight) SyntaxHighlighter.highlight()
    411 | 
    412 | 				// Chain
    413 | 				return this
    414 | 			},
    415 | 
    416 | 			// Load
    417 | 			load: function() {
    418 | 				// Prepare
    419 | 				var SyntaxHighlighter = this,
    420 | 					config = SyntaxHighlighter.config,
    421 | 					prettifyBaseUrl = config.prettifyBaseUrl,
    422 | 					baseUrl = config.baseUrl,
    423 | 					themes = config.themes
    424 | 
    425 | 				// Append
    426 | 				if (!SyntaxHighlighter.loaded()) {
    427 | 					$.appendScript(prettifyBaseUrl + '/prettify.min.js')
    428 | 					$.appendStylesheet(prettifyBaseUrl + '/prettify.min.css')
    429 | 					$.appendStylesheet(baseUrl + '/styles/style.min.css')
    430 | 					$.each(themes, function(i, theme) {
    431 | 						$.appendStylesheet(baseUrl + '/styles/theme-' + theme + '.min.css')
    432 | 					})
    433 | 					if ($.browser.msie) {
    434 | 						$.appendStylesheet(baseUrl + '/styles/ie.min.css')
    435 | 					}
    436 | 					SyntaxHighlighter.loadedExtras = true
    437 | 				}
    438 | 
    439 | 				// Chain
    440 | 				return this
    441 | 			},
    442 | 
    443 | 			// Loaded Extras
    444 | 			loadedExtras: false,
    445 | 
    446 | 			// Loaded
    447 | 			loaded: function() {
    448 | 				return typeof prettyPrint !== 'undefined' && this.loadedExtras
    449 | 			},
    450 | 
    451 | 			// Determine Language
    452 | 			determineLanguage: function(css) {
    453 | 				// Prepare
    454 | 				var language = null,
    455 | 					regex = /lang(uage)?-([a-z0-9]+)/g,
    456 | 					match = regex.exec(css)
    457 | 
    458 | 				// Handle
    459 | 				while (match !== null) {
    460 | 					language = match[2]
    461 | 					match = regex.exec(css)
    462 | 				}
    463 | 
    464 | 				// Return langauge
    465 | 				return language
    466 | 			},
    467 | 
    468 | 			// jQuery Function
    469 | 			fn: function() {
    470 | 				// Prepare
    471 | 				var SyntaxHighlighter = $.SyntaxHighlighter,
    472 | 					config = SyntaxHighlighter.config,
    473 | 					$el = $(this)
    474 | 
    475 | 				// Highlight
    476 | 				$.SyntaxHighlighter.highlight({
    477 | 					el: $el
    478 | 				})
    479 | 
    480 | 				// Chain
    481 | 				return this
    482 | 			},
    483 | 
    484 | 			// Highlight
    485 | 			highlight: function(params) {
    486 | 				// Prepare
    487 | 				if (typeof params !== 'object') {
    488 | 					params = {}
    489 | 				}
    490 | 				var SyntaxHighlighter = this,
    491 | 					config = SyntaxHighlighter.config,
    492 | 					$el = params.el || false
    493 | 
    494 | 				// Adjust
    495 | 				if (!($el instanceof jQuery)) {
    496 | 					$el = $('body')
    497 | 				}
    498 | 
    499 | 				// Check
    500 | 				if (!SyntaxHighlighter.loaded()) {
    501 | 					if (config.debug)
    502 | 						window.console.debug(
    503 | 							'SyntaxHighlighter.highlight: Chosen SyntaxHighlighter is not yet defined. Waiting 1200 ms then trying again.'
    504 | 						)
    505 | 					setTimeout(function() {
    506 | 						SyntaxHighlighter.highlight.apply(SyntaxHighlighter, [params])
    507 | 					}, 1200)
    508 | 					return
    509 | 				}
    510 | 
    511 | 				// Prepare Classnames
    512 | 				var defaultClassname = config.defaultClassname,
    513 | 					defaultSelector = ''
    514 | 				if (typeof defaultClassname === 'array') {
    515 | 					defaultSelector = '.' + defaultClassname.join(',.')
    516 | 					defaultClassname = defaultClassname.join(' ')
    517 | 				} else {
    518 | 					defaultClassname = String(defaultClassname)
    519 | 					defaultSelector = '.' + defaultClassname.replace(' ', ',.')
    520 | 				}
    521 | 
    522 | 				// Check Classnames
    523 | 				if (defaultSelector === '.' || !defaultClassname) {
    524 | 					window.console.error(
    525 | 						'SyntaxHighlighter.highlight: Invalid defaultClassname.',
    526 | 						[this, arguments],
    527 | 						[config.defaultClassname]
    528 | 					)
    529 | 					window.console.trace()
    530 | 				}
    531 | 
    532 | 				// Fetch
    533 | 				var $codes = $el
    534 | 					.findAndSelf('code,pre')
    535 | 					.filter('[class*=lang],' + defaultSelector)
    536 | 					.filter(':not(.prettyprint)')
    537 | 
    538 | 				// Highlight
    539 | 				$codes
    540 | 					.css({
    541 | 						'overflow-y': 'visible',
    542 | 						'overflow-x': 'visible',
    543 | 						'white-space': 'pre'
    544 | 					})
    545 | 					.addClass('prettyprint ' + defaultClassname)
    546 | 					.each(function() {
    547 | 						// Prepare
    548 | 						var $code = $(this),
    549 | 							css = $code.attr('class'),
    550 | 							language = SyntaxHighlighter.determineLanguage(css)
    551 | 
    552 | 						// Language
    553 | 						$code.addClass('lang-' + language)
    554 | 					})
    555 | 
    556 | 				// WrapLines
    557 | 				if (config.lineNumbers) {
    558 | 					$codes.addClass('linenums')
    559 | 				}
    560 | 
    561 | 				// Theme
    562 | 				if (config.theme) {
    563 | 					$codes.addClass('theme-' + config.theme)
    564 | 				}
    565 | 
    566 | 				// AlternateLines
    567 | 				if (config.alternateLines) {
    568 | 					$codes.addClass('alternate')
    569 | 				}
    570 | 
    571 | 				// Fire
    572 | 				prettyPrint()
    573 | 
    574 | 				// Adjust HTML: stripEmptyStartFinishLines
    575 | 				// we have to do this here, as before prettyPrint IE has issues with newlines
    576 | 				if (config.stripEmptyStartFinishLines) {
    577 | 					$codes
    578 | 						.find('li:first-child > :first-child, li:last-child > :first-child')
    579 | 						.each(function() {
    580 | 							// Prepare
    581 | 							var $initialText = $(this),
    582 | 								html = $initialText.html(),
    583 | 								empty = /^([\r\n\s\t]|\&nbsp;)*$/.test(html),
    584 | 								$parent = $initialText.parent(),
    585 | 								$siblings = $initialText.siblings()
    586 | 
    587 | 							// Check
    588 | 							if (
    589 | 								empty &&
    590 | 								($siblings.length === 0 ||
    591 | 									($siblings.length === 1 &&
    592 | 										$siblings.filter(':last').is('br')))
    593 | 							) {
    594 | 								// Remove Line
    595 | 								var $parent = $initialText.parent(),
    596 | 									value = $parent.val()
    597 | 								$parent.next().val(value)
    598 | 								$parent.remove()
    599 | 							}
    600 | 						})
    601 | 				}
    602 | 
    603 | 				// Adjust HTML: stripInitialWhitespace
    604 | 				// we have to do this here, as before prettyPrint IE has issues with newlines
    605 | 				if (config.stripInitialWhitespace) {
    606 | 					$codes.find('li:first-child > :first-child').each(function() {
    607 | 						// Prepare
    608 | 						var $initialText = $(this),
    609 | 							html = $initialText.html(),
    610 | 							match = html.match(/^(([\r\n\s\t]|\&nbsp;)+)/) || [],
    611 | 							whitespace = match[1] || ''
    612 | 
    613 | 						// Check
    614 | 						if (whitespace.length) {
    615 | 							// Replace
    616 | 							$initialText
    617 | 								.parent()
    618 | 								.siblings()
    619 | 								.children(':first-child')
    620 | 								.add($initialText)
    621 | 								.each(function() {
    622 | 									// Prepare
    623 | 									var $nextText = $(this),
    624 | 										html = $nextText.html()
    625 | 									// Replace
    626 | 									html = html.replace(new RegExp('^' + whitespace, 'gm'), '')
    627 | 									// Apply
    628 | 									$nextText.html(html)
    629 | 								})
    630 | 						}
    631 | 					})
    632 | 				}
    633 | 
    634 | 				// Adjust Lines
    635 | 				if (config.wrapLines) {
    636 | 					$codes.css({
    637 | 						'overflow-x': 'hidden',
    638 | 						'overflow-y': 'hidden',
    639 | 						'white-space': 'pre-wrap',
    640 | 						'max-height': 'none'
    641 | 					})
    642 | 				} else {
    643 | 					$codes.css({
    644 | 						'overflow-x': 'auto',
    645 | 						'overflow-y': 'auto',
    646 | 						'white-space': 'normal',
    647 | 						'max-height': '500px'
    648 | 					})
    649 | 				}
    650 | 
    651 | 				// Chain
    652 | 				return this
    653 | 			}
    654 | 		}
    655 | 	} else {
    656 | 		window.console.warn('SyntaxHighlighter has already been defined...')
    657 | 	}
    658 | })(jQuery)
    659 | 
    
    
    --------------------------------------------------------------------------------
    /scripts/jquery.syntaxhighlighter.min.js:
    --------------------------------------------------------------------------------
    1 | void 0===window.console&&(window.console={}),void 0===window.console.emulated&&("function"==typeof window.console.log?window.console.hasLog=!0:(void 0===window.console.log&&(window.console.log=function(){}),window.console.hasLog=!1),"function"==typeof window.console.debug?window.console.hasDebug=!0:(void 0===window.console.debug&&(window.console.debug=window.console.hasLog?function(){for(var e=["console.debug:"],n=0;n<arguments.length;n++)e.push(arguments[n]);window.console.log.apply(window.console,e)}:function(){}),window.console.hasDebug=!1),"function"==typeof window.console.warn?window.console.hasWarn=!0:(void 0===window.console.warn&&(window.console.warn=window.console.hasLog?function(){for(var e=["console.warn:"],n=0;n<arguments.length;n++)e.push(arguments[n]);window.console.log.apply(window.console,e)}:function(){}),window.console.hasWarn=!1),"function"==typeof window.console.error?window.console.hasError=!0:(void 0===window.console.error&&(window.console.error=function(){var e="An error has occured.";if(window.console.hasLog){for(var n=["console.error:"],t=0;t<arguments.length;t++)n.push(arguments[t]);window.console.log.apply(window.console,n),e="An error has occured. More information is available in your browser's javascript console."}for(t=0;t<arguments.length&&"string"==typeof arguments[t];++t)e+="\n"+arguments[t];throw"undefined"!=typeof Error?new Error(e):e}),window.console.hasError=!1),"function"==typeof window.console.trace?window.console.hasTrace=!0:(void 0===window.console.trace&&(window.console.trace=function(){window.console.error("console.trace does not exist")}),window.console.hasTrace=!1),window.console.emulated=!0),function(e){e.appendStylesheet=e.appendStylesheet||function(n,t){if(!document.body)return setTimeout(function(){e.appendStylesheet.apply(e,[n,t])},500),e;var i="stylesheet-"+n.replace(/[^a-zA-Z0-9]/g,""),o=e("#"+i);if(void 0===t&&(t=!1),1===o.length){if(!t)return e;o.remove()}var r=document.getElementsByTagName(e.browser.safari?"head":"body")[0],s=document.createElement("link");return s.type="text/css",s.rel="stylesheet",s.media="screen",s.href=n,s.id=i,r.appendChild(s),e},e.appendScript=e.appendScript||function(n,t){if(!document.body)return setTimeout(function(){e.appendScript.apply(e,[n,t])},500),e;var i="script-"+n.replace(/[^a-zA-Z0-9]/g,""),o=e("#"+i);if(void 0===t&&(t=!1),1===o.length){if(!t)return e;o.remove()}var r=document.getElementsByTagName(e.browser.safari?"head":"body")[0],s=document.createElement("script");return s.type="text/javascript",s.src=n,s.id=i,r.appendChild(s),e}}(jQuery),function(e){e.fn.findAndSelf=e.fn.findAndSelf||function(n){return e(this).find(n).andSelf().filter(n)},Number.prototype.replace=Number.prototype.replace||function(){var e=String(this);return e.replace.apply(this,arguments)},e.SyntaxHighlighter?window.console.warn("SyntaxHighlighter has already been defined..."):e.SyntaxHighlighter={config:{load:!0,highlight:!0,debug:!1,wrapLines:!0,lineNumbers:!0,stripEmptyStartFinishLines:!0,stripInitialWhitespace:!0,alternateLines:!1,defaultClassname:"highlight",theme:"balupton",themes:["balupton"],addSparkleExtension:!0,prettifyBaseUrl:"https://bevry-archive.github.io/jquery-syntaxhighlighter/prettify",baseUrl:"https://bevry-archive.github.io/jquery-syntaxhighlighter"},init:function(n){var t=this.config,i=t.baseUrl;return"/"===i[i.length-1]&&(t.baseUrl=i.substr(0,i.length-2)),delete i,e.extend(!0,this.config,n||{}),e.Sparkle&&e.Sparkle.addExtension("syntaxhighlighter",function(){e(this).syntaxHighlight()}),e.fn.syntaxHighlight=e.fn.SyntaxHighlight=this.fn,t.load&&this.load(),t.highlight&&this.highlight(),this},load:function(){var n=this.config,t=n.prettifyBaseUrl,i=n.baseUrl,o=n.themes;return this.loaded()||(e.appendScript(t+"/prettify.min.js"),e.appendStylesheet(t+"/prettify.min.css"),e.appendStylesheet(i+"/styles/style.min.css"),e.each(o,function(n,t){e.appendStylesheet(i+"/styles/theme-"+t+".min.css")}),e.browser.msie&&e.appendStylesheet(i+"/styles/ie.min.css"),this.loadedExtras=!0),this},loadedExtras:!1,loaded:function(){return"undefined"!=typeof prettyPrint&&this.loadedExtras},determineLanguage:function(e){for(var n=null,t=/lang(uage)?-([a-z0-9]+)/g,i=t.exec(e);null!==i;)n=i[2],i=t.exec(e);return n},fn:function(){e.SyntaxHighlighter.config;var n=e(this);return e.SyntaxHighlighter.highlight({el:n}),this},highlight:function(n){"object"!=typeof n&&(n={});var t=this,i=t.config,o=n.el||!1;if(o instanceof jQuery||(o=e("body")),!t.loaded())return i.debug&&window.console.debug("SyntaxHighlighter.highlight: Chosen SyntaxHighlighter is not yet defined. Waiting 1200 ms then trying again."),void setTimeout(function(){t.highlight.apply(t,[n])},1200);var r=i.defaultClassname,s="";"array"==typeof r?(s="."+r.join(",."),r=r.join(" ")):s="."+(r=String(r)).replace(" ",",."),"."!==s&&r||(window.console.error("SyntaxHighlighter.highlight: Invalid defaultClassname.",[this,arguments],[i.defaultClassname]),window.console.trace());var a=o.findAndSelf("code,pre").filter("[class*=lang],"+s).filter(":not(.prettyprint)");return a.css({"overflow-y":"visible","overflow-x":"visible","white-space":"pre"}).addClass("prettyprint "+r).each(function(){var n=e(this),i=n.attr("class"),o=t.determineLanguage(i);n.addClass("lang-"+o)}),i.lineNumbers&&a.addClass("linenums"),i.theme&&a.addClass("theme-"+i.theme),i.alternateLines&&a.addClass("alternate"),prettyPrint(),i.stripEmptyStartFinishLines&&a.find("li:first-child > :first-child, li:last-child > :first-child").each(function(){var n=e(this),t=n.html(),i=/^([\r\n\s\t]|\&nbsp;)*$/.test(t),o=n.parent(),r=n.siblings();if(i&&(0===r.length||1===r.length&&r.filter(":last").is("br"))){var s=(o=n.parent()).val();o.next().val(s),o.remove()}}),i.stripInitialWhitespace&&a.find("li:first-child > :first-child").each(function(){var n=e(this),t=(n.html().match(/^(([\r\n\s\t]|\&nbsp;)+)/)||[])[1]||"";t.length&&n.parent().siblings().children(":first-child").add(n).each(function(){var n=e(this),i=n.html();i=i.replace(new RegExp("^"+t,"gm"),""),n.html(i)})}),i.wrapLines?a.css({"overflow-x":"hidden","overflow-y":"hidden","white-space":"pre-wrap","max-height":"none"}):a.css({"overflow-x":"auto","overflow-y":"auto","white-space":"normal","max-height":"500px"}),this}}}(jQuery);
    2 | 
    
    
    --------------------------------------------------------------------------------
    /scripts/resources/core.console.js:
    --------------------------------------------------------------------------------
      1 | /**
      2 |  * @depends nothing
      3 |  * @name core.console
      4 |  * @package jquery-sparkle {@link http://balupton.com/projects/jquery-sparkle}
      5 |  */
      6 | 
      7 | /**
      8 |  * Console Emulator
      9 |  * We have to convert arguments into arrays, and do this explicitly as webkit (chrome) hates function references, and arguments cannot be passed as is
     10 |  * @version 1.0.3
     11 |  * @date August 31, 2010
     12 |  * @since 0.1.0-dev, December 01, 2009
     13 |  * @package jquery-sparkle {@link http://balupton.com/projects/jquery-sparkle}
     14 |  * @author Benjamin "balupton" Lupton {@link http://balupton.com}
     15 |  * @copyright (c) 2009-2010 Benjamin Arthur Lupton {@link http://balupton.com}
     16 |  * @license MIT License {@link http://creativecommons.org/licenses/MIT/}
     17 |  */
     18 | 
     19 | // Check to see if console exists, if not define it
     20 | if ( typeof window.console === 'undefined' ) {
     21 | 	window.console = {};
     22 | }
     23 | 
     24 | // Check to see if we have emulated the console yet
     25 | if ( typeof window.console.emulated === 'undefined' ) {
     26 | 	// Emulate Log
     27 | 	if ( typeof window.console.log === 'function' ) {
     28 | 		window.console.hasLog = true;
     29 | 	}
     30 | 	else {
     31 | 		if ( typeof window.console.log === 'undefined' ) {
     32 | 			window.console.log = function(){};
     33 | 		}
     34 | 		window.console.hasLog = false;
     35 | 	}
     36 | 
     37 | 	// Emulate Debug
     38 | 	if ( typeof window.console.debug === 'function' ) {
     39 | 		window.console.hasDebug = true;
     40 | 	}
     41 | 	else {
     42 | 		if ( typeof window.console.debug === 'undefined' ) {
     43 | 			window.console.debug = !window.console.hasLog ? function(){} : function(){
     44 | 				var arr = ['console.debug:']; for(var i = 0; i < arguments.length; i++) { arr.push(arguments[i]); };
     45 | 		    	window.console.log.apply(window.console, arr);
     46 | 			};
     47 | 		}
     48 | 		window.console.hasDebug = false;
     49 | 	}
     50 | 
     51 | 	// Emulate Warn
     52 | 	if ( typeof window.console.warn === 'function' ) {
     53 | 		window.console.hasWarn = true;
     54 | 	}
     55 | 	else {
     56 | 		if ( typeof window.console.warn === 'undefined' ) {
     57 | 			window.console.warn = !window.console.hasLog ? function(){} : function(){
     58 | 				var arr = ['console.warn:']; for(var i = 0; i < arguments.length; i++) { arr.push(arguments[i]); };
     59 | 		    	window.console.log.apply(window.console, arr);
     60 | 			};
     61 | 		}
     62 | 		window.console.hasWarn = false;
     63 | 	}
     64 | 
     65 | 	// Emulate Error
     66 | 	if ( typeof window.console.error === 'function' ) {
     67 | 		window.console.hasError = true;
     68 | 	}
     69 | 	else {
     70 | 		if ( typeof window.console.error === 'undefined' ) {
     71 | 			window.console.error = function(){
     72 | 				var msg = "An error has occured.";
     73 | 
     74 | 				// Log
     75 | 				if ( window.console.hasLog ) {
     76 | 					var arr = ['console.error:']; for(var i = 0; i < arguments.length; i++) { arr.push(arguments[i]); };
     77 | 		    		window.console.log.apply(window.console, arr);
     78 | 					// Adjust Message
     79 | 					msg = 'An error has occured. More information is available in your browser\'s javascript console.'
     80 | 				}
     81 | 
     82 | 				// Prepare Arguments
     83 | 				for ( var i = 0; i < arguments.length; ++i ) {
     84 | 					if ( typeof arguments[i] !== 'string' ) {
     85 | 						break;
     86 | 					}
     87 | 					msg += "\n"+arguments[i];
     88 | 				}
     89 | 
     90 | 				// Throw Error
     91 | 				if ( typeof Error !== 'undefined' ) {
     92 | 					throw new Error(msg);
     93 | 				}
     94 | 				else {
     95 | 					throw(msg);
     96 | 				}
     97 | 			};
     98 | 		}
     99 | 		window.console.hasError = false;
    100 | 	}
    101 | 
    102 | 	// Emulate Trace
    103 | 	if ( typeof window.console.trace === 'function' ) {
    104 | 		window.console.hasTrace = true;
    105 | 	}
    106 | 	else {
    107 | 		if ( typeof window.console.trace === 'undefined' ) {
    108 | 			window.console.trace = function(){
    109 | 				window.console.error('console.trace does not exist');
    110 | 			};
    111 | 		}
    112 | 		window.console.hasTrace = false;
    113 | 	}
    114 | 
    115 | 	// Done
    116 | 	window.console.emulated = true;
    117 | }
    118 | 
    
    
    --------------------------------------------------------------------------------
    /scripts/resources/jquery.appendscriptstyle.js:
    --------------------------------------------------------------------------------
      1 | /**
      2 |  * @depends jquery
      3 |  * @name jquery.appendscriptstyle
      4 |  * @package jquery-sparkle {@link http://balupton.com/projects/jquery-sparkle}
      5 |  */
      6 | 
      7 | /**
      8 |  * jQuery Aliaser
      9 |  */
     10 | (function($){
     11 | 
     12 | 	/**
     13 | 	 * Append a Stylesheet to the DOM
     14 | 	 * @version 1.1.0
     15 | 	 * @date July 23, 2010
     16 | 	 * @since 1.0.0, June 30, 2010
     17 |      * @package jquery-sparkle {@link http://balupton.com/projects/jquery-sparkle}
     18 | 	 * @author Benjamin "balupton" Lupton {@link http://balupton.com}
     19 | 	 * @copyright (c) 2009-2010 Benjamin Arthur Lupton {@link http://balupton.com}
     20 | 	 * @license MIT License {@link http://creativecommons.org/licenses/MIT/}
     21 | 	 */
     22 | 	$.appendStylesheet = $.appendStylesheet || function(url, overwrite){
     23 | 		// Check
     24 | 		if ( !(document.body||false) ) {
     25 | 			setTimeout(function(){
     26 | 				$.appendStylesheet.apply($,[url,overwrite]);
     27 | 			},500);
     28 | 			// Chain
     29 | 			return $;
     30 | 		}
     31 | 
     32 | 		// Prepare
     33 | 		var id = 'stylesheet-'+url.replace(/[^a-zA-Z0-9]/g, '');;
     34 | 		var $old = $('#'+id);
     35 | 		if ( typeof overwrite === 'undefined' ) {
     36 | 			overwrite = false;
     37 | 		}
     38 | 
     39 | 		// Check
     40 | 		if ( $old.length === 1 ) {
     41 | 			if ( overwrite ) {
     42 | 				$old.remove();
     43 | 			}
     44 | 			else {
     45 | 				// Chain
     46 | 				return $;
     47 | 			}
     48 | 		}
     49 | 
     50 | 		// Create
     51 | 		var bodyEl = document.getElementsByTagName($.browser.safari ? 'head' : 'body')[0];
     52 | 		var linkEl = document.createElement('link');
     53 | 		linkEl.type = 'text/css';
     54 | 		linkEl.rel = 'stylesheet';
     55 | 		linkEl.media = 'screen';
     56 | 		linkEl.href = url;
     57 | 		linkEl.id = id;
     58 | 		bodyEl.appendChild(linkEl);
     59 | 
     60 | 		// Chain
     61 | 		return $;
     62 | 	};
     63 | 
     64 | 	/**
     65 | 	 * Append a Script to the DOM
     66 | 	 * @version 1.1.0
     67 | 	 * @date July 23, 2010
     68 | 	 * @since 1.0.0, June 30, 2010
     69 |      * @package jquery-sparkle {@link http://balupton.com/projects/jquery-sparkle}
     70 | 	 * @author Benjamin "balupton" Lupton {@link http://balupton.com}
     71 | 	 * @copyright (c) 2009-2010 Benjamin Arthur Lupton {@link http://balupton.com}
     72 | 	 * @license MIT License {@link http://creativecommons.org/licenses/MIT/}
     73 | 	 */
     74 | 	$.appendScript = $.appendScript || function(url, overwrite){
     75 | 		// Check
     76 | 		if ( !(document.body||false) ) {
     77 | 			setTimeout(function(){
     78 | 				$.appendScript.apply($,[url,overwrite]);
     79 | 			},500);
     80 | 			// Chain
     81 | 			return $;
     82 | 		}
     83 | 
     84 | 		// Prepare
     85 | 		var id = 'script-'+url.replace(/[^a-zA-Z0-9]/g, '');;
     86 | 		var $old = $('#'+id);
     87 | 		if ( typeof overwrite === 'undefined' ) {
     88 | 			overwrite = false;
     89 | 		}
     90 | 
     91 | 		// Check
     92 | 		if ( $old.length === 1 ) {
     93 | 			if ( overwrite ) {
     94 | 				$old.remove();
     95 | 			}
     96 | 			else {
     97 | 				// Chain
     98 | 				return $;
     99 | 			}
    100 | 		}
    101 | 
    102 | 		// Create
    103 | 		var bodyEl = document.getElementsByTagName($.browser.safari ? 'head' : 'body')[0];
    104 | 		var scriptEl = document.createElement('script');
    105 | 		scriptEl.type = 'text/javascript';
    106 | 		scriptEl.src = url;
    107 | 		scriptEl.id = id;
    108 | 		bodyEl.appendChild(scriptEl);
    109 | 
    110 | 		// Chain
    111 | 		return $;
    112 | 	};
    113 | 
    114 | 
    115 | })(jQuery);
    116 | 
    
    
    --------------------------------------------------------------------------------
    /scripts/resources/jquery.syntaxhighlighter.js:
    --------------------------------------------------------------------------------
      1 | /**
      2 |  * @depends core.console, jquery, jquery.appendscriptstyle
      3 |  * @name jquery.syntaxhighlighter
      4 |  * @package jquery-syntaxhighlighter {@link https://balupton.com/projects/jquery-syntaxhighlighter}
      5 |  */
      6 | 
      7 | /**
      8 |  * jQuery Aliaser
      9 |  */
     10 | ;(function($) {
     11 | 	/**
     12 | 	 * Get all elements within ourself which match the selector, and include ourself in the search
     13 | 	 * @version 1.0.0
     14 | 	 * @date June 30, 2010
     15 | 	 * @package jquery-sparkle {@link https://balupton.com/projects/jquery-sparkle}
     16 | 	 * @author Benjamin "balupton" Lupton {@link http://balupton.com}
     17 | 	 * @copyright (c) 2009+ Benjamin Arthur Lupton {@link https://balupton.com}
     18 | 	 * @license MIT License {@link https://spdx.org/licenses/MIT.html}
     19 | 	 */
     20 | 	$.fn.findAndSelf =
     21 | 		$.fn.findAndSelf ||
     22 | 		function(selector) {
     23 | 			var $this = $(this)
     24 | 			return $this
     25 | 				.find(selector)
     26 | 				.andSelf()
     27 | 				.filter(selector)
     28 | 		}
     29 | 
     30 | 	/**
     31 | 	 * Add the String replace method to the Number prototype
     32 | 	 * This is to fix an error with jQuery v1.4.2 when $('#el').val() contains a numeric value on Firefox.
     33 | 	 * Error is here: http://getsatisfaction.com/balupton/topics/word_jumbles
     34 | 	 * @version 1.0.0
     35 | 	 * @date September 01, 2010
     36 | 	 * @package jquery-sparkle {@link https://balupton.com/projects/jquery-sparkle}
     37 | 	 * @author Benjamin "balupton" Lupton {@link http://balupton.com}
     38 | 	 * @copyright (c) 2009+ Benjamin Arthur Lupton {@link https://balupton.com}
     39 | 	 * @license MIT License {@link https://spdx.org/licenses/MIT.html}
     40 | 	 */
     41 | 	Number.prototype.replace =
     42 | 		Number.prototype.replace ||
     43 | 		function() {
     44 | 			var str = String(this)
     45 | 			return str.replace.apply(this, arguments)
     46 | 		}
     47 | 
     48 | 	/**
     49 | 	 * jQuery SyntaxHighlighter
     50 | 	 * @version 1.0.1-beta
     51 | 	 * @date August 16, 2010
     52 | 	 * @since 0.1.0-dev, July 23, 2010
     53 | 	 * @package jquery-syntaxhighlighter {@link https://balupton.com/projects/jquery-syntaxhighlighter}
     54 | 	 * @author Benjamin "balupton" Lupton {@link http://balupton.com}
     55 | 	 * @copyright (c) 2009+ Benjamin Arthur Lupton {@link https://balupton.com}
     56 | 	 * @license MIT License {@link https://spdx.org/licenses/MIT.html}
     57 | 	 */
     58 | 	if (!($.SyntaxHighlighter || false)) {
     59 | 		$.SyntaxHighlighter = {
     60 | 			// Configuration
     61 | 			config: {
     62 | 				/**
     63 | 				 * Whether or not we should load in Google Prettify automatically if it was not detected.
     64 | 				 */
     65 | 				load: true,
     66 | 
     67 | 				/**
     68 | 				 * Whether or not we should highlight all appropriate code blocks automatically once the page has finished loading.
     69 | 				 */
     70 | 				highlight: true,
     71 | 
     72 | 				/**
     73 | 				 * Whether or not we should output debug information in case something is not working correctly.
     74 | 				 */
     75 | 				debug: false,
     76 | 
     77 | 				/**
     78 | 				 * Whether or not we should wrap the code blocks lines, or have them scrollable.
     79 | 				 */
     80 | 				wrapLines: true,
     81 | 
     82 | 				/**
     83 | 				 * Whether or not we should display line numbers next to the code blocks.
     84 | 				 */
     85 | 				lineNumbers: true,
     86 | 
     87 | 				/**
     88 | 				 * Whether or not we should strip empty start and finish lines from the code blocks.
     89 | 				 */
     90 | 				stripEmptyStartFinishLines: true,
     91 | 
     92 | 				/**
     93 | 				 * Whether or not we should remove whitespaces/indentations which are only there for HTML formatting of our code block.
     94 | 				 */
     95 | 				stripInitialWhitespace: true,
     96 | 
     97 | 				/**
     98 | 				 * Whether or not we should alternate the lines background colours on odd and even rows.
     99 | 				 */
    100 | 				alternateLines: false,
    101 | 
    102 | 				/**
    103 | 				 * The default class to look for in case we have not explicitly specified a language.
    104 | 				 */
    105 | 				defaultClassname: 'highlight',
    106 | 
    107 | 				/**
    108 | 				 * The theme that should be used by our highlighted code blocks.
    109 | 				 */
    110 | 				theme: 'balupton',
    111 | 
    112 | 				/**
    113 | 				 * The themes to load in for use with our highlighted code blocks.
    114 | 				 */
    115 | 				themes: ['balupton'],
    116 | 
    117 | 				/**
    118 | 				 * Whether or not we should add a Syntax Highlighter Sparkle extension if jQuery Sparkle is detected.
    119 | 				 */
    120 | 				addSparkleExtension: true,
    121 | 
    122 | 				/**
    123 | 				 * The baseUrl to load Google's Prettify from.
    124 | 				 * This is used to load in Google's Prettify if the load option is true and it was not found.
    125 | 				 */
    126 | 				prettifyBaseUrl:
    127 | 					'https://bevry-archive.github.io/jquery-syntaxhighlighter/prettify',
    128 | 
    129 | 				/**
    130 | 				 * The baseUrl to load our Syntax Highlighter from.
    131 | 				 * This is used to load in the stylesheet and additional themes.
    132 | 				 */
    133 | 				baseUrl: 'https://bevry-archive.github.io/jquery-syntaxhighlighter'
    134 | 			},
    135 | 
    136 | 			// Init
    137 | 			init: function(options) {
    138 | 				// Prepare
    139 | 				var SyntaxHighlighter = this,
    140 | 					config = SyntaxHighlighter.config
    141 | 
    142 | 				// Fix baseUrl
    143 | 				var baseUrl = config.baseUrl
    144 | 				if (baseUrl[baseUrl.length - 1] === '/') {
    145 | 					config.baseUrl = baseUrl.substr(0, baseUrl.length - 2)
    146 | 				}
    147 | 				delete baseUrl
    148 | 
    149 | 				// Configure
    150 | 				$.extend(true, SyntaxHighlighter.config, options || {})
    151 | 
    152 | 				// Sparkle
    153 | 				if ($.Sparkle || (false && config.addSparkleExtension)) {
    154 | 					// Add Syntax Highlighter to Sparkle
    155 | 					$.Sparkle.addExtension('syntaxhighlighter', function() {
    156 | 						$(this).syntaxHighlight()
    157 | 					})
    158 | 				}
    159 | 
    160 | 				// Attach
    161 | 				$.fn.syntaxHighlight = $.fn.SyntaxHighlight = SyntaxHighlighter.fn
    162 | 
    163 | 				// Load
    164 | 				if (config.load) SyntaxHighlighter.load()
    165 | 
    166 | 				// Highlight
    167 | 				if (config.highlight) SyntaxHighlighter.highlight()
    168 | 
    169 | 				// Chain
    170 | 				return this
    171 | 			},
    172 | 
    173 | 			// Load
    174 | 			load: function() {
    175 | 				// Prepare
    176 | 				var SyntaxHighlighter = this,
    177 | 					config = SyntaxHighlighter.config,
    178 | 					prettifyBaseUrl = config.prettifyBaseUrl,
    179 | 					baseUrl = config.baseUrl,
    180 | 					themes = config.themes
    181 | 
    182 | 				// Append
    183 | 				if (!SyntaxHighlighter.loaded()) {
    184 | 					$.appendScript(prettifyBaseUrl + '/prettify.min.js')
    185 | 					$.appendStylesheet(prettifyBaseUrl + '/prettify.min.css')
    186 | 					$.appendStylesheet(baseUrl + '/styles/style.min.css')
    187 | 					$.each(themes, function(i, theme) {
    188 | 						$.appendStylesheet(baseUrl + '/styles/theme-' + theme + '.min.css')
    189 | 					})
    190 | 					if ($.browser.msie) {
    191 | 						$.appendStylesheet(baseUrl + '/styles/ie.min.css')
    192 | 					}
    193 | 					SyntaxHighlighter.loadedExtras = true
    194 | 				}
    195 | 
    196 | 				// Chain
    197 | 				return this
    198 | 			},
    199 | 
    200 | 			// Loaded Extras
    201 | 			loadedExtras: false,
    202 | 
    203 | 			// Loaded
    204 | 			loaded: function() {
    205 | 				return typeof prettyPrint !== 'undefined' && this.loadedExtras
    206 | 			},
    207 | 
    208 | 			// Determine Language
    209 | 			determineLanguage: function(css) {
    210 | 				// Prepare
    211 | 				var language = null,
    212 | 					regex = /lang(uage)?-([a-z0-9]+)/g,
    213 | 					match = regex.exec(css)
    214 | 
    215 | 				// Handle
    216 | 				while (match !== null) {
    217 | 					language = match[2]
    218 | 					match = regex.exec(css)
    219 | 				}
    220 | 
    221 | 				// Return langauge
    222 | 				return language
    223 | 			},
    224 | 
    225 | 			// jQuery Function
    226 | 			fn: function() {
    227 | 				// Prepare
    228 | 				var SyntaxHighlighter = $.SyntaxHighlighter,
    229 | 					config = SyntaxHighlighter.config,
    230 | 					$el = $(this)
    231 | 
    232 | 				// Highlight
    233 | 				$.SyntaxHighlighter.highlight({
    234 | 					el: $el
    235 | 				})
    236 | 
    237 | 				// Chain
    238 | 				return this
    239 | 			},
    240 | 
    241 | 			// Highlight
    242 | 			highlight: function(params) {
    243 | 				// Prepare
    244 | 				if (typeof params !== 'object') {
    245 | 					params = {}
    246 | 				}
    247 | 				var SyntaxHighlighter = this,
    248 | 					config = SyntaxHighlighter.config,
    249 | 					$el = params.el || false
    250 | 
    251 | 				// Adjust
    252 | 				if (!($el instanceof jQuery)) {
    253 | 					$el = $('body')
    254 | 				}
    255 | 
    256 | 				// Check
    257 | 				if (!SyntaxHighlighter.loaded()) {
    258 | 					if (config.debug)
    259 | 						window.console.debug(
    260 | 							'SyntaxHighlighter.highlight: Chosen SyntaxHighlighter is not yet defined. Waiting 1200 ms then trying again.'
    261 | 						)
    262 | 					setTimeout(function() {
    263 | 						SyntaxHighlighter.highlight.apply(SyntaxHighlighter, [params])
    264 | 					}, 1200)
    265 | 					return
    266 | 				}
    267 | 
    268 | 				// Prepare Classnames
    269 | 				var defaultClassname = config.defaultClassname,
    270 | 					defaultSelector = ''
    271 | 				if (typeof defaultClassname === 'array') {
    272 | 					defaultSelector = '.' + defaultClassname.join(',.')
    273 | 					defaultClassname = defaultClassname.join(' ')
    274 | 				} else {
    275 | 					defaultClassname = String(defaultClassname)
    276 | 					defaultSelector = '.' + defaultClassname.replace(' ', ',.')
    277 | 				}
    278 | 
    279 | 				// Check Classnames
    280 | 				if (defaultSelector === '.' || !defaultClassname) {
    281 | 					window.console.error(
    282 | 						'SyntaxHighlighter.highlight: Invalid defaultClassname.',
    283 | 						[this, arguments],
    284 | 						[config.defaultClassname]
    285 | 					)
    286 | 					window.console.trace()
    287 | 				}
    288 | 
    289 | 				// Fetch
    290 | 				var $codes = $el
    291 | 					.findAndSelf('code,pre')
    292 | 					.filter('[class*=lang],' + defaultSelector)
    293 | 					.filter(':not(.prettyprint)')
    294 | 
    295 | 				// Highlight
    296 | 				$codes
    297 | 					.css({
    298 | 						'overflow-y': 'visible',
    299 | 						'overflow-x': 'visible',
    300 | 						'white-space': 'pre'
    301 | 					})
    302 | 					.addClass('prettyprint ' + defaultClassname)
    303 | 					.each(function() {
    304 | 						// Prepare
    305 | 						var $code = $(this),
    306 | 							css = $code.attr('class'),
    307 | 							language = SyntaxHighlighter.determineLanguage(css)
    308 | 
    309 | 						// Language
    310 | 						$code.addClass('lang-' + language)
    311 | 					})
    312 | 
    313 | 				// WrapLines
    314 | 				if (config.lineNumbers) {
    315 | 					$codes.addClass('linenums')
    316 | 				}
    317 | 
    318 | 				// Theme
    319 | 				if (config.theme) {
    320 | 					$codes.addClass('theme-' + config.theme)
    321 | 				}
    322 | 
    323 | 				// AlternateLines
    324 | 				if (config.alternateLines) {
    325 | 					$codes.addClass('alternate')
    326 | 				}
    327 | 
    328 | 				// Fire
    329 | 				prettyPrint()
    330 | 
    331 | 				// Adjust HTML: stripEmptyStartFinishLines
    332 | 				// we have to do this here, as before prettyPrint IE has issues with newlines
    333 | 				if (config.stripEmptyStartFinishLines) {
    334 | 					$codes
    335 | 						.find('li:first-child > :first-child, li:last-child > :first-child')
    336 | 						.each(function() {
    337 | 							// Prepare
    338 | 							var $initialText = $(this),
    339 | 								html = $initialText.html(),
    340 | 								empty = /^([\r\n\s\t]|\&nbsp;)*$/.test(html),
    341 | 								$parent = $initialText.parent(),
    342 | 								$siblings = $initialText.siblings()
    343 | 
    344 | 							// Check
    345 | 							if (
    346 | 								empty &&
    347 | 								($siblings.length === 0 ||
    348 | 									($siblings.length === 1 &&
    349 | 										$siblings.filter(':last').is('br')))
    350 | 							) {
    351 | 								// Remove Line
    352 | 								var $parent = $initialText.parent(),
    353 | 									value = $parent.val()
    354 | 								$parent.next().val(value)
    355 | 								$parent.remove()
    356 | 							}
    357 | 						})
    358 | 				}
    359 | 
    360 | 				// Adjust HTML: stripInitialWhitespace
    361 | 				// we have to do this here, as before prettyPrint IE has issues with newlines
    362 | 				if (config.stripInitialWhitespace) {
    363 | 					$codes.find('li:first-child > :first-child').each(function() {
    364 | 						// Prepare
    365 | 						var $initialText = $(this),
    366 | 							html = $initialText.html(),
    367 | 							match = html.match(/^(([\r\n\s\t]|\&nbsp;)+)/) || [],
    368 | 							whitespace = match[1] || ''
    369 | 
    370 | 						// Check
    371 | 						if (whitespace.length) {
    372 | 							// Replace
    373 | 							$initialText
    374 | 								.parent()
    375 | 								.siblings()
    376 | 								.children(':first-child')
    377 | 								.add($initialText)
    378 | 								.each(function() {
    379 | 									// Prepare
    380 | 									var $nextText = $(this),
    381 | 										html = $nextText.html()
    382 | 									// Replace
    383 | 									html = html.replace(new RegExp('^' + whitespace, 'gm'), '')
    384 | 									// Apply
    385 | 									$nextText.html(html)
    386 | 								})
    387 | 						}
    388 | 					})
    389 | 				}
    390 | 
    391 | 				// Adjust Lines
    392 | 				if (config.wrapLines) {
    393 | 					$codes.css({
    394 | 						'overflow-x': 'hidden',
    395 | 						'overflow-y': 'hidden',
    396 | 						'white-space': 'pre-wrap',
    397 | 						'max-height': 'none'
    398 | 					})
    399 | 				} else {
    400 | 					$codes.css({
    401 | 						'overflow-x': 'auto',
    402 | 						'overflow-y': 'auto',
    403 | 						'white-space': 'normal',
    404 | 						'max-height': '500px'
    405 | 					})
    406 | 				}
    407 | 
    408 | 				// Chain
    409 | 				return this
    410 | 			}
    411 | 		}
    412 | 	} else {
    413 | 		window.console.warn('SyntaxHighlighter has already been defined...')
    414 | 	}
    415 | })(jQuery)
    416 | 
    
    
    --------------------------------------------------------------------------------
    /styles/ie.css:
    --------------------------------------------------------------------------------
    1 | .prettyprint ol.linenums {
    2 | 	list-style: decimal inside; /* ie does not support outside */
    3 | 	padding: 3px 10px;
    4 | }
    5 | .prettyprint ol.linenums li {
    6 | 	padding-left: 0px;
    7 | 	border: none;
    8 | }
    9 | 
    
    
    --------------------------------------------------------------------------------
    /styles/ie.min.css:
    --------------------------------------------------------------------------------
    1 | .prettyprint ol.linenums{list-style:decimal inside;padding:3px 10px}.prettyprint ol.linenums li{padding-left:0;border:none}
    2 | 
    
    
    --------------------------------------------------------------------------------
    /styles/style.css:
    --------------------------------------------------------------------------------
     1 | .prettyprint ol,
     2 | .prettyprint ul {
     3 | 	list-style: none;
     4 | }
     5 | .prettyprint ol.linenums {
     6 | 	list-style: decimal outside;
     7 | 	padding-left: 47px;
     8 | 	color: #afafaf;
     9 | 	font-size: 12px;
    10 | }
    11 | .prettyprint ol.linenums li {
    12 | 	padding-left: 15px;
    13 | 	border-left: 3px #6ce26c solid;
    14 | }
    15 | .prettyprint li > * {
    16 | 	font-size: 14px;
    17 | }
    18 | .prettyprint {
    19 | 	border: 5px solid #ddd;
    20 | 	padding: 7px 0 5px;
    21 | 	font-size: 14px;
    22 | 	white-space: pre;
    23 | 	overflow: auto;
    24 | 	max-height: 500px;
    25 | 	width: 100%;
    26 | 	display: block;
    27 | }
    28 | .prettyprint ol,
    29 | .prettyprint ul {
    30 | 	padding: 5px 0;
    31 | }
    32 | 
    33 | .prettyprint li.L0,
    34 | .prettyprint li.L1,
    35 | .prettyprint li.L2,
    36 | .prettyprint li.L3,
    37 | .prettyprint li.L4,
    38 | .prettyprint li.L5,
    39 | .prettyprint li.L6,
    40 | .prettyprint li.L7,
    41 | .prettyprint li.L8,
    42 | .prettyprint li.L9 {
    43 | 	list-style: inherit;
    44 | 	background: none;
    45 | }
    46 | 
    47 | .prettyprint.alternate li.L1,
    48 | .prettyprint.alternate li.L3,
    49 | .prettyprint.alternate li.L5,
    50 | .prettyprint.alternate li.L7,
    51 | .prettyprint.alternate li.L9 {
    52 | 	background: #f5f5f5;
    53 | }
    54 | 
    
    
    --------------------------------------------------------------------------------
    /styles/style.min.css:
    --------------------------------------------------------------------------------
    1 | .prettyprint ol,.prettyprint ul{list-style:none}.prettyprint ol.linenums{list-style:decimal outside;padding-left:47px;color:#afafaf;font-size:12px}.prettyprint ol.linenums li{padding-left:15px;border-left:3px #6ce26c solid}.prettyprint li>*{font-size:14px}.prettyprint{border:5px solid #ddd;padding:7px 0 5px;font-size:14px;white-space:pre;overflow:auto;max-height:500px;width:100%;display:block}.prettyprint ol,.prettyprint ul{padding:5px 0}.prettyprint li.L0,.prettyprint li.L1,.prettyprint li.L2,.prettyprint li.L3,.prettyprint li.L4,.prettyprint li.L5,.prettyprint li.L6,.prettyprint li.L7,.prettyprint li.L8,.prettyprint li.L9{list-style:inherit;background:0 0}.prettyprint.alternate li.L1,.prettyprint.alternate li.L3,.prettyprint.alternate li.L5,.prettyprint.alternate li.L7,.prettyprint.alternate li.L9{background:#f5f5f5}
    2 | 
    
    
    --------------------------------------------------------------------------------
    /styles/theme-balupton.css:
    --------------------------------------------------------------------------------
     1 | .prettyprint.theme-balupton {
     2 | 	font-family: Consolas, 'Bitstream Vera Sans Mono', 'Courier New', Courier,
     3 | 		monospace;
     4 | 	font-size: 14px;
     5 | 	font-style: normal;
     6 | 	font-weight: normal;
     7 | 	line-height: 15px;
     8 | }
     9 | .prettyprint.theme-balupton .com {
    10 | 	color: #008200; /* balupton green */
    11 | }
    12 | .prettyprint.theme-balupton .lit {
    13 | 	color: #066; /* google green */
    14 | }
    15 | .prettyprint.theme-balupton.lang-html .lit {
    16 | 	/* CSS Property Value */
    17 | 	color: #066; /* google green */
    18 | }
    19 | .prettyprint.theme-balupton.lang-html .kwd {
    20 | 	/* CSS Property Value Keyword */
    21 | 	color: #066; /* google green */
    22 | 	font-weight: bold;
    23 | }
    24 | .prettyprint.theme-balupton.lang-html .atv + .pln,
    25 | .prettyprint.theme-balupton.lang-html .pun + .pln {
    26 | 	/* CSS Property Name */
    27 | 	color: blue;
    28 | }
    29 | .prettyprint.theme-balupton .atv,
    30 | .prettyprint.theme-balupton .str {
    31 | 	color: blue;
    32 | }
    33 | .prettyprint.theme-balupton .atn {
    34 | 	color: gray;
    35 | }
    36 | .prettyprint.theme-balupton .pln {
    37 | 	color: black;
    38 | }
    39 | .prettyprint.theme-balupton .pun {
    40 | 	color: #666;
    41 | }
    42 | .prettyprint.theme-balupton .typ {
    43 | 	color: #606;
    44 | }
    45 | .prettyprint.theme-balupton .tag,
    46 | .prettyprint.theme-balupton .kwd {
    47 | 	color: #006699;
    48 | 	font-weight: bold;
    49 | }
    50 | 
    
    
    --------------------------------------------------------------------------------
    /styles/theme-balupton.min.css:
    --------------------------------------------------------------------------------
    1 | .prettyprint.theme-balupton{font-family:Consolas,'Bitstream Vera Sans Mono','Courier New',Courier,monospace;font-size:14px;font-style:normal;font-weight:400;line-height:15px}.prettyprint.theme-balupton .com{color:#008200}.prettyprint.theme-balupton .lit{color:#066}.prettyprint.theme-balupton.lang-html .lit{color:#066}.prettyprint.theme-balupton.lang-html .kwd{color:#066;font-weight:700}.prettyprint.theme-balupton.lang-html .atv+.pln,.prettyprint.theme-balupton.lang-html .pun+.pln{color:#00f}.prettyprint.theme-balupton .atv,.prettyprint.theme-balupton .str{color:#00f}.prettyprint.theme-balupton .atn{color:gray}.prettyprint.theme-balupton .pln{color:#000}.prettyprint.theme-balupton .pun{color:#666}.prettyprint.theme-balupton .typ{color:#606}.prettyprint.theme-balupton .kwd,.prettyprint.theme-balupton .tag{color:#069;font-weight:700}
    2 | 
    
    
    --------------------------------------------------------------------------------
    /styles/theme-google.css:
    --------------------------------------------------------------------------------
    1 | /* The google theme is the base theme. No extra stying is needed. */
    2 | 
    
    
    --------------------------------------------------------------------------------
    /styles/theme-google.min.css:
    --------------------------------------------------------------------------------
    1 | 
    2 | 
    
    
    --------------------------------------------------------------------------------