summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan McGee <dpmcgee@gmail.com>2011-07-18 22:42:53 -0500
committerDan McGee <dpmcgee@gmail.com>2011-07-18 22:42:53 -0500
commit91b5ecbef416cdf5bdc0d4ad6536c65099a8b441 (patch)
treec001b13de6a330154a1345208e9ac2b78963721e
parent08b2262674a9459c5631f08d1762acb47dc1d585 (diff)
downloadwebsite-91b5ecbef416cdf5bdc0d4ad6536c65099a8b441.tar.gz
website-91b5ecbef416cdf5bdc0d4ad6536c65099a8b441.zip
Update google-code-prettify
Signed-off-by: Dan McGee <dpmcgee@gmail.com>
-rw-r--r--media/prettify-20100721/lang-latex.js18
-rw-r--r--media/prettify-20100721/lang-sql.js57
-rw-r--r--media/prettify-20100721/lang-vhdl.js34
-rw-r--r--media/prettify-20100721/lang-yaml.js27
-rw-r--r--media/prettify-20100721/prettify.css44
-rw-r--r--media/prettify-20110601/CHANGES.html155
-rw-r--r--media/prettify-20110601/COPYING202
-rw-r--r--media/prettify-20110601/Makefile91
-rw-r--r--media/prettify-20110601/README-zh-Hans.html143
-rw-r--r--media/prettify-20110601/README.html233
-rw-r--r--media/prettify-20110601/closure-compiler/COPYING202
-rw-r--r--media/prettify-20110601/closure-compiler/README278
-rw-r--r--media/prettify-20110601/closure-compiler/console-externs.js5
-rw-r--r--media/prettify-20110601/distrib/google-code-prettify/lang-apollo.js2
-rw-r--r--media/prettify-20110601/distrib/google-code-prettify/lang-clj.js18
-rw-r--r--media/prettify-20110601/distrib/google-code-prettify/lang-css.js2
-rw-r--r--media/prettify-20110601/distrib/google-code-prettify/lang-go.js1
-rw-r--r--media/prettify-20110601/distrib/google-code-prettify/lang-hs.js2
-rw-r--r--media/prettify-20110601/distrib/google-code-prettify/lang-lisp.js3
-rw-r--r--media/prettify-20110601/distrib/google-code-prettify/lang-lua.js2
-rw-r--r--media/prettify-20110601/distrib/google-code-prettify/lang-ml.js2
-rw-r--r--media/prettify-20110601/distrib/google-code-prettify/lang-n.js4
-rw-r--r--media/prettify-20110601/distrib/google-code-prettify/lang-proto.js1
-rw-r--r--media/prettify-20110601/distrib/google-code-prettify/lang-scala.js2
-rw-r--r--media/prettify-20110601/distrib/google-code-prettify/lang-sql.js2
-rw-r--r--media/prettify-20110601/distrib/google-code-prettify/lang-tex.js1
-rw-r--r--media/prettify-20110601/distrib/google-code-prettify/lang-vb.js2
-rw-r--r--media/prettify-20110601/distrib/google-code-prettify/lang-vhdl.js3
-rw-r--r--media/prettify-20110601/distrib/google-code-prettify/lang-wiki.js2
-rw-r--r--media/prettify-20110601/distrib/google-code-prettify/lang-xq.js3
-rw-r--r--media/prettify-20110601/distrib/google-code-prettify/lang-yaml.js2
-rw-r--r--media/prettify-20110601/distrib/google-code-prettify/prettify.css1
-rw-r--r--media/prettify-20110601/distrib/google-code-prettify/prettify.js28
-rw-r--r--media/prettify-20110601/js-modules/combinePrefixPatterns.js235
-rw-r--r--media/prettify-20110601/js-modules/externs.js37
-rw-r--r--media/prettify-20110601/js-modules/extractSourceSpans.js99
-rw-r--r--media/prettify-20110601/js-modules/extractSourceSpans_test.html129
-rw-r--r--media/prettify-20110601/js-modules/numberLines.js147
-rw-r--r--media/prettify-20110601/js-modules/numberLines_test.html119
-rw-r--r--media/prettify-20110601/js-modules/prettify.js861
-rw-r--r--media/prettify-20110601/js-modules/recombineTagsAndDecorations.js108
-rw-r--r--media/prettify-20110601/js-modules/recombineTagsAndDecorations_test.html98
-rw-r--r--media/prettify-20110601/js-modules/regexpPrecederPatterns.pl53
-rw-r--r--media/prettify-20110601/src/lang-apollo.js (renamed from media/prettify-20100721/lang-apollo.js)20
-rw-r--r--media/prettify-20110601/src/lang-clj.js64
-rw-r--r--media/prettify-20110601/src/lang-css.js (renamed from media/prettify-20100721/lang-css.js)36
-rw-r--r--media/prettify-20110601/src/lang-go.js58
-rw-r--r--media/prettify-20110601/src/lang-hs.js (renamed from media/prettify-20100721/lang-hs.js)20
-rw-r--r--media/prettify-20110601/src/lang-lisp.js (renamed from media/prettify-20100721/lang-lisp.js)26
-rw-r--r--media/prettify-20110601/src/lang-lua.js (renamed from media/prettify-20100721/lang-lua.js)20
-rw-r--r--media/prettify-20110601/src/lang-ml.js (renamed from media/prettify-20100721/lang-ml.js)22
-rw-r--r--media/prettify-20110601/src/lang-n.js62
-rw-r--r--media/prettify-20110601/src/lang-proto.js (renamed from media/prettify-20100721/lang-proto.js)16
-rw-r--r--media/prettify-20110601/src/lang-scala.js (renamed from media/prettify-20100721/lang-scala.js)30
-rw-r--r--media/prettify-20110601/src/lang-sql.js57
-rw-r--r--media/prettify-20110601/src/lang-tex.js46
-rw-r--r--media/prettify-20110601/src/lang-vb.js (renamed from media/prettify-20100721/lang-vb.js)22
-rw-r--r--media/prettify-20110601/src/lang-vhdl.js34
-rw-r--r--media/prettify-20110601/src/lang-wiki.js (renamed from media/prettify-20100721/lang-wiki.js)18
-rw-r--r--media/prettify-20110601/src/lang-xq.js67
-rw-r--r--media/prettify-20110601/src/lang-yaml.js27
-rw-r--r--media/prettify-20110601/src/prettify.css52
-rw-r--r--media/prettify-20110601/src/prettify.js (renamed from media/prettify-20100721/prettify.js)1377
-rw-r--r--media/prettify-20110601/styles/demo.html61
-rw-r--r--media/prettify-20110601/styles/desert.css34
-rw-r--r--media/prettify-20110601/styles/index.html85
-rw-r--r--media/prettify-20110601/styles/sunburst.css51
-rw-r--r--media/prettify-20110601/tests/ie-newline-copy-paste.html144
-rw-r--r--media/prettify-20110601/tests/large_input_test.html122
-rw-r--r--media/prettify-20110601/tests/prettify_test.html2921
-rw-r--r--media/prettify-20110601/tests/prettify_test_2.html893
-rw-r--r--media/prettify-20110601/tests/test_base.js246
-rw-r--r--media/prettify-20110601/tests/test_styles.css5
-rw-r--r--media/prettify-min-20100721/lang-apollo.js2
-rw-r--r--media/prettify-min-20100721/lang-css.js2
-rw-r--r--media/prettify-min-20100721/lang-hs.js2
-rw-r--r--media/prettify-min-20100721/lang-lisp.js2
-rw-r--r--media/prettify-min-20100721/lang-lua.js2
-rw-r--r--media/prettify-min-20100721/lang-ml.js2
-rw-r--r--media/prettify-min-20100721/lang-proto.js1
-rw-r--r--media/prettify-min-20100721/lang-scala.js2
-rw-r--r--media/prettify-min-20100721/lang-sql.js2
-rw-r--r--media/prettify-min-20100721/lang-vb.js2
-rw-r--r--media/prettify-min-20100721/lang-vhdl.js3
-rw-r--r--media/prettify-min-20100721/lang-wiki.js2
-rw-r--r--media/prettify-min-20100721/lang-yaml.js2
-rw-r--r--media/prettify-min-20100721/prettify-combined.js36
-rw-r--r--media/prettify-min-20100721/prettify.css1
-rw-r--r--media/prettify-min-20100721/prettify.js33
-rw-r--r--media/prettify-min-20110601/lang-apollo.js2
-rw-r--r--media/prettify-min-20110601/lang-clj.js18
-rw-r--r--media/prettify-min-20110601/lang-css.js2
-rw-r--r--media/prettify-min-20110601/lang-go.js1
-rw-r--r--media/prettify-min-20110601/lang-hs.js2
-rw-r--r--media/prettify-min-20110601/lang-lisp.js3
-rw-r--r--media/prettify-min-20110601/lang-lua.js2
-rw-r--r--media/prettify-min-20110601/lang-ml.js2
-rw-r--r--media/prettify-min-20110601/lang-n.js4
-rw-r--r--media/prettify-min-20110601/lang-proto.js1
-rw-r--r--media/prettify-min-20110601/lang-scala.js2
-rw-r--r--media/prettify-min-20110601/lang-sql.js2
-rw-r--r--media/prettify-min-20110601/lang-tex.js1
-rw-r--r--media/prettify-min-20110601/lang-vb.js2
-rw-r--r--media/prettify-min-20110601/lang-vhdl.js3
-rw-r--r--media/prettify-min-20110601/lang-wiki.js2
-rw-r--r--media/prettify-min-20110601/lang-xq.js3
-rw-r--r--media/prettify-min-20110601/lang-yaml.js2
-rw-r--r--media/prettify-min-20110601/prettify-combined.js33
-rw-r--r--media/prettify-min-20110601/prettify.css1
-rw-r--r--media/prettify-min-20110601/prettify.js28
-rw-r--r--templates/blog/base.html4
111 files changed, 9213 insertions, 1097 deletions
diff --git a/media/prettify-20100721/lang-latex.js b/media/prettify-20100721/lang-latex.js
deleted file mode 100644
index d7f35e6..0000000
--- a/media/prettify-20100721/lang-latex.js
+++ /dev/null
@@ -1,18 +0,0 @@
-PR.registerLangHandler(
- PR.createSimpleLexer(
- [
- // whitespace
- [PR.PR_PLAIN, /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'],
- // all comments begin with '%'
- [PR.PR_COMMENT, /^%[^\r\n]*/, null, '%']
- ],
- [
- // any command starting with a \ and ending on the usual suspects
- [PR.PR_KEYWORD, /^\\(\\|[^ \r\n{}\[\]=]+)/],
- // numeric measurement values with attached units
- [PR.PR_LITERAL,
- /[+-]?(?:\.\d+|\d+(?:\.\d*)?)(cm|em|ex|in|pc|pt|mm)/i],
- // punctuation usually occurring within commands
- [PR.PR_PUNCTUATION, /^[{}\[\]=]+/]
- ]),
- ['latex', 'tex']);
diff --git a/media/prettify-20100721/lang-sql.js b/media/prettify-20100721/lang-sql.js
deleted file mode 100644
index 7a58097..0000000
--- a/media/prettify-20100721/lang-sql.js
+++ /dev/null
@@ -1,57 +0,0 @@
-// Copyright (C) 2008 Google Inc.
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-
-
-/**
- * @fileoverview
- * Registers a language handler for SQL.
- *
- *
- * To use, include prettify.js and this file in your HTML page.
- * Then put your code in an HTML tag like
- * <pre class="prettyprint lang-sql">(my SQL code)</pre>
- *
- *
- * http://savage.net.au/SQL/sql-99.bnf.html is the basis for the grammar, and
- * http://msdn.microsoft.com/en-us/library/aa238507(SQL.80).aspx as the basis
- * for the keyword list.
- *
- * @author mikesamuel@gmail.com
- */
-
-PR.registerLangHandler(
- PR.createSimpleLexer(
- [
- // Whitespace
- [PR.PR_PLAIN, /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'],
- // A double or single quoted, possibly multi-line, string.
- [PR.PR_STRING, /^(?:"(?:[^\"\\]|\\.)*"|'(?:[^\'\\]|\\.)*')/, null,
- '"\'']
- ],
- [
- // A comment is either a line comment that starts with two dashes, or
- // two dashes preceding a long bracketed block.
- [PR.PR_COMMENT, /^(?:--[^\r\n]*|\/\*[\s\S]*?(?:\*\/|$))/],
- [PR.PR_KEYWORD, /^(?:ADD|ALL|ALTER|AND|ANY|AS|ASC|AUTHORIZATION|BACKUP|BEGIN|BETWEEN|BREAK|BROWSE|BULK|BY|CASCADE|CASE|CHECK|CHECKPOINT|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMN|COMMIT|COMPUTE|CONSTRAINT|CONTAINS|CONTAINSTABLE|CONTINUE|CONVERT|CREATE|CROSS|CURRENT|CURRENT_DATE|CURRENT_TIME|CURRENT_TIMESTAMP|CURRENT_USER|CURSOR|DATABASE|DBCC|DEALLOCATE|DECLARE|DEFAULT|DELETE|DENY|DESC|DISK|DISTINCT|DISTRIBUTED|DOUBLE|DROP|DUMMY|DUMP|ELSE|END|ERRLVL|ESCAPE|EXCEPT|EXEC|EXECUTE|EXISTS|EXIT|FETCH|FILE|FILLFACTOR|FOR|FOREIGN|FREETEXT|FREETEXTTABLE|FROM|FULL|FUNCTION|GOTO|GRANT|GROUP|HAVING|HOLDLOCK|IDENTITY|IDENTITYCOL|IDENTITY_INSERT|IF|IN|INDEX|INNER|INSERT|INTERSECT|INTO|IS|JOIN|KEY|KILL|LEFT|LIKE|LINENO|LOAD|NATIONAL|NOCHECK|NONCLUSTERED|NOT|NULL|NULLIF|OF|OFF|OFFSETS|ON|OPEN|OPENDATASOURCE|OPENQUERY|OPENROWSET|OPENXML|OPTION|OR|ORDER|OUTER|OVER|PERCENT|PLAN|PRECISION|PRIMARY|PRINT|PROC|PROCEDURE|PUBLIC|RAISERROR|READ|READTEXT|RECONFIGURE|REFERENCES|REPLICATION|RESTORE|RESTRICT|RETURN|REVOKE|RIGHT|ROLLBACK|ROWCOUNT|ROWGUIDCOL|RULE|SAVE|SCHEMA|SELECT|SESSION_USER|SET|SETUSER|SHUTDOWN|SOME|STATISTICS|SYSTEM_USER|TABLE|TEXTSIZE|THEN|TO|TOP|TRAN|TRANSACTION|TRIGGER|TRUNCATE|TSEQUAL|UNION|UNIQUE|UPDATE|UPDATETEXT|USE|USER|VALUES|VARYING|VIEW|WAITFOR|WHEN|WHERE|WHILE|WITH|WRITETEXT)(?=[^\w-]|$)/i, null],
- // A number is a hex integer literal, a decimal real literal, or in
- // scientific notation.
- [PR.PR_LITERAL,
- /^[+-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],
- // An identifier
- [PR.PR_PLAIN, /^[a-z_][\w-]*/i],
- // A run of punctuation
- [PR.PR_PUNCTUATION, /^[^\w\t\n\r \xA0\"\'][^\w\t\n\r \xA0+\-\"\']*/]
- ]),
- ['sql']);
diff --git a/media/prettify-20100721/lang-vhdl.js b/media/prettify-20100721/lang-vhdl.js
deleted file mode 100644
index 9c4921c..0000000
--- a/media/prettify-20100721/lang-vhdl.js
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * @fileoverview
- * Registers a language handler for VHDL '93.
- *
- * Based on the lexical grammar and keywords at
- * http://www.iis.ee.ethz.ch/~zimmi/download/vhdl93_syntax.html
- *
- * @author benoit@ryder.fr
- */
-
-PR.registerLangHandler(
- PR.createSimpleLexer(
- [
- // Whitespace
- [PR.PR_PLAIN, /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0']
- ],
- [
- // String, character or bit string
- [PR.PR_STRING, /^(?:[BOX]?"(?:[^\"]|"")*"|'.')/i],
- // Comment, from two dashes until end of line.
- [PR.PR_COMMENT, /^--[^\r\n]*/],
- [PR.PR_KEYWORD, /^(?:abs|access|after|alias|all|and|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|mod|nand|new|next|nor|not|null|of|on|open|or|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|rem|report|return|rol|ror|select|severity|shared|signal|sla|sll|sra|srl|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with|xnor|xor)(?=[^\w-]|$)/i, null],
- // Type, predefined or standard
- [PR.PR_TYPE, /^(?:bit|bit_vector|character|boolean|integer|real|time|string|severity_level|positive|natural|signed|unsigned|line|text|std_u?logic(?:_vector)?)(?=[^\w-]|$)/i, null],
- // Predefined attributes
- [PR.PR_TYPE, /^\'(?:ACTIVE|ASCENDING|BASE|DELAYED|DRIVING|DRIVING_VALUE|EVENT|HIGH|IMAGE|INSTANCE_NAME|LAST_ACTIVE|LAST_EVENT|LAST_VALUE|LEFT|LEFTOF|LENGTH|LOW|PATH_NAME|POS|PRED|QUIET|RANGE|REVERSE_RANGE|RIGHT|RIGHTOF|SIMPLE_NAME|STABLE|SUCC|TRANSACTION|VAL|VALUE)(?=[^\w-]|$)/i, null],
- // Number, decimal or based literal
- [PR.PR_LITERAL, /^\d+(?:_\d+)*(?:#[\w\\.]+#(?:[+\-]?\d+(?:_\d+)*)?|(?:\.\d+(?:_\d+)*)?(?:E[+\-]?\d+(?:_\d+)*)?)/i],
- // Identifier, basic or extended
- [PR.PR_PLAIN, /^(?:[a-z]\w*|\\[^\\]*\\)/i],
- // Punctuation
- [PR.PR_PUNCTUATION, /^[^\w\t\n\r \xA0\"\'][^\w\t\n\r \xA0\-\"\']*/]
- ]),
- ['vhdl', 'vhd']);
diff --git a/media/prettify-20100721/lang-yaml.js b/media/prettify-20100721/lang-yaml.js
deleted file mode 100644
index 271139f..0000000
--- a/media/prettify-20100721/lang-yaml.js
+++ /dev/null
@@ -1,27 +0,0 @@
-// Contributed by ribrdb @ code.google.com
-
-/**
- * @fileoverview
- * Registers a language handler for YAML.
- *
- * @author ribrdb
- */
-
-PR.registerLangHandler(
- PR.createSimpleLexer(
- [
- [PR.PR_PUNCTUATION, /^[:|>?]+/, null, ':|>?'],
- [PR.PR_DECLARATION, /^%(?:YAML|TAG)[^#\r\n]+/, null, '%'],
- [PR.PR_TYPE, /^[&]\S+/, null, '&'],
- [PR.PR_TYPE, /^!\S*/, null, '!'],
- [PR.PR_STRING, /^"(?:[^\\"]|\\.)*(?:"|$)/, null, '"'],
- [PR.PR_STRING, /^'(?:[^']|'')*(?:'|$)/, null, "'"],
- [PR.PR_COMMENT, /^#[^\r\n]*/, null, '#'],
- [PR.PR_PLAIN, /^\s+/, null, ' \t\r\n']
- ],
- [
- [PR.PR_DECLARATION, /^(?:---|\.\.\.)(?:[\r\n]|$)/],
- [PR.PR_PUNCTUATION, /^-/],
- [PR.PR_KEYWORD, /^\w+:[ \r\n]/],
- [PR.PR_PLAIN, /^\w+/]
- ]), ['yaml', 'yml']);
diff --git a/media/prettify-20100721/prettify.css b/media/prettify-20100721/prettify.css
deleted file mode 100644
index 221bd0c..0000000
--- a/media/prettify-20100721/prettify.css
+++ /dev/null
@@ -1,44 +0,0 @@
-/* Pretty printing styles. Used with prettify.js. */
-
-.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 }
-
-/* Specify class=linenums on a pre to get line numbering */
-ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */
-li.L0,
-li.L1,
-li.L2,
-li.L3,
-li.L5,
-li.L6,
-li.L7,
-li.L8 { list-style-type: none }
-/* Alternate shading for lines */
-li.L1,
-li.L3,
-li.L5,
-li.L7,
-li.L9 { background: #eee }
-
-@media print {
- .str { color: #060; }
- .kwd { color: #006; font-weight: bold; }
- .com { color: #600; font-style: italic; }
- .typ { color: #404; font-weight: bold; }
- .lit { color: #044; }
- .pun { color: #440; }
- .pln { color: #000; }
- .tag { color: #006; font-weight: bold; }
- .atn { color: #404; }
- .atv { color: #060; }
-}
diff --git a/media/prettify-20110601/CHANGES.html b/media/prettify-20110601/CHANGES.html
new file mode 100644
index 0000000..9da9fa6
--- /dev/null
+++ b/media/prettify-20110601/CHANGES.html
@@ -0,0 +1,155 @@
+<html>
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <title>Change Log</title>
+ </head>
+ <body bgcolor="white">
+ <a style="float:right" href="README.html">README</a>
+
+ <h1>Known Issues</h1>
+ <ul>
+ <li>Perl formatting is really crappy. Partly because the author is lazy and
+ partly because Perl is
+ <a href="http://www.perlmonks.org/?node_id=663393">hard</a> to parse.
+ <li>On some browsers, <code>&lt;code&gt;</code> elements with newlines in the text
+ which use CSS to specify <code>white-space:pre</code> will have the newlines
+ improperly stripped if the element is not attached to the document at the time
+ the stripping is done. Also, on IE 6, all newlines will be stripped from
+ <code>&lt;code&gt;</code> elements because of the way IE6 produces
+ <code>innerHTML</code>. Workaround: use <code>&lt;pre&gt;</code> for code with
+ newlines.
+ </ul>
+
+ <h1>Change Log</h1>
+ <h2>29 March 2007</h2>
+ <ul>
+ <li>Added <a href="tests/prettify_test.html#PHP">tests</a> for PHP support
+ to address
+ <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=3"
+ >issue 3</a>.
+ <li>Fixed
+ <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=6"
+ >bug</a>: <code>prettyPrintOne</code> was not halting. This was not
+ reachable through the normal entry point.
+ <li>Fixed
+ <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=4"
+ >bug</a>: recursing into a script block or PHP tag that was not properly
+ closed would not silently drop the content.
+ (<a href="tests/prettify_test.html#issue4">test</a>)
+ <li>Fixed
+ <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=8"
+ >bug</a>: was eating tabs
+ (<a href="tests/prettify_test.html#issue8">test</a>)
+ <li>Fixed entity handling so that the caveat
+ <blockquote>
+ <p>Caveats: please properly escape less-thans. <tt>x&amp;lt;y</tt>
+ instead of <tt>x&lt;y</tt>, and use <tt>&quot;</tt> instead of
+ <tt>&amp;quot;</tt> for string delimiters.</p>
+ </blockquote>
+ is no longer applicable.
+ <li>Added noisefree's C#
+ <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=4"
+ >patch</a>
+ <li>Added a <a href="http://google-code-prettify.googlecode.com/files/prettify-small.zip">distribution</a> that has comments and
+ whitespace removed to reduce download size from 45.5kB to 12.8kB.
+ </ul>
+ <h2>4 Jul 2008</h2>
+ <ul>
+ <li>Added <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=17">language specific formatters</a> that are triggered by the presence
+ of a <code>lang-&lt;language-file-extension&gt;</code></li>
+ <li>Fixed <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=29">bug</a>: python handling of <code>'''string'''</code>
+ <li>Fixed bug: <code>/</code> in regex <code>[charsets] should not end regex</code>
+ </ul>
+ <h2>5 Jul 2008</h2>
+ <ul>
+ <li>Defined language extensions for Lisp and Lua</code>
+ </ul>
+ <h2>14 Jul 2008</h2>
+ <ul>
+ <li>Language handlers for F#, OCAML, SQL</code>
+ <li>Support for <code>nocode</code> spans to allow embedding of line
+ numbers and code annotations which should not be styled or otherwise
+ affect the tokenization of prettified code.
+ See the issue 22
+ <a href="tests/prettify_test.html#issue22">testcase</a>.</code>
+ </ul>
+ <h2>6 Jan 2009</h2>
+ <ul>
+ <li>Language handlers for Visual Basic, Haskell, CSS, and WikiText</li>
+ <li>Added <tt>.mxml</tt> extension to the markup style handler for
+ Flex <a href="http://en.wikipedia.org/wiki/MXML">MXML files</a>. See
+ <a
+ href="http://code.google.com/p/google-code-prettify/issues/detail?id=37"
+ >issue 37</a>.
+ <li>Added <tt>.m</tt> extension to the C style handler so that Objective
+ C source files properly highlight. See
+ <a
+ href="http://code.google.com/p/google-code-prettify/issues/detail?id=58"
+ >issue 58</a>.
+ <li>Changed HTML lexer to use the same embedded source mechanism as the
+ wiki language handler, and changed to use the registered
+ CSS handler for STYLE element content.
+ </ul>
+ <h2>21 May 2009</h2>
+ <ul>
+ <li>Rewrote to improve performance on large files.
+ See <a href="http://mikesamuel.blogspot.com/2009/05/efficient-parsing-in-javascript.html">benchmarks</a>.</li>
+ <li>Fixed bugs with highlighting of Haskell line comments, Lisp
+ number literals, Lua strings, C preprocessor directives,
+ newlines in Wiki code on Windows, and newlines in IE6.</li>
+ </ul>
+ <h2>14 August 2009</h2>
+ <ul>
+ <li>Fixed prettifying of <code>&lt;code&gt;</code> blocks with embedded newlines.
+ </ul>
+ <h2>3 October 2009</h2>
+ <ul>
+ <li>Fixed prettifying of XML/HTML tags that contain uppercase letters.
+ </ul>
+ <h2>19 July 2010</h2>
+ <ul>
+ <li>Added support for line numbers. Bug
+ <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=22"
+ >22</a></li>
+ <li>Added YAML support. Bug
+ <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=123"
+ >123</a></li>
+ <li>Added VHDL support courtesy Le Poussin.</li>
+ <li>IE performance improvements. Bug
+ <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=102"
+ >102</a> courtesy jacobly.</li>
+ <li>A variety of markup formatting fixes courtesy smain and thezbyg.</li>
+ <li>Fixed copy and paste in IE[678].
+ <li>Changed output to use <code>&amp;#160;</code> instead of
+ <code>&amp;nbsp;</code> so that the output works when embedded in XML.
+ Bug
+ <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=108"
+ >108</a>.</li>
+ </ul>
+ <h2>7 September 2010</h2>
+ <ul>
+ <li>Added support for coffeescript courtesy Cezary Bartoszuk.</li>
+ </ul>
+ <h2>4 March 2011</h2>
+ <ul>
+ <li>Added a <a href="http://google-code-prettify.googlecode.com/svn/trunk/styles/index.html">themes
+ gallery</a> to showcase contributed styles.</li>
+ <li>Added support for XQuery courtesy Patrick Wied, Nemerle
+ courtesy Zimin A.V., and Latex support courtesy Martin S.</li>
+ </ul>
+ <h2>29 March 2011</h2>
+ <ul>
+ <li>Fixed IE newline issues, and copying/pasting of prettified
+ source code from IE. This required significant internal changes
+ but involves no API changes.
+ <b>Caveat:</b> <code>prettyPrintOne</code> injects the HTML
+ passed to it into a <code>&lt;pre&gt;</code> element.
+ If the HTML comes from a trusted source, this may allow XSS.
+ Do not do this. This should not be a problem for existing apps
+ since the standard usage is to rewrite the HTML and then inject
+ it, so anyone doing that with untrusted HTML already has an XSS
+ vulnerability. If you sanitize and prettify HTML from an
+ untrusted source, sanitize first.
+ </ul>
+ </body>
+</html>
diff --git a/media/prettify-20110601/COPYING b/media/prettify-20110601/COPYING
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/media/prettify-20110601/COPYING
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/media/prettify-20110601/Makefile b/media/prettify-20110601/Makefile
new file mode 100644
index 0000000..1d3534f
--- /dev/null
+++ b/media/prettify-20110601/Makefile
@@ -0,0 +1,91 @@
+CLOSURE_COMPILER=java -jar closure-compiler/compiler.jar \
+ --warning_level VERBOSE \
+ --charset UTF-8 \
+ --language_in ECMASCRIPT5 \
+ --compilation_level ADVANCED_OPTIMIZATIONS
+
+YUI_COMPRESSOR=java -jar yui-compressor/yuicompressor-2.4.4.jar \
+ --charset UTF-8
+
+TAR_ROOT=distrib/google-code-prettify
+
+all: src/prettify.js distrib
+
+clean:
+ rm -rf distrib.tstamp distrib src/prettify.js
+
+src/prettify.js: js-modules/*.js js-modules/*.pl
+ @if [ -e $@ ]; then chmod +w $@; fi
+ @perl -e '\
+ sub readInclude($$$$) {\
+ my $$prefix = $$_[0];\
+ my $$name = "js-modules/" . $$_[1];\
+ my $$buf = "";\
+ if ($$name =~ /\.pl$$/) {\
+ open(IN, "|perl $$name") or die "$$name: $$!";\
+ } else {\
+ open(IN, "<$$name") or die "$$name: $$!";\
+ }\
+ while (<IN>) {\
+ $$buf .= "$$prefix$$_";\
+ }\
+ return $$buf;\
+ }' \
+ -pe 's/^(\s*)include\("([^"]+)"\);/readInclude($$1, $$2)/ge' \
+ js-modules/prettify.js \
+ > src/prettify.js \
+ || rm src/prettify.js
+ @if [ -e $@ ]; then chmod -w $@; fi
+
+distrib: distrib.tstamp distrib/prettify-small.tgz \
+ distrib/prettify-small.tar.bz2
+ @wc -c distrib/prettify-small.{tar.bz2,tgz} \
+ | grep -v total
+
+distrib.tstamp: src/*.js src/*.css
+ @echo Compiling
+ @mkdir -p $(TAR_ROOT)
+ @for f in src/*.css; do \
+ $(YUI_COMPRESSOR) --type css $$f \
+ > $(TAR_ROOT)/$$(basename $$f); \
+ wc -c $$f $(TAR_ROOT)/$$(basename $$f) \
+ | grep -v total; \
+ done
+ @$(CLOSURE_COMPILER) --js src/prettify.js \
+ --externs closure-compiler/console-externs.js \
+ | perl -e 'binmode STDIN, ":utf8";' -pe 's/\xA0/\\xa0/' \
+ > $(TAR_ROOT)/prettify.js
+ @wc -c src/prettify.js $(TAR_ROOT)/prettify.js \
+ | grep -v total
+ @for f in src/lang*.js; do \
+ if [ $$f -nt $(TAR_ROOT)/$$(basename $$f) ]; then \
+ $(CLOSURE_COMPILER) --js $$f --externs js-modules/externs.js \
+ | perl -e 'binmode STDIN, ":utf8";' -pe 's/\xA0/\\xa0/' \
+ | perl -pe 's/\bPR\.PR_ATTRIB_NAME\b/"atn"/g; \
+ s/\bPR\.PR_ATTRIB_VALUE\b/"atv"/g; \
+ s/\bPR\.PR_COMMENT\b/"com"/g; \
+ s/\bPR\.PR_DECLARATION\b/"dec"/g; \
+ s/\bPR\.PR_KEYWORD\b/"kwd"/g; \
+ s/\bPR\.PR_LITERAL\b/"lit"/g; \
+ s/\bPR\.PR_PLAIN\b/"pln"/g; \
+ s/\bPR\.PR_PUNCTUATION\b/"pun"/g; \
+ s/\bPR\.PR_STRING\b/"str"/g; \
+ s/\bPR\.PR_TAG\b/"tag"/g; \
+ s/\bPR\.PR_TYPE\b/"typ"/g;' \
+ > $(TAR_ROOT)/$$(basename $$f); \
+ wc -c $$f $(TAR_ROOT)/$$(basename $$f) \
+ | grep -v total; \
+ fi \
+ done
+ @touch distrib.tstamp
+
+%.tgz: %.tar
+ @gzip -c -9 $^ > $@
+
+%.tar.bz2: %.tar
+ @bzip2 -9f $^
+
+distrib/prettify-small.tar: distrib.tstamp
+ @pushd distrib >& /dev/null; \
+ tar cf ../$@ google-code-prettify; \
+ popd >& /dev/null
diff --git a/media/prettify-20110601/README-zh-Hans.html b/media/prettify-20110601/README-zh-Hans.html
new file mode 100644
index 0000000..69bf7ae
--- /dev/null
+++ b/media/prettify-20110601/README-zh-Hans.html
@@ -0,0 +1,143 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+ <head>
+ <meta http-equiv="content-type" value="text/html; charset=UTF-8" />
+ <title>Javascript code prettifier</title>
+
+ <link href="src/prettify.css" type="text/css" rel="stylesheet" />
+
+ <script src="src/prettify.js" type="text/javascript"></script>
+
+ <style type="text/css">
+ body { margin-left: .5in }
+ h1, h2, h3, h4, .footer { margin-left: -.4in; }
+ </style>
+ </head>
+
+ <body onload="prettyPrint()" bgcolor="white">
+ <h1>Javascript code prettifier</h1>
+ <h1>Javascript 代ç ç¾Žå®¹å¸ˆ</h1>
+ <h2>安装使用</h2>
+ <ol>
+ <li><a href="http://google-code-prettify.googlecode.com/files/prettify-small-5-Jul-2008.zip">下载</a> 文件
+ <li>在你的文件中包å«è¿™å„¿çš„脚本和样å¼è¡¨(ä½ è¦ä¿è¯è¿™å„¿çš„ css å’Œ js 文件按在你的æœåŠ¡å™¨ä¸Š, 并且调整在 <tt>script</tt> å’Œ <tt>link</tt>标签中的路径)
+ <pre class="prettyprint">
+&lt;link href="prettify.css" type="text/css" rel="stylesheet" />
+&lt;script type="text/javascript" src="prettify.js">&lt;/script></pre>
+ <li>添加<code class="prettyprint">onload="prettyPrint()"</code> 到你的文件的 body 标签中.
+ <li>修改样å¼è¡¨,使用你自己喜欢的颜色.</li>
+ </ol>
+
+ <h2>使用方法<br></h2>
+ <p>在
+ <tt>&lt;pre class="prettyprint"&gt;...&lt;/pre&gt;</tt> 或 <tt>&lt;code class="prettyprint"&gt;...&lt;/code&gt;</tt>
+ 中间放上代ç ç‰‡æ®µ,它就会自动被美化了.
+
+ <table summary="code examples">
+ <tr>
+ <th>The original
+ <th>Prettier
+ <tr>
+ <td><pre style="border: 1px solid #888;padding: 2px"
+ ><a name="voila1"></a>class Voila {
+public:
+ // Voila
+ static const string VOILA = "Voila";
+
+ // will not interfere with embedded <a href="#voila1">tags</a>.
+}</pre>
+
+ <td><pre class="prettyprint"><a name="voila2"></a>class Voila {
+public:
+ // Voila
+ static const string VOILA = "Voila";
+
+ // will not interfere with embedded <a href="#voila2">tags</a>.
+}</pre>
+ </table>
+
+
+ <h2>常è§é—®é¢˜</h2>
+ <h3 id="langs">它是为什么语言工作的?</h3>
+ <p><tt>prettify.js中的注释是æƒå¨çš„,但是它的语法分æžç¨‹åºå¯ä»¥åœ¨å¾ˆå¤šè¯­è¨€ä¸­ä½¿ç”¨</tt>,包括 C ,
+ Java, Python, Bash, SQL, HTML, XML, CSS, Javascript, 和 Makefiles.
+ 它在 Ruby, PHP, VB, å’Œ Awk 中还算å¯ä»¥,而且也å¯ä»¥åœ¨ Perl å’Œ Rubyçš„åˆé€‚å­é›†ä¸­èµ·ä½œç”¨,但是, 因为注释的约定,它对
+ Smalltalk, 或 CAML类似的语言起作用.<br></p>
+
+
+ <p>LISP系列的语言å¯ä»¥ä½¿ç”¨ä¸€ä¸ªæ‹“展<a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-lisp.js"><code>lang-lisp.js</code></a>.</p><p>对于 <a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-css"><code>CSS</code></a>,
+ <a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-hs"><code>Haskell</code></a>,
+ <a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-lua.js"><code>Lua</code></a>,
+ <a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-ml.js"><code>OCAML, SML, F#</code></a>,
+ <a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-vb.js"><code>Visual Basic</code></a>,
+ <a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-sql.js"><code>SQL</code></a>,
+ <a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-proto.js"><code>Protocol Buffers</code></a>, 和
+ <a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-wiki.js"><code>WikiText</code></a>..也是类似的</p><p>如果你想给你喜欢的语言写个拓展版本, 请å‚阅<tt>src/lang-lisp.js</tt> ,并写一个包括你的语言的拓展的 <a href="http://code.google.com/p/google-code-prettify/issues/list"
+ >å‘布</a> 和一个测试用例.</p>
+
+ <h3>如何指定我的代ç åœ¨å“ªç§è¯­è¨€é‡Œ?</h3>
+ <p>ä½ ä¸éœ€è¦æŒ‡å®šè¯­è¨€çŽ¯å¢ƒ,因为 <code>prettyprint()</code>
+ 会对此进行猜测. ä½ å¯ä»¥ä½¿ç”¨<code> prettyprint </code>这个类通过指定语言的拓展åæ¥æŒ‡å®šè¯­è¨€,å°±åƒè¿™æ ·:</p>
+ <pre class="prettyprint lang-html"
+>&lt;pre class=&quot;prettyprint <b>lang-html</b>&quot;&gt;
+ The lang-* class specifies the language file extensions.
+ File extensions supported by default include
+ "bsh", "c", "cc", "cpp", "cs", "csh", "cyc", "cv", "htm", "html",
+ "java", "js", "m", "mxml", "perl", "pl", "pm", "py", "rb", "sh",
+ "xhtml", "xml", "xsl".
+&lt;/pre&gt;</pre>
+
+ <h3>它在混淆代ç ä¾‹å­ä¸Šä¸èµ·ä½œç”¨å—?</h3>
+ <p>是的. 美化混淆代ç å°±åƒç»™å°çŒªæ¶‚å£çº¢,也就是ä¸åœ¨è¿™ä¸ªå·¥å…·çš„范围内. <br></p>
+
+ <h3>它å¯ä»¥åœ¨é‚£äº›æµè§ˆå™¨ä¸Šå·¥ä½œ?</h3>
+ <p>这个工具已ç»åœ¨ IE 6, Firefox 1.5 &amp; 2, å’Œ Safari 2.0.4 上测试通过. 打开 <a href="tests/prettify_test.html">测试页é¢</a> ,看看它能ä¸èƒ½åœ¨ä½ çš„æµè§ˆå™¨ä¸Šèµ·ä½œç”¨.</p>
+
+ <h3>有什么改�</h3>
+ <p>查看 <a href="CHANGES.html">å˜åŒ–日志</a></p>
+
+ <h3>&nbsp;为什么Prettyprinting 对WordPress中的字符串没用?</h3>
+ <p>很显然,wordpress 在 &quot;smart quoting&quot; 时会改å˜å…³é—­ç¬¦å·.
+ 这使得关闭符å·è·Ÿå¼€å§‹ç¬¦å·ä¸é…套.
+ <p>这和å¤åˆ¶ç²˜è´´ä»£ç ä¸€æ ·,ç ´å了美化作用. 去
+ <a href="http://wordpress.org/support/topic/125038"
+ >WordPress's help center</a> 查看更多关于如何关闭æ’入代ç æ®µæ—¶çš„&quot;smart quoting&quot;çš„ä¿¡æ¯.</p>
+
+ <h3>如何在我的代ç ä¸­åŠ å…¥è¡Œå·? (Out of date -- see <a href="README.html">English version</a>)</h3>
+ <p>ä½ å¯ä»¥ä½¿ç”¨ <code>nocode</code> ç±»æ¥æ ‡è®° span 标记ä¸æ˜¯ä»£ç .
+<pre>&lt;pre class=prettyprint&gt;
+&lt;span class="<b>nocode</b>"&gt;1:&lt;/span&gt; /* This is line 1 of my code
+&lt;span class="<b>nocode</b>"&gt;2:&lt;/span&gt; * and here's line 2 */
+&lt;span class="<b>nocode</b>"&gt;3:&lt;/span&gt; print("I'm line number 3");
+&lt;/pre&gt;</pre>得到
+<pre class=prettyprint>
+<span class="nocode">1:</span> /* This is line 1 of my code
+<span class="nocode">2:</span> * and here's line 2 */
+<span class="nocode">3:</span> print("I'm line number 3");
+</pre>
+
+ <p>查看一个更完整的例å­ï¼š issue22
+ <a href="tests/prettify_test.html#issue22">testcase</a>.</p>
+
+ <h3>我得到了这样一æ¡é”™è¯¯ä¿¡æ¯ &quot;a is not a function&quot; 或 &quot;opt_whenDone is not a function&quot;</h3>
+ <p>如果你通过事件å¥æŸ„æ¡ç”¨ <code>prettyPrint</code> , 把它éšè—到一个函数中. <br></p><p>ä¸è¦è¿™ä¹ˆå†™
+ </p><blockquote>
+ <code class="prettyprint lang-js"
+ >addEventListener('load', prettyPrint, false);</code>
+ </blockquote>而è¦è¿™ä¹ˆå†™
+ <blockquote>
+ <code class="prettyprint lang-js"
+ >addEventListener('load', function (event) { prettyPrint() }, false);</code>
+ </blockquote>这样的è¯,æµè§ˆå™¨å°±ä¸ä¼šæŠŠæ—¶é—´å¯¹è±¡ä¼ é€’ç»™ <code>prettyPrint</code> ,事件对象会让它困惑的.
+
+ <br><br><br>
+
+ <div class="footer">
+<!-- Created: Tue Oct 3 17:51:56 PDT 2006 -->
+<!-- hhmts start -->
+Last modified: Wed Jan 7 13:25:42 PST 2009<br><!-- hhmts end -->
+ </div>
+ </body>
+</html>
diff --git a/media/prettify-20110601/README.html b/media/prettify-20110601/README.html
new file mode 100644
index 0000000..967d613
--- /dev/null
+++ b/media/prettify-20110601/README.html
@@ -0,0 +1,233 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+
+<html>
+ <head>
+ <title>Javascript code prettifier</title>
+
+ <link href="src/prettify.css" type="text/css" rel="stylesheet" />
+
+ <script src="src/prettify.js" type="text/javascript"></script>
+
+ <style type="text/css">
+ body { margin-left: .5in }
+ h1, h2, h3, h4, .footer { margin-left: -.4in; }
+ </style>
+ </head>
+
+ <body onload="prettyPrint()" bgcolor="white">
+ <small style="float: right">Languages : <a href="README-zh-Hans.html">CH</a></small>
+ <h1>Javascript code prettifier</h1>
+
+ <h2>Setup</h2>
+ <ol>
+ <li><a href="http://code.google.com/p/google-code-prettify/downloads/list">Download</a> a distribution
+ <li>Include the script and stylesheets in your document
+ (you will need to make sure the css and js file are on your server, and
+ adjust the paths in the <tt>script</tt> and <tt>link</tt> tag)
+ <pre class="prettyprint">
+&lt;link href="prettify.css" type="text/css" rel="stylesheet" /&gt;
+&lt;script type="text/javascript" src="prettify.js"&gt;&lt;/script&gt;</pre>
+ <li>Add <code class="prettyprint lang-in.tag">onload="prettyPrint()"</code> to your
+ document's body tag.
+ <li>Modify the stylesheet to get the coloring you prefer</li>
+ </ol>
+
+ <h2>Usage</h2>
+ <p>Put code snippets in
+ <tt>&lt;pre class="prettyprint"&gt;...&lt;/pre&gt;</tt>
+ or <tt>&lt;code class="prettyprint"&gt;...&lt;/code&gt;</tt>
+ and it will automatically be pretty printed.
+
+ <table summary="code examples">
+ <tr>
+ <th>The original
+ <th>Prettier
+ <tr>
+ <td><pre style="border: 1px solid #888;padding: 2px"
+ ><a name="voila1"></a>class Voila {
+public:
+ // Voila
+ static const string VOILA = "Voila";
+
+ // will not interfere with embedded <a href="#voila1">tags</a>.
+}</pre>
+
+ <td><pre class="prettyprint"><a name="voila2"></a>class Voila {
+public:
+ // Voila
+ static const string VOILA = "Voila";
+
+ // will not interfere with embedded <a href="#voila2">tags</a>.
+}</pre>
+ </table>
+
+ <h2>FAQ</h2>
+ <h3 id="langs">For which languages does it work?</h3>
+ <p>The comments in <tt>prettify.js</tt> are authoritative but the lexer
+ should work on a number of languages including C and friends,
+ Java, Python, Bash, SQL, HTML, XML, CSS, Javascript, and Makefiles.
+ It works passably on Ruby, PHP, VB, and Awk and a decent subset of Perl
+ and Ruby, but, because of commenting conventions, doesn't work on
+ Smalltalk, or CAML-like languages.</p>
+
+ <p>LISPy languages are supported via an extension:
+ <a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-lisp.js"
+ ><code>lang-lisp.js</code></a>.</p>
+ <p>And similarly for
+ <a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-clj.js"
+ ><code>Clojure</code></a>,
+ <a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-css.js"
+ ><code>CSS</code></a>,
+ <a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-go.js"
+ ><code>Go</code></a>,
+ <a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-hs.js"
+ ><code>Haskell</code></a>,
+ <a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-lua.js"
+ ><code>Lua</code></a>,
+ <a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-ml.js"
+ ><code>OCAML, SML, F#</code></a>,
+ <a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-n.js"
+ ><code>Nemerle</code></a>,
+ <a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-proto.js"
+ ><code>Protocol Buffers</code></a>,
+ <a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-scala.js"
+ ><code>Scala</code></a>,
+ <a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-sql.js"
+ ><code>SQL</code></a>,
+ <a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-tex.js"
+ ><code>TeX, LaTeX</code></a>,
+ <a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-vhdl.js"
+ ><code>VHDL</code></a>,
+ <a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-vb.js"
+ ><code>Visual Basic</code></a>,
+ <a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-wiki.js"
+ ><code>WikiText</code></a>,
+ <a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-xq.js"
+ ><code>XQuery</code></a>, and
+ <a href="http://code.google.com/p/google-code-prettify/source/browse/trunk/src/lang-yaml.js"
+ ><code>YAML</code></a>.
+
+ <p>If you'd like to add an extension for your favorite language, please
+ look at <tt>src/lang-lisp.js</tt> and file an
+ <a href="http://code.google.com/p/google-code-prettify/issues/list"
+ >issue</a> including your language extension, and a testcase.</p>
+
+ <h3>How do I specify the language of my code?</h3>
+ <p>You don't need to specify the language since <code>prettyprint()</code>
+ will guess. You can specify a language by specifying the language extension
+ along with the <code>prettyprint</code> class like so:</p>
+ <pre class="prettyprint lang-html"
+>&lt;pre class=&quot;prettyprint <b>lang-html</b>&quot;&gt;
+ The lang-* class specifies the language file extensions.
+ File extensions supported by default include
+ "bsh", "c", "cc", "cpp", "cs", "csh", "cyc", "cv", "htm", "html",
+ "java", "js", "m", "mxml", "perl", "pl", "pm", "py", "rb", "sh",
+ "xhtml", "xml", "xsl".
+&lt;/pre&gt;</pre>
+
+ <p>You may also use the
+ <a href="http://dev.w3.org/html5/spec-author-view/the-code-element.html#the-code-element"
+ >HTML 5</a> convention of embedding a <tt>code</tt> element inside the
+ <code>PRE</code> and using <code>language-java</code> style classes.
+ E.g. <xmp class="prettyprint"><pre class="prettyprint"><code class="language-java">...</code></pre></xmp>
+
+ <h3>It doesn't work on <tt>&lt;obfuscated code sample&gt;</tt>?</h3>
+ <p>Yes. Prettifying obfuscated code is like putting lipstick on a pig
+ &mdash; i.e. outside the scope of this tool.</p>
+
+ <h3>Which browsers does it work with?</h3>
+ <p>It's been tested with IE 6, Firefox 1.5 &amp; 2, and Safari 2.0.4.
+ Look at <a href="tests/prettify_test.html">the test page</a> to see if it
+ works in your browser.</p>
+
+ <h3>What's changed?</h3>
+ <p>See the <a href="CHANGES.html">change log</a></p>
+
+ <h3>Why doesn't Prettyprinting of strings work on WordPress?</h3>
+ <p>Apparently wordpress does "smart quoting" which changes close quotes.
+ This causes end quotes to not match up with open quotes.
+ <p>This breaks prettifying as well as copying and pasting of code samples.
+ See
+ <a href="http://wordpress.org/support/topic/125038"
+ >WordPress's help center</a> for info on how to stop smart quoting of code
+ snippets.</p>
+
+ <h3 id="linenums">How do I put line numbers in my code?</h3>
+ <p>You can use the <code>linenums</code> class to turn on line
+ numbering. If your code doesn't start at line number 1, you can
+ add a colon and a line number to the end of that class as in
+ <code>linenums:52</code>.
+
+ <p>For example
+<pre class="prettyprint">&lt;pre class="prettyprint linenums:<b>4</b>"
+&gt;// This is line 4.
+foo();
+bar();
+baz();
+boo();
+far();
+faz();
+&lt;pre&gt;</pre>
+ produces
+<pre class="prettyprint linenums:4"
+>// This is line 4.
+foo();
+bar();
+baz();
+boo();
+far();
+faz();
+</pre>
+
+ <h3>How do I prevent a portion of markup from being marked as code?</h3>
+ <p>You can use the <code>nocode</code> class to identify a span of markup
+ that is not code.
+<pre class="prettyprint">&lt;pre class=prettyprint&gt;
+int x = foo(); /* This is a comment &lt;span class="nocode"&gt;This is not code&lt;/span&gt;
+ Continuation of comment */
+int y = bar();
+&lt;/pre&gt;</pre>
+produces
+<pre class="prettyprint">
+int x = foo(); /* This is a comment <span class="nocode">This is not code</span>
+ Continuation of comment */
+int y = bar();
+</pre>
+
+ <p>For a more complete example see the issue22
+ <a href="tests/prettify_test.html#issue22">testcase</a>.</p>
+
+ <h3>I get an error message "a is not a function" or "opt_whenDone is not a function"</h3>
+ <p>If you are calling <code>prettyPrint</code> via an event handler, wrap it in a function.
+ Instead of doing
+ <blockquote>
+ <code class="prettyprint lang-js"
+ >addEventListener('load', prettyPrint, false);</code>
+ </blockquote>
+ wrap it in a closure like
+ <blockquote>
+ <code class="prettyprint lang-js"
+ >addEventListener('load', function (event) { prettyPrint() }, false);</code>
+ </blockquote>
+ so that the browser does not pass an event object to <code>prettyPrint</code> which
+ will confuse it.
+
+ <h3>How can I customize the colors and styles of my code?</h3>
+ <p>
+ Prettify adds <code>&lt;span&gt;</code> with <code>class</code>es describing
+ the kind of code. You can create CSS styles to matches these
+ classes.
+ See the
+ <a href="http://google-code-prettify.googlecode.com/svn/trunk/styles/index.html">
+ theme gallery</a> for examples.
+ </p>
+
+ <br><br><br>
+
+ <div class="footer">
+<!-- Created: Tue Oct 3 17:51:56 PDT 2006 -->
+<!-- hhmts start -->Last modified: Fri May 27 20:23:23 PDT 2011 <!-- hhmts end -->
+ </div>
+ </body>
+</html>
diff --git a/media/prettify-20110601/closure-compiler/COPYING b/media/prettify-20110601/closure-compiler/COPYING
new file mode 100644
index 0000000..d645695
--- /dev/null
+++ b/media/prettify-20110601/closure-compiler/COPYING
@@ -0,0 +1,202 @@
+
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
diff --git a/media/prettify-20110601/closure-compiler/README b/media/prettify-20110601/closure-compiler/README
new file mode 100644
index 0000000..dfffa7f
--- /dev/null
+++ b/media/prettify-20110601/closure-compiler/README
@@ -0,0 +1,278 @@
+/*
+ * Copyright 2009 The Closure Compiler Authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+//
+// Contents
+//
+
+The Closure Compiler performs checking, instrumentation, and
+optimizations on JavaScript code. The purpose of this README is to
+explain how to build and run the Closure Compiler.
+
+The Closure Compiler requires Java 6 or higher.
+http://www.java.com/
+
+
+//
+// Building The Closure Compiler
+//
+
+There are three ways to get a Closure Compiler executable.
+
+1) Use one we built for you.
+
+Pre-built Closure binaries can be found at
+http://code.google.com/p/closure-compiler/downloads/list
+
+
+2) Check out the source and build it with Apache Ant.
+
+First, check out the full source tree of the Closure Compiler. There
+are instructions on how to do this at the project site.
+http://code.google.com/p/closure-compiler/source/checkout
+
+Apache Ant is a cross-platform build tool.
+http://ant.apache.org/
+
+At the root of the source tree, there is an Ant file named
+build.xml. To use it, navigate to the same directory and type the
+command
+
+ant jar
+
+This will produce a jar file called "build/compiler.jar".
+
+
+3) Check out the source and build it with Eclipse.
+
+Eclipse is a cross-platform IDE.
+http://www.eclipse.org/
+
+Under Eclipse's File menu, click "New > Project ..." and create a
+"Java Project." You will see an options screen. Give the project a
+name, select "Create project from existing source," and choose the
+root of the checked-out source tree as the existing directory. Verify
+that you are using JRE version 6 or higher.
+
+Eclipse can use the build.xml file to discover rules. When you
+navigate to the build.xml file, you will see all the build rules in
+the "Outline" pane. Run the "jar" rule to build the compiler in
+build/compiler.jar.
+
+
+//
+// Running The Closure Compiler
+//
+
+Once you have the jar binary, running the Closure Compiler is straightforward.
+
+On the command line, type
+
+java -jar compiler.jar
+
+This starts the compiler in interactive mode. Type
+
+var x = 17 + 25;
+
+then hit "Enter", then hit "Ctrl-Z" (on Windows) or "Ctrl-D" (on Mac or Linux)
+and "Enter" again. The Compiler will respond:
+
+var x=42;
+
+The Closure Compiler has many options for reading input from a file,
+writing output to a file, checking your code, and running
+optimizations. To learn more, type
+
+java -jar compiler.jar --help
+
+You can read more detailed documentation about the many flags at
+http://code.google.com/closure/compiler/docs/gettingstarted_app.html
+
+
+//
+// Compiling Multiple Scripts
+//
+
+If you have multiple scripts, you should compile them all together with
+one compile command.
+
+java -jar compiler.jar --js=in1.js --js=in2.js ... --js_output_file=out.js
+
+The Closure Compiler will concatenate the files in the order they're
+passed at the command line.
+
+If you need to compile many, many scripts together, you may start to
+run into problems with managing dependencies between scripts. You
+should check out the Closure Library. It contains functions for
+enforcing dependencies between scripts, and a tool called calcdeps.py
+that knows how to give scripts to the Closure Compiler in the right
+order.
+
+http://code.google.com/p/closure-library/
+
+//
+// Licensing
+//
+
+Unless otherwise stated, all source files are licensed under
+the Apache License, Version 2.0.
+
+
+-----
+Code under:
+src/com/google/javascript/rhino
+test/com/google/javascript/rhino
+
+URL: http://www.mozilla.org/rhino
+Version: 1.5R3, with heavy modifications
+License: Netscape Public License and MPL / GPL dual license
+
+Description: A partial copy of Mozilla Rhino. Mozilla Rhino is an
+implementation of JavaScript for the JVM. The JavaScript parser and
+the parse tree data structures were extracted and modified
+significantly for use by Google's JavaScript compiler.
+
+Local Modifications: The packages have been renamespaced. All code not
+relavant to parsing has been removed. A JSDoc parser and static typing
+system have been added.
+
+
+-----
+Code in:
+lib/libtrunk_rhino_parser_jarjared.jar
+
+Rhino
+URL: http://www.mozilla.org/rhino
+Version: Trunk
+License: Netscape Public License and MPL / GPL dual license
+
+Description: Mozilla Rhino is an implementation of JavaScript for the JVM.
+
+Local Modifications: None. We've used JarJar to renamespace the code
+post-compilation. See:
+http://code.google.com/p/jarjar/
+
+
+-----
+Code in:
+lib/args4j.jar
+
+Args4j
+URL: https://args4j.dev.java.net/
+Version: 2.0.12
+License: MIT
+
+Description:
+args4j is a small Java class library that makes it easy to parse command line
+options/arguments in your CUI application.
+
+Local Modifications: None.
+
+
+-----
+Code in:
+lib/guava.jar
+
+Guava Libraries
+URL: http://code.google.com/p/guava-libraries/
+Version: R7
+License: Apache License 2.0
+
+Description: Google's core Java libraries.
+
+Local Modifications: None.
+
+
+-----
+Code in:
+lib/jsr305.jar
+
+Annotations for software defect detection
+URL: http://code.google.com/p/jsr-305/
+Version: svn revision 47
+License: BSD License
+
+Description: Annotations for software defect detection.
+
+Local Modifications: None.
+
+
+----
+Code in:
+lib/junit.jar
+
+JUnit
+URL: http://sourceforge.net/projects/junit/
+Version: 4.8.2
+License: Common Public License 1.0
+
+Description: A framework for writing and running automated tests in Java.
+
+Local Modifications: None.
+
+
+---
+Code in:
+lib/protobuf-java.jar
+
+Protocol Buffers
+URL: http://code.google.com/p/protobuf/
+Version: 2.3.0
+License: New BSD License
+
+Description: Supporting libraries for protocol buffers,
+an encoding of structured data.
+
+Local Modifications: None
+
+
+---
+Code in:
+lib/ant.jar
+lib/ant-launcher.jar
+
+URL: http://ant.apache.org/bindownload.cgi
+Version: 1.8.1
+License: Apache License 2.0
+Description:
+ Ant is a Java based build tool. In theory it is kind of like "make"
+ without make's wrinkles and with the full portability of pure java code.
+
+Local Modifications: None
+
+
+---
+Code in:
+lib/json.jar
+URL: http://json.org/java/index.html
+Version: JSON version 20090211
+License: MIT license
+Description:
+JSON is a set of java files for use in transmitting data in JSON format.
+
+Local Modifications: None
+
+---
+Code in:
+tools/maven-ant-tasks-2.1.1.jar
+URL: http://maven.apache.org
+Version 2.1.1
+License: Apache License 2.0
+Description:
+ Maven Ant tasks are used to manage dependencies and to install/deploy to
+ maven repositories.
+
+Local Modifications: None
diff --git a/media/prettify-20110601/closure-compiler/console-externs.js b/media/prettify-20110601/closure-compiler/console-externs.js
new file mode 100644
index 0000000..58f43aa
--- /dev/null
+++ b/media/prettify-20110601/closure-compiler/console-externs.js
@@ -0,0 +1,5 @@
+var console = {};
+/**
+ * @param {string} message
+ */
+console.warn = function (message, var_args) {};
diff --git a/media/prettify-20110601/distrib/google-code-prettify/lang-apollo.js b/media/prettify-20110601/distrib/google-code-prettify/lang-apollo.js
new file mode 100644
index 0000000..7098baf
--- /dev/null
+++ b/media/prettify-20110601/distrib/google-code-prettify/lang-apollo.js
@@ -0,0 +1,2 @@
+PR.registerLangHandler(PR.createSimpleLexer([["com",/^#[^\n\r]*/,null,"#"],["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,null,'"']],[["kwd",/^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\s/,
+null],["typ",/^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[ES]?BANK=?|BLOCK|BNKSUM|E?CADR|COUNT\*?|2?DEC\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\s/,null],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[!-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["apollo","agc","aea"]);
diff --git a/media/prettify-20110601/distrib/google-code-prettify/lang-clj.js b/media/prettify-20110601/distrib/google-code-prettify/lang-clj.js
new file mode 100644
index 0000000..542a220
--- /dev/null
+++ b/media/prettify-20110601/distrib/google-code-prettify/lang-clj.js
@@ -0,0 +1,18 @@
+/*
+ Copyright (C) 2011 Google Inc.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+var a=null;
+PR.registerLangHandler(PR.createSimpleLexer([["opn",/^[([{]+/,a,"([{"],["clo",/^[)\]}]+/,a,")]}"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \xa0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:def|if|do|let|quote|var|fn|loop|recur|throw|try|monitor-enter|monitor-exit|defmacro|defn|defn-|macroexpand|macroexpand-1|for|doseq|dosync|dotimes|and|or|when|not|assert|doto|proxy|defstruct|first|rest|cons|defprotocol|deftype|defrecord|reify|defmulti|defmethod|meta|with-meta|ns|in-ns|create-ns|import|intern|refer|alias|namespace|resolve|ref|deref|refset|new|set!|memfn|to-array|into-array|aset|gen-class|reduce|map|filter|find|nil?|empty?|hash-map|hash-set|vec|vector|seq|flatten|reverse|assoc|dissoc|list|list?|disj|get|union|difference|intersection|extend|extend-type|extend-protocol|prn)\b/,a],
+["typ",/^:[\dA-Za-z-]+/]]),["clj"]);
diff --git a/media/prettify-20110601/distrib/google-code-prettify/lang-css.js b/media/prettify-20110601/distrib/google-code-prettify/lang-css.js
new file mode 100644
index 0000000..041e1f5
--- /dev/null
+++ b/media/prettify-20110601/distrib/google-code-prettify/lang-css.js
@@ -0,0 +1,2 @@
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com",
+/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]);
diff --git a/media/prettify-20110601/distrib/google-code-prettify/lang-go.js b/media/prettify-20110601/distrib/google-code-prettify/lang-go.js
new file mode 100644
index 0000000..fc18dc0
--- /dev/null
+++ b/media/prettify-20110601/distrib/google-code-prettify/lang-go.js
@@ -0,0 +1 @@
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["pln",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])+(?:'|$)|`[^`]*(?:`|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\n\r]*|\/\*[\S\s]*?\*\/)/],["pln",/^(?:[^"'/`]|\/(?![*/]))+/]]),["go"]);
diff --git a/media/prettify-20110601/distrib/google-code-prettify/lang-hs.js b/media/prettify-20110601/distrib/google-code-prettify/lang-hs.js
new file mode 100644
index 0000000..9d77b08
--- /dev/null
+++ b/media/prettify-20110601/distrib/google-code-prettify/lang-hs.js
@@ -0,0 +1,2 @@
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t-\r ]+/,null,"\t\n \r "],["str",/^"(?:[^\n\f\r"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["str",/^'(?:[^\n\f\r'\\]|\\[^&])'?/,null,"'"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,null,"0123456789"]],[["com",/^(?:--+[^\n\f\r]*|{-(?:[^-]|-+[^}-])*-})/],["kwd",/^(?:case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)(?=[^\d'A-Za-z]|$)/,
+null],["pln",/^(?:[A-Z][\w']*\.)*[A-Za-z][\w']*/],["pun",/^[^\d\t-\r "'A-Za-z]+/]]),["hs"]);
diff --git a/media/prettify-20110601/distrib/google-code-prettify/lang-lisp.js b/media/prettify-20110601/distrib/google-code-prettify/lang-lisp.js
new file mode 100644
index 0000000..02a30e8
--- /dev/null
+++ b/media/prettify-20110601/distrib/google-code-prettify/lang-lisp.js
@@ -0,0 +1,3 @@
+var a=null;
+PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,a,"("],["clo",/^\)+/,a,")"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \xa0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/,a],
+["lit",/^[+-]?(?:[#0]x[\da-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[de][+-]?\d+)?)/i],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[_a-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/i],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["cl","el","lisp","scm"]);
diff --git a/media/prettify-20110601/distrib/google-code-prettify/lang-lua.js b/media/prettify-20110601/distrib/google-code-prettify/lang-lua.js
new file mode 100644
index 0000000..e83a3c4
--- /dev/null
+++ b/media/prettify-20110601/distrib/google-code-prettify/lang-lua.js
@@ -0,0 +1,2 @@
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["str",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$))/,null,"\"'"]],[["com",/^--(?:\[(=*)\[[\S\s]*?(?:]\1]|$)|[^\n\r]*)/],["str",/^\[(=*)\[[\S\s]*?(?:]\1]|$)/],["kwd",/^(?:and|break|do|else|elseif|end|false|for|function|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,null],["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],
+["pln",/^[_a-z]\w*/i],["pun",/^[^\w\t\n\r \xa0][^\w\t\n\r "'+=\xa0-]*/]]),["lua"]);
diff --git a/media/prettify-20110601/distrib/google-code-prettify/lang-ml.js b/media/prettify-20110601/distrib/google-code-prettify/lang-ml.js
new file mode 100644
index 0000000..6df02d7
--- /dev/null
+++ b/media/prettify-20110601/distrib/google-code-prettify/lang-ml.js
@@ -0,0 +1,2 @@
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["com",/^#(?:if[\t\n\r \xa0]+(?:[$_a-z][\w']*|``[^\t\n\r`]*(?:``|$))|else|endif|light)/i,null,"#"],["str",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])(?:'|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\n\r]*|\(\*[\S\s]*?\*\))/],["kwd",/^(?:abstract|and|as|assert|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|if|in|inherit|inline|interface|internal|lazy|let|match|member|module|mutable|namespace|new|null|of|open|or|override|private|public|rec|return|static|struct|then|to|true|try|type|upcast|use|val|void|when|while|with|yield|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|global|include|method|mixin|object|parallel|process|protected|pure|sealed|trait|virtual|volatile)\b/],
+["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],["pln",/^(?:[_a-z][\w']*[!#?]?|``[^\t\n\r`]*(?:``|$))/i],["pun",/^[^\w\t\n\r "'\xa0]+/]]),["fs","ml"]);
diff --git a/media/prettify-20110601/distrib/google-code-prettify/lang-n.js b/media/prettify-20110601/distrib/google-code-prettify/lang-n.js
new file mode 100644
index 0000000..6c2e85b
--- /dev/null
+++ b/media/prettify-20110601/distrib/google-code-prettify/lang-n.js
@@ -0,0 +1,4 @@
+var a=null;
+PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:'(?:[^\n\r'\\]|\\.)*'|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,a,'"'],["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,a,"#"],["pln",/^\s+/,a," \r\n\t\xa0"]],[["str",/^@"(?:[^"]|"")*(?:"|$)/,a],["str",/^<#[^#>]*(?:#>|$)/,a],["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,a],["com",/^\/\/[^\n\r]*/,a],["com",/^\/\*[\S\s]*?(?:\*\/|$)/,
+a],["kwd",/^(?:abstract|and|as|base|catch|class|def|delegate|enum|event|extern|false|finally|fun|implements|interface|internal|is|macro|match|matches|module|mutable|namespace|new|null|out|override|params|partial|private|protected|public|ref|sealed|static|struct|syntax|this|throw|true|try|type|typeof|using|variant|virtual|volatile|when|where|with|assert|assert2|async|break|checked|continue|do|else|ensures|for|foreach|if|late|lock|new|nolate|otherwise|regexp|repeat|requires|return|surroundwith|unchecked|unless|using|while|yield)\b/,
+a],["typ",/^(?:array|bool|byte|char|decimal|double|float|int|list|long|object|sbyte|short|string|ulong|uint|ufloat|ulong|ushort|void)\b/,a],["lit",/^@[$_a-z][\w$@]*/i,a],["typ",/^@[A-Z]+[a-z][\w$@]*/,a],["pln",/^'?[$_a-z][\w$@]*/i,a],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,a,"0123456789"],["pun",/^.[^\s\w"-$'./@`]*/,a]]),["n","nemerle"]);
diff --git a/media/prettify-20110601/distrib/google-code-prettify/lang-proto.js b/media/prettify-20110601/distrib/google-code-prettify/lang-proto.js
new file mode 100644
index 0000000..f006ad8
--- /dev/null
+++ b/media/prettify-20110601/distrib/google-code-prettify/lang-proto.js
@@ -0,0 +1 @@
+PR.registerLangHandler(PR.sourceDecorator({keywords:"bytes,default,double,enum,extend,extensions,false,group,import,max,message,option,optional,package,repeated,required,returns,rpc,service,syntax,to,true",types:/^(bool|(double|s?fixed|[su]?int)(32|64)|float|string)\b/,cStyleComments:!0}),["proto"]);
diff --git a/media/prettify-20110601/distrib/google-code-prettify/lang-scala.js b/media/prettify-20110601/distrib/google-code-prettify/lang-scala.js
new file mode 100644
index 0000000..60d034d
--- /dev/null
+++ b/media/prettify-20110601/distrib/google-code-prettify/lang-scala.js
@@ -0,0 +1,2 @@
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["str",/^"(?:""(?:""?(?!")|[^"\\]|\\.)*"{0,3}|(?:[^\n\r"\\]|\\.)*"?)/,null,'"'],["lit",/^`(?:[^\n\r\\`]|\\.)*`?/,null,"`"],["pun",/^[!#%&(--:-@[-^{-~]+/,null,"!#%&()*+,-:;<=>?@[\\]^{|}~"]],[["str",/^'(?:[^\n\r'\\]|\\(?:'|[^\n\r']+))'/],["lit",/^'[$A-Z_a-z][\w$]*(?![\w$'])/],["kwd",/^(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|object|override|package|private|protected|requires|return|sealed|super|throw|trait|try|type|val|var|while|with|yield)\b/],
+["lit",/^(?:true|false|null|this)\b/],["lit",/^(?:0(?:[0-7]+|x[\da-f]+)l?|(?:0|[1-9]\d*)(?:(?:\.\d+)?(?:e[+-]?\d+)?f?|l?)|\\.\d+(?:e[+-]?\d+)?f?)/i],["typ",/^[$_]*[A-Z][\d$A-Z_]*[a-z][\w$]*/],["pln",/^[$A-Z_a-z][\w$]*/],["com",/^\/(?:\/.*|\*(?:\/|\**[^*/])*(?:\*+\/?)?)/],["pun",/^(?:\.+|\/)/]]),["scala"]);
diff --git a/media/prettify-20110601/distrib/google-code-prettify/lang-sql.js b/media/prettify-20110601/distrib/google-code-prettify/lang-sql.js
new file mode 100644
index 0000000..da705b0
--- /dev/null
+++ b/media/prettify-20110601/distrib/google-code-prettify/lang-sql.js
@@ -0,0 +1,2 @@
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["str",/^(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/,null,"\"'"]],[["com",/^(?:--[^\n\r]*|\/\*[\S\s]*?(?:\*\/|$))/],["kwd",/^(?:add|all|alter|and|any|as|asc|authorization|backup|begin|between|break|browse|bulk|by|cascade|case|check|checkpoint|close|clustered|coalesce|collate|column|commit|compute|constraint|contains|containstable|continue|convert|create|cross|current|current_date|current_time|current_timestamp|current_user|cursor|database|dbcc|deallocate|declare|default|delete|deny|desc|disk|distinct|distributed|double|drop|dummy|dump|else|end|errlvl|escape|except|exec|execute|exists|exit|fetch|file|fillfactor|for|foreign|freetext|freetexttable|from|full|function|goto|grant|group|having|holdlock|identity|identitycol|identity_insert|if|in|index|inner|insert|intersect|into|is|join|key|kill|left|like|lineno|load|match|merge|national|nocheck|nonclustered|not|null|nullif|of|off|offsets|on|open|opendatasource|openquery|openrowset|openxml|option|or|order|outer|over|percent|plan|precision|primary|print|proc|procedure|public|raiserror|read|readtext|reconfigure|references|replication|restore|restrict|return|revoke|right|rollback|rowcount|rowguidcol|rule|save|schema|select|session_user|set|setuser|shutdown|some|statistics|system_user|table|textsize|then|to|top|tran|transaction|trigger|truncate|tsequal|union|unique|update|updatetext|use|user|using|values|varying|view|waitfor|when|where|while|with|writetext)(?=[^\w-]|$)/i,
+null],["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],["pln",/^[_a-z][\w-]*/i],["pun",/^[^\w\t\n\r "'\xa0][^\w\t\n\r "'+\xa0-]*/]]),["sql"]);
diff --git a/media/prettify-20110601/distrib/google-code-prettify/lang-tex.js b/media/prettify-20110601/distrib/google-code-prettify/lang-tex.js
new file mode 100644
index 0000000..ce96fbb
--- /dev/null
+++ b/media/prettify-20110601/distrib/google-code-prettify/lang-tex.js
@@ -0,0 +1 @@
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["com",/^%[^\n\r]*/,null,"%"]],[["kwd",/^\\[@-Za-z]+/],["kwd",/^\\./],["typ",/^[$&]/],["lit",/[+-]?(?:\.\d+|\d+(?:\.\d*)?)(cm|em|ex|in|pc|pt|bp|mm)/i],["pun",/^[()=[\]{}]+/]]),["latex","tex"]);
diff --git a/media/prettify-20110601/distrib/google-code-prettify/lang-vb.js b/media/prettify-20110601/distrib/google-code-prettify/lang-vb.js
new file mode 100644
index 0000000..07506b0
--- /dev/null
+++ b/media/prettify-20110601/distrib/google-code-prettify/lang-vb.js
@@ -0,0 +1,2 @@
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0\u2028\u2029]+/,null,"\t\n\r Â\xa0

"],["str",/^(?:["\u201c\u201d](?:[^"\u201c\u201d]|["\u201c\u201d]{2})(?:["\u201c\u201d]c|$)|["\u201c\u201d](?:[^"\u201c\u201d]|["\u201c\u201d]{2})*(?:["\u201c\u201d]|$))/i,null,'"“â€'],["com",/^['\u2018\u2019].*/,null,"'‘’"]],[["kwd",/^(?:addhandler|addressof|alias|and|andalso|ansi|as|assembly|auto|boolean|byref|byte|byval|call|case|catch|cbool|cbyte|cchar|cdate|cdbl|cdec|char|cint|class|clng|cobj|const|cshort|csng|cstr|ctype|date|decimal|declare|default|delegate|dim|directcast|do|double|each|else|elseif|end|endif|enum|erase|error|event|exit|finally|for|friend|function|get|gettype|gosub|goto|handles|if|implements|imports|in|inherits|integer|interface|is|let|lib|like|long|loop|me|mod|module|mustinherit|mustoverride|mybase|myclass|namespace|new|next|not|notinheritable|notoverridable|object|on|option|optional|or|orelse|overloads|overridable|overrides|paramarray|preserve|private|property|protected|public|raiseevent|readonly|redim|removehandler|resume|return|select|set|shadows|shared|short|single|static|step|stop|string|structure|sub|synclock|then|throw|to|try|typeof|unicode|until|variant|wend|when|while|with|withevents|writeonly|xor|endif|gosub|let|variant|wend)\b/i,
+null],["com",/^rem.*/i],["lit",/^(?:true\b|false\b|nothing\b|\d+(?:e[+-]?\d+[dfr]?|[dfilrs])?|(?:&h[\da-f]+|&o[0-7]+)[ils]?|\d*\.\d+(?:e[+-]?\d+)?[dfr]?|#\s+(?:\d+[/-]\d+[/-]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:am|pm))?)?|\d+:\d+(?::\d+)?(\s*(?:am|pm))?)\s+#)/i],["pln",/^(?:(?:[a-z]|_\w)\w*|\[(?:[a-z]|_\w)\w*])/i],["pun",/^[^\w\t\n\r "'[\]\xa0\u2018\u2019\u201c\u201d\u2028\u2029]+/],["pun",/^(?:\[|])/]]),["vb","vbs"]);
diff --git a/media/prettify-20110601/distrib/google-code-prettify/lang-vhdl.js b/media/prettify-20110601/distrib/google-code-prettify/lang-vhdl.js
new file mode 100644
index 0000000..128b5b6
--- /dev/null
+++ b/media/prettify-20110601/distrib/google-code-prettify/lang-vhdl.js
@@ -0,0 +1,3 @@
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"]],[["str",/^(?:[box]?"(?:[^"]|"")*"|'.')/i],["com",/^--[^\n\r]*/],["kwd",/^(?:abs|access|after|alias|all|and|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|mod|nand|new|next|nor|not|null|of|on|open|or|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|rem|report|return|rol|ror|select|severity|shared|signal|sla|sll|sra|srl|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with|xnor|xor)(?=[^\w-]|$)/i,
+null],["typ",/^(?:bit|bit_vector|character|boolean|integer|real|time|string|severity_level|positive|natural|signed|unsigned|line|text|std_u?logic(?:_vector)?)(?=[^\w-]|$)/i,null],["typ",/^'(?:active|ascending|base|delayed|driving|driving_value|event|high|image|instance_name|last_active|last_event|last_value|left|leftof|length|low|path_name|pos|pred|quiet|range|reverse_range|right|rightof|simple_name|stable|succ|transaction|val|value)(?=[^\w-]|$)/i,null],["lit",/^\d+(?:_\d+)*(?:#[\w.\\]+#(?:[+-]?\d+(?:_\d+)*)?|(?:\.\d+(?:_\d+)*)?(?:e[+-]?\d+(?:_\d+)*)?)/i],
+["pln",/^(?:[a-z]\w*|\\[^\\]*\\)/i],["pun",/^[^\w\t\n\r "'\xa0][^\w\t\n\r "'\xa0-]*/]]),["vhdl","vhd"]);
diff --git a/media/prettify-20110601/distrib/google-code-prettify/lang-wiki.js b/media/prettify-20110601/distrib/google-code-prettify/lang-wiki.js
new file mode 100644
index 0000000..9b0b448
--- /dev/null
+++ b/media/prettify-20110601/distrib/google-code-prettify/lang-wiki.js
@@ -0,0 +1,2 @@
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\d\t a-gi-z\xa0]+/,null,"\t Â\xa0abcdefgijklmnopqrstuvwxyz0123456789"],["pun",/^[*=[\]^~]+/,null,"=*~^[]"]],[["lang-wiki.meta",/(?:^^|\r\n?|\n)(#[a-z]+)\b/],["lit",/^[A-Z][a-z][\da-z]+[A-Z][a-z][^\W_]+\b/],["lang-",/^{{{([\S\s]+?)}}}/],["lang-",/^`([^\n\r`]+)`/],["str",/^https?:\/\/[^\s#/?]*(?:\/[^\s#?]*)?(?:\?[^\s#]*)?(?:#\S*)?/i],["pln",/^(?:\r\n|[\S\s])[^\n\r#*=A-[^`h{~]*/]]),["wiki"]);
+PR.registerLangHandler(PR.createSimpleLexer([["kwd",/^#[a-z]+/i,null,"#"]],[]),["wiki.meta"]);
diff --git a/media/prettify-20110601/distrib/google-code-prettify/lang-xq.js b/media/prettify-20110601/distrib/google-code-prettify/lang-xq.js
new file mode 100644
index 0000000..e323ae3
--- /dev/null
+++ b/media/prettify-20110601/distrib/google-code-prettify/lang-xq.js
@@ -0,0 +1,3 @@
+PR.registerLangHandler(PR.createSimpleLexer([["var pln",/^\$[\w-]+/,null,"$"]],[["pln",/^[\s=][<>][\s=]/],["lit",/^@[\w-]+/],["tag",/^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["com",/^\(:[\S\s]*?:\)/],["pln",/^[(),/;[\]{}]$/],["str",/^(?:"(?:[^"\\{]|\\[\S\s])*(?:"|$)|'(?:[^'\\{]|\\[\S\s])*(?:'|$))/,null,"\"'"],["kwd",/^(?:xquery|where|version|variable|union|typeswitch|treat|to|then|text|stable|sortby|some|self|schema|satisfies|returns|return|ref|processing-instruction|preceding-sibling|preceding|precedes|parent|only|of|node|namespace|module|let|item|intersect|instance|in|import|if|function|for|follows|following-sibling|following|external|except|every|else|element|descending|descendant-or-self|descendant|define|default|declare|comment|child|cast|case|before|attribute|assert|ascending|as|ancestor-or-self|ancestor|after|eq|order|by|or|and|schema-element|document-node|node|at)\b/],
+["typ",/^(?:xs:yearMonthDuration|xs:unsignedLong|xs:time|xs:string|xs:short|xs:QName|xs:Name|xs:long|xs:integer|xs:int|xs:gYearMonth|xs:gYear|xs:gMonthDay|xs:gDay|xs:float|xs:duration|xs:double|xs:decimal|xs:dayTimeDuration|xs:dateTime|xs:date|xs:byte|xs:boolean|xs:anyURI|xf:yearMonthDuration)\b/,null],["fun pln",/^(?:xp:dereference|xinc:node-expand|xinc:link-references|xinc:link-expand|xhtml:restructure|xhtml:clean|xhtml:add-lists|xdmp:zip-manifest|xdmp:zip-get|xdmp:zip-create|xdmp:xquery-version|xdmp:word-convert|xdmp:with-namespaces|xdmp:version|xdmp:value|xdmp:user-roles|xdmp:user-last-login|xdmp:user|xdmp:url-encode|xdmp:url-decode|xdmp:uri-is-file|xdmp:uri-format|xdmp:uri-content-type|xdmp:unquote|xdmp:unpath|xdmp:triggers-database|xdmp:trace|xdmp:to-json|xdmp:tidy|xdmp:subbinary|xdmp:strftime|xdmp:spawn-in|xdmp:spawn|xdmp:sleep|xdmp:shutdown|xdmp:set-session-field|xdmp:set-response-encoding|xdmp:set-response-content-type|xdmp:set-response-code|xdmp:set-request-time-limit|xdmp:set|xdmp:servers|xdmp:server-status|xdmp:server-name|xdmp:server|xdmp:security-database|xdmp:security-assert|xdmp:schema-database|xdmp:save|xdmp:role-roles|xdmp:role|xdmp:rethrow|xdmp:restart|xdmp:request-timestamp|xdmp:request-status|xdmp:request-cancel|xdmp:request|xdmp:redirect-response|xdmp:random|xdmp:quote|xdmp:query-trace|xdmp:query-meters|xdmp:product-edition|xdmp:privilege-roles|xdmp:privilege|xdmp:pretty-print|xdmp:powerpoint-convert|xdmp:platform|xdmp:permission|xdmp:pdf-convert|xdmp:path|xdmp:octal-to-integer|xdmp:node-uri|xdmp:node-replace|xdmp:node-kind|xdmp:node-insert-child|xdmp:node-insert-before|xdmp:node-insert-after|xdmp:node-delete|xdmp:node-database|xdmp:mul64|xdmp:modules-root|xdmp:modules-database|xdmp:merging|xdmp:merge-cancel|xdmp:merge|xdmp:md5|xdmp:logout|xdmp:login|xdmp:log-level|xdmp:log|xdmp:lock-release|xdmp:lock-acquire|xdmp:load|xdmp:invoke-in|xdmp:invoke|xdmp:integer-to-octal|xdmp:integer-to-hex|xdmp:http-put|xdmp:http-post|xdmp:http-options|xdmp:http-head|xdmp:http-get|xdmp:http-delete|xdmp:hosts|xdmp:host-status|xdmp:host-name|xdmp:host|xdmp:hex-to-integer|xdmp:hash64|xdmp:hash32|xdmp:has-privilege|xdmp:groups|xdmp:group-serves|xdmp:group-servers|xdmp:group-name|xdmp:group-hosts|xdmp:group|xdmp:get-session-field-names|xdmp:get-session-field|xdmp:get-response-encoding|xdmp:get-response-code|xdmp:get-request-username|xdmp:get-request-user|xdmp:get-request-url|xdmp:get-request-protocol|xdmp:get-request-path|xdmp:get-request-method|xdmp:get-request-header-names|xdmp:get-request-header|xdmp:get-request-field-names|xdmp:get-request-field-filename|xdmp:get-request-field-content-type|xdmp:get-request-field|xdmp:get-request-client-certificate|xdmp:get-request-client-address|xdmp:get-request-body|xdmp:get-current-user|xdmp:get-current-roles|xdmp:get|xdmp:function-name|xdmp:function-module|xdmp:function|xdmp:from-json|xdmp:forests|xdmp:forest-status|xdmp:forest-restore|xdmp:forest-restart|xdmp:forest-name|xdmp:forest-delete|xdmp:forest-databases|xdmp:forest-counts|xdmp:forest-clear|xdmp:forest-backup|xdmp:forest|xdmp:filesystem-file|xdmp:filesystem-directory|xdmp:exists|xdmp:excel-convert|xdmp:eval-in|xdmp:eval|xdmp:estimate|xdmp:email|xdmp:element-content-type|xdmp:elapsed-time|xdmp:document-set-quality|xdmp:document-set-property|xdmp:document-set-properties|xdmp:document-set-permissions|xdmp:document-set-collections|xdmp:document-remove-properties|xdmp:document-remove-permissions|xdmp:document-remove-collections|xdmp:document-properties|xdmp:document-locks|xdmp:document-load|xdmp:document-insert|xdmp:document-get-quality|xdmp:document-get-properties|xdmp:document-get-permissions|xdmp:document-get-collections|xdmp:document-get|xdmp:document-forest|xdmp:document-delete|xdmp:document-add-properties|xdmp:document-add-permissions|xdmp:document-add-collections|xdmp:directory-properties|xdmp:directory-locks|xdmp:directory-delete|xdmp:directory-create|xdmp:directory|xdmp:diacritic-less|xdmp:describe|xdmp:default-permissions|xdmp:default-collections|xdmp:databases|xdmp:database-restore-validate|xdmp:database-restore-status|xdmp:database-restore-cancel|xdmp:database-restore|xdmp:database-name|xdmp:database-forests|xdmp:database-backup-validate|xdmp:database-backup-status|xdmp:database-backup-purge|xdmp:database-backup-cancel|xdmp:database-backup|xdmp:database|xdmp:collection-properties|xdmp:collection-locks|xdmp:collection-delete|xdmp:collation-canonical-uri|xdmp:castable-as|xdmp:can-grant-roles|xdmp:base64-encode|xdmp:base64-decode|xdmp:architecture|xdmp:apply|xdmp:amp-roles|xdmp:amp|xdmp:add64|xdmp:add-response-header|xdmp:access|trgr:trigger-set-recursive|trgr:trigger-set-permissions|trgr:trigger-set-name|trgr:trigger-set-module|trgr:trigger-set-event|trgr:trigger-set-description|trgr:trigger-remove-permissions|trgr:trigger-module|trgr:trigger-get-permissions|trgr:trigger-enable|trgr:trigger-disable|trgr:trigger-database-online-event|trgr:trigger-data-event|trgr:trigger-add-permissions|trgr:remove-trigger|trgr:property-content|trgr:pre-commit|trgr:post-commit|trgr:get-trigger-by-id|trgr:get-trigger|trgr:document-scope|trgr:document-content|trgr:directory-scope|trgr:create-trigger|trgr:collection-scope|trgr:any-property-content|thsr:set-entry|thsr:remove-term|thsr:remove-synonym|thsr:remove-entry|thsr:query-lookup|thsr:lookup|thsr:load|thsr:insert|thsr:expand|thsr:add-synonym|spell:suggest-detailed|spell:suggest|spell:remove-word|spell:make-dictionary|spell:load|spell:levenshtein-distance|spell:is-correct|spell:insert|spell:double-metaphone|spell:add-word|sec:users-collection|sec:user-set-roles|sec:user-set-password|sec:user-set-name|sec:user-set-description|sec:user-set-default-permissions|sec:user-set-default-collections|sec:user-remove-roles|sec:user-privileges|sec:user-get-roles|sec:user-get-description|sec:user-get-default-permissions|sec:user-get-default-collections|sec:user-doc-permissions|sec:user-doc-collections|sec:user-add-roles|sec:unprotect-collection|sec:uid-for-name|sec:set-realm|sec:security-version|sec:security-namespace|sec:security-installed|sec:security-collection|sec:roles-collection|sec:role-set-roles|sec:role-set-name|sec:role-set-description|sec:role-set-default-permissions|sec:role-set-default-collections|sec:role-remove-roles|sec:role-privileges|sec:role-get-roles|sec:role-get-description|sec:role-get-default-permissions|sec:role-get-default-collections|sec:role-doc-permissions|sec:role-doc-collections|sec:role-add-roles|sec:remove-user|sec:remove-role-from-users|sec:remove-role-from-role|sec:remove-role-from-privileges|sec:remove-role-from-amps|sec:remove-role|sec:remove-privilege|sec:remove-amp|sec:protect-collection|sec:privileges-collection|sec:privilege-set-roles|sec:privilege-set-name|sec:privilege-remove-roles|sec:privilege-get-roles|sec:privilege-add-roles|sec:priv-doc-permissions|sec:priv-doc-collections|sec:get-user-names|sec:get-unique-elem-id|sec:get-role-names|sec:get-role-ids|sec:get-privilege|sec:get-distinct-permissions|sec:get-collection|sec:get-amp|sec:create-user-with-role|sec:create-user|sec:create-role|sec:create-privilege|sec:create-amp|sec:collections-collection|sec:collection-set-permissions|sec:collection-remove-permissions|sec:collection-get-permissions|sec:collection-add-permissions|sec:check-admin|sec:amps-collection|sec:amp-set-roles|sec:amp-remove-roles|sec:amp-get-roles|sec:amp-doc-permissions|sec:amp-doc-collections|sec:amp-add-roles|search:unparse|search:suggest|search:snippet|search:search|search:resolve-nodes|search:resolve|search:remove-constraint|search:parse|search:get-default-options|search:estimate|search:check-options|prof:value|prof:reset|prof:report|prof:invoke|prof:eval|prof:enable|prof:disable|prof:allowed|ppt:clean|pki:template-set-request|pki:template-set-name|pki:template-set-key-type|pki:template-set-key-options|pki:template-set-description|pki:template-in-use|pki:template-get-version|pki:template-get-request|pki:template-get-name|pki:template-get-key-type|pki:template-get-key-options|pki:template-get-id|pki:template-get-description|pki:need-certificate|pki:is-temporary|pki:insert-trusted-certificates|pki:insert-template|pki:insert-signed-certificates|pki:insert-certificate-revocation-list|pki:get-trusted-certificate-ids|pki:get-template-ids|pki:get-template-certificate-authority|pki:get-template-by-name|pki:get-template|pki:get-pending-certificate-requests-xml|pki:get-pending-certificate-requests-pem|pki:get-pending-certificate-request|pki:get-certificates-for-template-xml|pki:get-certificates-for-template|pki:get-certificates|pki:get-certificate-xml|pki:get-certificate-pem|pki:get-certificate|pki:generate-temporary-certificate-if-necessary|pki:generate-temporary-certificate|pki:generate-template-certificate-authority|pki:generate-certificate-request|pki:delete-template|pki:delete-certificate|pki:create-template|pdf:make-toc|pdf:insert-toc-headers|pdf:get-toc|pdf:clean|p:status-transition|p:state-transition|p:remove|p:pipelines|p:insert|p:get-by-id|p:get|p:execute|p:create|p:condition|p:collection|p:action|ooxml:runs-merge|ooxml:package-uris|ooxml:package-parts-insert|ooxml:package-parts|msword:clean|mcgm:polygon|mcgm:point|mcgm:geospatial-query-from-elements|mcgm:geospatial-query|mcgm:circle|math:tanh|math:tan|math:sqrt|math:sinh|math:sin|math:pow|math:modf|math:log10|math:log|math:ldexp|math:frexp|math:fmod|math:floor|math:fabs|math:exp|math:cosh|math:cos|math:ceil|math:atan2|math:atan|math:asin|math:acos|map:put|map:map|map:keys|map:get|map:delete|map:count|map:clear|lnk:to|lnk:remove|lnk:insert|lnk:get|lnk:from|lnk:create|kml:polygon|kml:point|kml:interior-polygon|kml:geospatial-query-from-elements|kml:geospatial-query|kml:circle|kml:box|gml:polygon|gml:point|gml:interior-polygon|gml:geospatial-query-from-elements|gml:geospatial-query|gml:circle|gml:box|georss:point|georss:geospatial-query|georss:circle|geo:polygon|geo:point|geo:interior-polygon|geo:geospatial-query-from-elements|geo:geospatial-query|geo:circle|geo:box|fn:zero-or-one|fn:years-from-duration|fn:year-from-dateTime|fn:year-from-date|fn:upper-case|fn:unordered|fn:true|fn:translate|fn:trace|fn:tokenize|fn:timezone-from-time|fn:timezone-from-dateTime|fn:timezone-from-date|fn:sum|fn:subtract-dateTimes-yielding-yearMonthDuration|fn:subtract-dateTimes-yielding-dayTimeDuration|fn:substring-before|fn:substring-after|fn:substring|fn:subsequence|fn:string-to-codepoints|fn:string-pad|fn:string-length|fn:string-join|fn:string|fn:static-base-uri|fn:starts-with|fn:seconds-from-time|fn:seconds-from-duration|fn:seconds-from-dateTime|fn:round-half-to-even|fn:round|fn:root|fn:reverse|fn:resolve-uri|fn:resolve-QName|fn:replace|fn:remove|fn:QName|fn:prefix-from-QName|fn:position|fn:one-or-more|fn:number|fn:not|fn:normalize-unicode|fn:normalize-space|fn:node-name|fn:node-kind|fn:nilled|fn:namespace-uri-from-QName|fn:namespace-uri-for-prefix|fn:namespace-uri|fn:name|fn:months-from-duration|fn:month-from-dateTime|fn:month-from-date|fn:minutes-from-time|fn:minutes-from-duration|fn:minutes-from-dateTime|fn:min|fn:max|fn:matches|fn:lower-case|fn:local-name-from-QName|fn:local-name|fn:last|fn:lang|fn:iri-to-uri|fn:insert-before|fn:index-of|fn:in-scope-prefixes|fn:implicit-timezone|fn:idref|fn:id|fn:hours-from-time|fn:hours-from-duration|fn:hours-from-dateTime|fn:floor|fn:false|fn:expanded-QName|fn:exists|fn:exactly-one|fn:escape-uri|fn:escape-html-uri|fn:error|fn:ends-with|fn:encode-for-uri|fn:empty|fn:document-uri|fn:doc-available|fn:doc|fn:distinct-values|fn:distinct-nodes|fn:default-collation|fn:deep-equal|fn:days-from-duration|fn:day-from-dateTime|fn:day-from-date|fn:data|fn:current-time|fn:current-dateTime|fn:current-date|fn:count|fn:contains|fn:concat|fn:compare|fn:collection|fn:codepoints-to-string|fn:codepoint-equal|fn:ceiling|fn:boolean|fn:base-uri|fn:avg|fn:adjust-time-to-timezone|fn:adjust-dateTime-to-timezone|fn:adjust-date-to-timezone|fn:abs|feed:unsubscribe|feed:subscription|feed:subscribe|feed:request|feed:item|feed:description|excel:clean|entity:enrich|dom:set-pipelines|dom:set-permissions|dom:set-name|dom:set-evaluation-context|dom:set-domain-scope|dom:set-description|dom:remove-pipeline|dom:remove-permissions|dom:remove|dom:get|dom:evaluation-context|dom:domains|dom:domain-scope|dom:create|dom:configuration-set-restart-user|dom:configuration-set-permissions|dom:configuration-set-evaluation-context|dom:configuration-set-default-domain|dom:configuration-get|dom:configuration-create|dom:collection|dom:add-pipeline|dom:add-permissions|dls:retention-rules|dls:retention-rule-remove|dls:retention-rule-insert|dls:retention-rule|dls:purge|dls:node-expand|dls:link-references|dls:link-expand|dls:documents-query|dls:document-versions-query|dls:document-version-uri|dls:document-version-query|dls:document-version-delete|dls:document-version-as-of|dls:document-version|dls:document-update|dls:document-unmanage|dls:document-set-quality|dls:document-set-property|dls:document-set-properties|dls:document-set-permissions|dls:document-set-collections|dls:document-retention-rules|dls:document-remove-properties|dls:document-remove-permissions|dls:document-remove-collections|dls:document-purge|dls:document-manage|dls:document-is-managed|dls:document-insert-and-manage|dls:document-include-query|dls:document-history|dls:document-get-permissions|dls:document-extract-part|dls:document-delete|dls:document-checkout-status|dls:document-checkout|dls:document-checkin|dls:document-add-properties|dls:document-add-permissions|dls:document-add-collections|dls:break-checkout|dls:author-query|dls:as-of-query|dbk:convert|dbg:wait|dbg:value|dbg:stopped|dbg:stop|dbg:step|dbg:status|dbg:stack|dbg:out|dbg:next|dbg:line|dbg:invoke|dbg:function|dbg:finish|dbg:expr|dbg:eval|dbg:disconnect|dbg:detach|dbg:continue|dbg:connect|dbg:clear|dbg:breakpoints|dbg:break|dbg:attached|dbg:attach|cvt:save-converted-documents|cvt:part-uri|cvt:destination-uri|cvt:basepath|cvt:basename|cts:words|cts:word-query-weight|cts:word-query-text|cts:word-query-options|cts:word-query|cts:word-match|cts:walk|cts:uris|cts:uri-match|cts:train|cts:tokenize|cts:thresholds|cts:stem|cts:similar-query-weight|cts:similar-query-nodes|cts:similar-query|cts:shortest-distance|cts:search|cts:score|cts:reverse-query-weight|cts:reverse-query-nodes|cts:reverse-query|cts:remainder|cts:registered-query-weight|cts:registered-query-options|cts:registered-query-ids|cts:registered-query|cts:register|cts:query|cts:quality|cts:properties-query-query|cts:properties-query|cts:polygon-vertices|cts:polygon|cts:point-longitude|cts:point-latitude|cts:point|cts:or-query-queries|cts:or-query|cts:not-query-weight|cts:not-query-query|cts:not-query|cts:near-query-weight|cts:near-query-queries|cts:near-query-options|cts:near-query-distance|cts:near-query|cts:highlight|cts:geospatial-co-occurrences|cts:frequency|cts:fitness|cts:field-words|cts:field-word-query-weight|cts:field-word-query-text|cts:field-word-query-options|cts:field-word-query-field-name|cts:field-word-query|cts:field-word-match|cts:entity-highlight|cts:element-words|cts:element-word-query-weight|cts:element-word-query-text|cts:element-word-query-options|cts:element-word-query-element-name|cts:element-word-query|cts:element-word-match|cts:element-values|cts:element-value-ranges|cts:element-value-query-weight|cts:element-value-query-text|cts:element-value-query-options|cts:element-value-query-element-name|cts:element-value-query|cts:element-value-match|cts:element-value-geospatial-co-occurrences|cts:element-value-co-occurrences|cts:element-range-query-weight|cts:element-range-query-value|cts:element-range-query-options|cts:element-range-query-operator|cts:element-range-query-element-name|cts:element-range-query|cts:element-query-query|cts:element-query-element-name|cts:element-query|cts:element-pair-geospatial-values|cts:element-pair-geospatial-value-match|cts:element-pair-geospatial-query-weight|cts:element-pair-geospatial-query-region|cts:element-pair-geospatial-query-options|cts:element-pair-geospatial-query-longitude-name|cts:element-pair-geospatial-query-latitude-name|cts:element-pair-geospatial-query-element-name|cts:element-pair-geospatial-query|cts:element-pair-geospatial-boxes|cts:element-geospatial-values|cts:element-geospatial-value-match|cts:element-geospatial-query-weight|cts:element-geospatial-query-region|cts:element-geospatial-query-options|cts:element-geospatial-query-element-name|cts:element-geospatial-query|cts:element-geospatial-boxes|cts:element-child-geospatial-values|cts:element-child-geospatial-value-match|cts:element-child-geospatial-query-weight|cts:element-child-geospatial-query-region|cts:element-child-geospatial-query-options|cts:element-child-geospatial-query-element-name|cts:element-child-geospatial-query-child-name|cts:element-child-geospatial-query|cts:element-child-geospatial-boxes|cts:element-attribute-words|cts:element-attribute-word-query-weight|cts:element-attribute-word-query-text|cts:element-attribute-word-query-options|cts:element-attribute-word-query-element-name|cts:element-attribute-word-query-attribute-name|cts:element-attribute-word-query|cts:element-attribute-word-match|cts:element-attribute-values|cts:element-attribute-value-ranges|cts:element-attribute-value-query-weight|cts:element-attribute-value-query-text|cts:element-attribute-value-query-options|cts:element-attribute-value-query-element-name|cts:element-attribute-value-query-attribute-name|cts:element-attribute-value-query|cts:element-attribute-value-match|cts:element-attribute-value-geospatial-co-occurrences|cts:element-attribute-value-co-occurrences|cts:element-attribute-range-query-weight|cts:element-attribute-range-query-value|cts:element-attribute-range-query-options|cts:element-attribute-range-query-operator|cts:element-attribute-range-query-element-name|cts:element-attribute-range-query-attribute-name|cts:element-attribute-range-query|cts:element-attribute-pair-geospatial-values|cts:element-attribute-pair-geospatial-value-match|cts:element-attribute-pair-geospatial-query-weight|cts:element-attribute-pair-geospatial-query-region|cts:element-attribute-pair-geospatial-query-options|cts:element-attribute-pair-geospatial-query-longitude-name|cts:element-attribute-pair-geospatial-query-latitude-name|cts:element-attribute-pair-geospatial-query-element-name|cts:element-attribute-pair-geospatial-query|cts:element-attribute-pair-geospatial-boxes|cts:document-query-uris|cts:document-query|cts:distance|cts:directory-query-uris|cts:directory-query-depth|cts:directory-query|cts:destination|cts:deregister|cts:contains|cts:confidence|cts:collections|cts:collection-query-uris|cts:collection-query|cts:collection-match|cts:classify|cts:circle-radius|cts:circle-center|cts:circle|cts:box-west|cts:box-south|cts:box-north|cts:box-east|cts:box|cts:bearing|cts:arc-intersection|cts:and-query-queries|cts:and-query-options|cts:and-query|cts:and-not-query-positive-query|cts:and-not-query-negative-query|cts:and-not-query|css:get|css:convert|cpf:success|cpf:failure|cpf:document-set-state|cpf:document-set-processing-status|cpf:document-set-last-updated|cpf:document-set-error|cpf:document-get-state|cpf:document-get-processing-status|cpf:document-get-last-updated|cpf:document-get-error|cpf:check-transition|alert:spawn-matching-actions|alert:rule-user-id-query|alert:rule-set-user-id|alert:rule-set-query|alert:rule-set-options|alert:rule-set-name|alert:rule-set-description|alert:rule-set-action|alert:rule-remove|alert:rule-name-query|alert:rule-insert|alert:rule-id-query|alert:rule-get-user-id|alert:rule-get-query|alert:rule-get-options|alert:rule-get-name|alert:rule-get-id|alert:rule-get-description|alert:rule-get-action|alert:rule-action-query|alert:remove-triggers|alert:make-rule|alert:make-log-action|alert:make-config|alert:make-action|alert:invoke-matching-actions|alert:get-my-rules|alert:get-all-rules|alert:get-actions|alert:find-matching-rules|alert:create-triggers|alert:config-set-uri|alert:config-set-trigger-ids|alert:config-set-options|alert:config-set-name|alert:config-set-description|alert:config-set-cpf-domain-names|alert:config-set-cpf-domain-ids|alert:config-insert|alert:config-get-uri|alert:config-get-trigger-ids|alert:config-get-options|alert:config-get-name|alert:config-get-id|alert:config-get-description|alert:config-get-cpf-domain-names|alert:config-get-cpf-domain-ids|alert:config-get|alert:config-delete|alert:action-set-options|alert:action-set-name|alert:action-set-module-root|alert:action-set-module-db|alert:action-set-module|alert:action-set-description|alert:action-remove|alert:action-insert|alert:action-get-options|alert:action-get-name|alert:action-get-module-root|alert:action-get-module-db|alert:action-get-module|alert:action-get-description|zero-or-one|years-from-duration|year-from-dateTime|year-from-date|upper-case|unordered|true|translate|trace|tokenize|timezone-from-time|timezone-from-dateTime|timezone-from-date|sum|subtract-dateTimes-yielding-yearMonthDuration|subtract-dateTimes-yielding-dayTimeDuration|substring-before|substring-after|substring|subsequence|string-to-codepoints|string-pad|string-length|string-join|string|static-base-uri|starts-with|seconds-from-time|seconds-from-duration|seconds-from-dateTime|round-half-to-even|round|root|reverse|resolve-uri|resolve-QName|replace|remove|QName|prefix-from-QName|position|one-or-more|number|not|normalize-unicode|normalize-space|node-name|node-kind|nilled|namespace-uri-from-QName|namespace-uri-for-prefix|namespace-uri|name|months-from-duration|month-from-dateTime|month-from-date|minutes-from-time|minutes-from-duration|minutes-from-dateTime|min|max|matches|lower-case|local-name-from-QName|local-name|last|lang|iri-to-uri|insert-before|index-of|in-scope-prefixes|implicit-timezone|idref|id|hours-from-time|hours-from-duration|hours-from-dateTime|floor|false|expanded-QName|exists|exactly-one|escape-uri|escape-html-uri|error|ends-with|encode-for-uri|empty|document-uri|doc-available|doc|distinct-values|distinct-nodes|default-collation|deep-equal|days-from-duration|day-from-dateTime|day-from-date|data|current-time|current-dateTime|current-date|count|contains|concat|compare|collection|codepoints-to-string|codepoint-equal|ceiling|boolean|base-uri|avg|adjust-time-to-timezone|adjust-dateTime-to-timezone|adjust-date-to-timezone|abs)\b/],
+["pln",/^[\w:-]+/],["pln",/^[\t\n\r \xa0]+/]]),["xq","xquery"]);
diff --git a/media/prettify-20110601/distrib/google-code-prettify/lang-yaml.js b/media/prettify-20110601/distrib/google-code-prettify/lang-yaml.js
new file mode 100644
index 0000000..c38729b
--- /dev/null
+++ b/media/prettify-20110601/distrib/google-code-prettify/lang-yaml.js
@@ -0,0 +1,2 @@
+var a=null;
+PR.registerLangHandler(PR.createSimpleLexer([["pun",/^[:>?|]+/,a,":|>?"],["dec",/^%(?:YAML|TAG)[^\n\r#]+/,a,"%"],["typ",/^&\S+/,a,"&"],["typ",/^!\S*/,a,"!"],["str",/^"(?:[^"\\]|\\.)*(?:"|$)/,a,'"'],["str",/^'(?:[^']|'')*(?:'|$)/,a,"'"],["com",/^#[^\n\r]*/,a,"#"],["pln",/^\s+/,a," \t\r\n"]],[["dec",/^(?:---|\.\.\.)(?:[\n\r]|$)/],["pun",/^-/],["kwd",/^\w+:[\n\r ]/],["pln",/^\w+/]]),["yaml","yml"]);
diff --git a/media/prettify-20110601/distrib/google-code-prettify/prettify.css b/media/prettify-20110601/distrib/google-code-prettify/prettify.css
new file mode 100644
index 0000000..d44b3a2
--- /dev/null
+++ b/media/prettify-20110601/distrib/google-code-prettify/prettify.css
@@ -0,0 +1 @@
+.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}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} \ No newline at end of file
diff --git a/media/prettify-20110601/distrib/google-code-prettify/prettify.js b/media/prettify-20110601/distrib/google-code-prettify/prettify.js
new file mode 100644
index 0000000..eef5ad7
--- /dev/null
+++ b/media/prettify-20110601/distrib/google-code-prettify/prettify.js
@@ -0,0 +1,28 @@
+var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
+(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a=
+[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c<i;++c){var j=f[c];if(/\\[bdsw]/i.test(j))a.push(j);else{var j=m(j),d;c+2<i&&"-"===f[c+1]?(d=m(f[c+2]),c+=2):d=j;b.push([j,d]);d<65||j>122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;c<b.length;++c)i=b[c],i[0]<=j[1]+1?j[1]=Math.max(j[1],i[1]):f.push(j=i);b=["["];o&&b.push("^");b.push.apply(b,a);for(c=0;c<
+f.length;++c)i=f[c],b.push(e(i[0])),i[1]>i[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c<b;++c){var j=f[c];j==="("?++i:"\\"===j.charAt(0)&&(j=+j.substring(1))&&j<=i&&(d[j]=-1)}for(c=1;c<d.length;++c)-1===d[c]&&(d[c]=++t);for(i=c=0;c<b;++c)j=f[c],j==="("?(++i,d[i]===void 0&&(f[c]="(?:")):"\\"===j.charAt(0)&&
+(j=+j.substring(1))&&j<=i&&(f[c]="\\"+d[i]);for(i=c=0;c<b;++c)"^"===f[c]&&"^"!==f[c+1]&&(f[c]="");if(a.ignoreCase&&s)for(c=0;c<b;++c)j=f[c],a=j.charAt(0),j.length>=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p<d;++p){var g=a[p];if(g.ignoreCase)l=!0;else if(/[a-z]/i.test(g.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){s=!0;l=!1;break}}for(var r=
+{b:8,t:9,n:10,v:11,f:12,r:13},n=[],p=0,d=a.length;p<d;++p){g=a[p];if(g.global||g.multiline)throw Error(""+g);n.push("(?:"+y(g)+")")}return RegExp(n.join("|"),l?"gi":"g")}function M(a){function m(a){switch(a.nodeType){case 1:if(e.test(a.className))break;for(var g=a.firstChild;g;g=g.nextSibling)m(g);g=a.nodeName;if("BR"===g||"LI"===g)h[s]="\n",t[s<<1]=y++,t[s++<<1|1]=a;break;case 3:case 4:g=a.nodeValue,g.length&&(g=p?g.replace(/\r\n?/g,"\n"):g.replace(/[\t\n\r ]+/g," "),h[s]=g,t[s<<1]=y,y+=g.length,
+t[s++<<1|1]=a)}}var e=/(?:^|\s)nocode(?:\s|$)/,h=[],y=0,t=[],s=0,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=document.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);m(a);return{a:h.join("").replace(/\n$/,""),c:t}}function B(a,m,e,h){m&&(a={a:m,d:a},e(a),h.push.apply(h,a.e))}function x(a,m){function e(a){for(var l=a.d,p=[l,"pln"],d=0,g=a.a.match(y)||[],r={},n=0,z=g.length;n<z;++n){var f=g[n],b=r[f],o=void 0,c;if(typeof b===
+"string")c=!1;else{var i=h[f.charAt(0)];if(i)o=f.match(i[1]),b=i[0];else{for(c=0;c<t;++c)if(i=m[c],o=f.match(i[1])){b=i[0];break}o||(b="pln")}if((c=b.length>=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m),
+l=[],p={},d=0,g=e.length;d<g;++d){var r=e[d],n=r[3];if(n)for(var k=n.length;--k>=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
+q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/,
+q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g,
+"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a),
+a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e}
+for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g<d.length;++g)e(d[g]);m===(m|0)&&d[0].setAttribute("value",
+m);var r=s.createElement("OL");r.className="linenums";for(var n=Math.max(0,m-1|0)||0,g=0,z=d.length;g<z;++g)l=d[g],l.className="L"+(g+n)%10,l.firstChild||l.appendChild(s.createTextNode("\xa0")),r.appendChild(l);a.appendChild(r)}function k(a,m){for(var e=m.length;--e>=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*</.test(m)?"default-markup":"default-code";return A[a]}function E(a){var m=
+a.g;try{var e=M(a.h),h=e.a;a.a=h;a.c=e.c;a.d=0;C(m,h)(a);var k=/\bMSIE\b/.test(navigator.userAgent),m=/\n/g,t=a.a,s=t.length,e=0,l=a.c,p=l.length,h=0,d=a.e,g=d.length,a=0;d[g]=s;var r,n;for(n=r=0;n<g;)d[n]!==d[n+2]?(d[r++]=d[n++],d[r++]=d[n++]):n+=2;g=r;for(n=r=0;n<g;){for(var z=d[n],f=d[n+1],b=n+2;b+2<=g&&d[b+1]===f;)b+=2;d[r++]=z;d[r++]=f;n=b}for(d.length=r;h<p;){var o=l[h+2]||s,c=d[a+2]||s,b=Math.min(o,c),i=l[h+1],j;if(i.nodeType!==1&&(j=t.substring(e,b))){k&&(j=j.replace(m,"\r"));i.nodeValue=
+j;var u=i.ownerDocument,v=u.createElement("SPAN");v.className=d[a+1];var x=i.parentNode;x.replaceChild(v,i);v.appendChild(i);e<o&&(l[h+1]=i=u.createTextNode(t.substring(b,o)),x.insertBefore(i,v.nextSibling))}e=b;e>=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"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"],F=[w,"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,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],
+H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,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"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"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"],
+J=[v,"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"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"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"+
+I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["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"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["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"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),
+["cv","py"]);k(u({keywords:"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",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes",
+hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p<h.length&&l.now()<e;p++){var n=h[p],k=n.className;if(k.indexOf("prettyprint")>=0){var k=k.match(g),f,b;if(b=
+!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p<h.length?setTimeout(m,
+250):a&&a()}for(var e=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],h=[],k=0;k<e.length;++k)for(var t=0,s=e[k].length;t<s;++t)h.push(e[k][t]);var e=q,l=Date;l.now||(l={now:function(){return+new Date}});var p=0,d,g=/\blang(?:uage)?-([\w.]+)(?!\S)/;m()};window.PR={createSimpleLexer:x,registerLangHandler:k,sourceDecorator:u,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",
+PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}})();
diff --git a/media/prettify-20110601/js-modules/combinePrefixPatterns.js b/media/prettify-20110601/js-modules/combinePrefixPatterns.js
new file mode 100644
index 0000000..3cf4a86
--- /dev/null
+++ b/media/prettify-20110601/js-modules/combinePrefixPatterns.js
@@ -0,0 +1,235 @@
+/**
+ * Given a group of {@link RegExp}s, returns a {@code RegExp} that globally
+ * matches the union of the sets of strings matched by the input RegExp.
+ * Since it matches globally, if the input strings have a start-of-input
+ * anchor (/^.../), it is ignored for the purposes of unioning.
+ * @param {Array.<RegExp>} regexs non multiline, non-global regexs.
+ * @return {RegExp} a global regex.
+ */
+function combinePrefixPatterns(regexs) {
+ var capturedGroupIndex = 0;
+
+ var needToFoldCase = false;
+ var ignoreCase = false;
+ for (var i = 0, n = regexs.length; i < n; ++i) {
+ var regex = regexs[i];
+ if (regex.ignoreCase) {
+ ignoreCase = true;
+ } else if (/[a-z]/i.test(regex.source.replace(
+ /\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi, ''))) {
+ needToFoldCase = true;
+ ignoreCase = false;
+ break;
+ }
+ }
+
+ var escapeCharToCodeUnit = {
+ 'b': 8,
+ 't': 9,
+ 'n': 0xa,
+ 'v': 0xb,
+ 'f': 0xc,
+ 'r': 0xd
+ };
+
+ function decodeEscape(charsetPart) {
+ var cc0 = charsetPart.charCodeAt(0);
+ if (cc0 !== 92 /* \\ */) {
+ return cc0;
+ }
+ var c1 = charsetPart.charAt(1);
+ cc0 = escapeCharToCodeUnit[c1];
+ if (cc0) {
+ return cc0;
+ } else if ('0' <= c1 && c1 <= '7') {
+ return parseInt(charsetPart.substring(1), 8);
+ } else if (c1 === 'u' || c1 === 'x') {
+ return parseInt(charsetPart.substring(2), 16);
+ } else {
+ return charsetPart.charCodeAt(1);
+ }
+ }
+
+ function encodeEscape(charCode) {
+ if (charCode < 0x20) {
+ return (charCode < 0x10 ? '\\x0' : '\\x') + charCode.toString(16);
+ }
+ var ch = String.fromCharCode(charCode);
+ if (ch === '\\' || ch === '-' || ch === '[' || ch === ']') {
+ ch = '\\' + ch;
+ }
+ return ch;
+ }
+
+ function caseFoldCharset(charSet) {
+ var charsetParts = charSet.substring(1, charSet.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'));
+ var groups = [];
+ var ranges = [];
+ var inverse = charsetParts[0] === '^';
+ for (var i = inverse ? 1 : 0, n = charsetParts.length; i < n; ++i) {
+ var p = charsetParts[i];
+ if (/\\[bdsw]/i.test(p)) { // Don't muck with named groups.
+ groups.push(p);
+ } else {
+ var start = decodeEscape(p);
+ var end;
+ if (i + 2 < n && '-' === charsetParts[i + 1]) {
+ end = decodeEscape(charsetParts[i + 2]);
+ i += 2;
+ } else {
+ end = start;
+ }
+ ranges.push([start, end]);
+ // If the range might intersect letters, then expand it.
+ // This case handling is too simplistic.
+ // It does not deal with non-latin case folding.
+ // It works for latin source code identifiers though.
+ if (!(end < 65 || start > 122)) {
+ if (!(end < 65 || start > 90)) {
+ ranges.push([Math.max(65, start) | 32, Math.min(end, 90) | 32]);
+ }
+ if (!(end < 97 || start > 122)) {
+ ranges.push([Math.max(97, start) & ~32, Math.min(end, 122) & ~32]);
+ }
+ }
+ }
+ }
+
+ // [[1, 10], [3, 4], [8, 12], [14, 14], [16, 16], [17, 17]]
+ // -> [[1, 12], [14, 14], [16, 17]]
+ ranges.sort(function (a, b) { return (a[0] - b[0]) || (b[1] - a[1]); });
+ var consolidatedRanges = [];
+ var lastRange = [NaN, NaN];
+ for (var i = 0; i < ranges.length; ++i) {
+ var range = ranges[i];
+ if (range[0] <= lastRange[1] + 1) {
+ lastRange[1] = Math.max(lastRange[1], range[1]);
+ } else {
+ consolidatedRanges.push(lastRange = range);
+ }
+ }
+
+ var out = ['['];
+ if (inverse) { out.push('^'); }
+ out.push.apply(out, groups);
+ for (var i = 0; i < consolidatedRanges.length; ++i) {
+ var range = consolidatedRanges[i];
+ out.push(encodeEscape(range[0]));
+ if (range[1] > range[0]) {
+ if (range[1] + 1 > range[0]) { out.push('-'); }
+ out.push(encodeEscape(range[1]));
+ }
+ }
+ out.push(']');
+ return out.join('');
+ }
+
+ function allowAnywhereFoldCaseAndRenumberGroups(regex) {
+ // Split into character sets, escape sequences, punctuation strings
+ // like ('(', '(?:', ')', '^'), and runs of characters that do not
+ // include any of the above.
+ var parts = regex.source.match(
+ new RegExp(
+ '(?:'
+ + '\\[(?:[^\\x5C\\x5D]|\\\\[\\s\\S])*\\]' // a character set
+ + '|\\\\u[A-Fa-f0-9]{4}' // a unicode escape
+ + '|\\\\x[A-Fa-f0-9]{2}' // a hex escape
+ + '|\\\\[0-9]+' // a back-reference or octal escape
+ + '|\\\\[^ux0-9]' // other escape sequence
+ + '|\\(\\?[:!=]' // start of a non-capturing group
+ + '|[\\(\\)\\^]' // start/emd of a group, or line start
+ + '|[^\\x5B\\x5C\\(\\)\\^]+' // run of other characters
+ + ')',
+ 'g'));
+ var n = parts.length;
+
+ // Maps captured group numbers to the number they will occupy in
+ // the output or to -1 if that has not been determined, or to
+ // undefined if they need not be capturing in the output.
+ var capturedGroups = [];
+
+ // Walk over and identify back references to build the capturedGroups
+ // mapping.
+ for (var i = 0, groupIndex = 0; i < n; ++i) {
+ var p = parts[i];
+ if (p === '(') {
+ // groups are 1-indexed, so max group index is count of '('
+ ++groupIndex;
+ } else if ('\\' === p.charAt(0)) {
+ var decimalValue = +p.substring(1);
+ if (decimalValue && decimalValue <= groupIndex) {
+ capturedGroups[decimalValue] = -1;
+ }
+ }
+ }
+
+ // Renumber groups and reduce capturing groups to non-capturing groups
+ // where possible.
+ for (var i = 1; i < capturedGroups.length; ++i) {
+ if (-1 === capturedGroups[i]) {
+ capturedGroups[i] = ++capturedGroupIndex;
+ }
+ }
+ for (var i = 0, groupIndex = 0; i < n; ++i) {
+ var p = parts[i];
+ if (p === '(') {
+ ++groupIndex;
+ if (capturedGroups[groupIndex] === undefined) {
+ parts[i] = '(?:';
+ }
+ } else if ('\\' === p.charAt(0)) {
+ var decimalValue = +p.substring(1);
+ if (decimalValue && decimalValue <= groupIndex) {
+ parts[i] = '\\' + capturedGroups[groupIndex];
+ }
+ }
+ }
+
+ // Remove any prefix anchors so that the output will match anywhere.
+ // ^^ really does mean an anchored match though.
+ for (var i = 0, groupIndex = 0; i < n; ++i) {
+ if ('^' === parts[i] && '^' !== parts[i + 1]) { parts[i] = ''; }
+ }
+
+ // Expand letters to groups to handle mixing of case-sensitive and
+ // case-insensitive patterns if necessary.
+ if (regex.ignoreCase && needToFoldCase) {
+ for (var i = 0; i < n; ++i) {
+ var p = parts[i];
+ var ch0 = p.charAt(0);
+ if (p.length >= 2 && ch0 === '[') {
+ parts[i] = caseFoldCharset(p);
+ } else if (ch0 !== '\\') {
+ // TODO: handle letters in numeric escapes.
+ parts[i] = p.replace(
+ /[a-zA-Z]/g,
+ function (ch) {
+ var cc = ch.charCodeAt(0);
+ return '[' + String.fromCharCode(cc & ~32, cc | 32) + ']';
+ });
+ }
+ }
+ }
+
+ return parts.join('');
+ }
+
+ var rewritten = [];
+ for (var i = 0, n = regexs.length; i < n; ++i) {
+ var regex = regexs[i];
+ if (regex.global || regex.multiline) { throw new Error('' + regex); }
+ rewritten.push(
+ '(?:' + allowAnywhereFoldCaseAndRenumberGroups(regex) + ')');
+ }
+
+ return new RegExp(rewritten.join('|'), ignoreCase ? 'gi' : 'g');
+}
diff --git a/media/prettify-20110601/js-modules/externs.js b/media/prettify-20110601/js-modules/externs.js
new file mode 100644
index 0000000..e920098
--- /dev/null
+++ b/media/prettify-20110601/js-modules/externs.js
@@ -0,0 +1,37 @@
+var PR = {};
+
+/**
+ * @param {function (Object)} handler
+ * @param {Array.<string>} fileExtensions
+ */
+PR.registerLangHandler = function registerLangHandler(handler, fileExtensions) {};
+
+/**
+ * @param {Array} shortcutStylePatterns
+ * @param {Array} fallthroughStylePatterns
+ * @return {function (Object)}
+ */
+PR.createSimpleLexer = function createSimpleLexer(
+ shortcutStylePatterns, fallthroughStylePatterns) {};
+
+/**
+ * @param {Object} options a set of optional parameters.
+ * @return {function (Object)} a function that examines the source code
+ * in the input job and builds the decoration list.
+ */
+PR.sourceDecorator = function sourceDecorator(options) {};
+
+
+PR.PR_ATTRIB_NAME = 'atn';
+PR.PR_ATTRIB_VALUE = 'atv';
+PR.PR_COMMENT = 'com';
+PR.PR_DECLARATION = 'dec';
+PR.PR_KEYWORD = 'kwd';
+PR.PR_LITERAL = 'lit';
+PR.PR_NOCODE = 'nocode';
+PR.PR_PLAIN = 'pln';
+PR.PR_PUNCTUATION = 'pun';
+PR.PR_SOURCE = 'src';
+PR.PR_STRING = 'str';
+PR.PR_TAG = 'tag';
+PR.PR_TYPE = 'typ';
diff --git a/media/prettify-20110601/js-modules/extractSourceSpans.js b/media/prettify-20110601/js-modules/extractSourceSpans.js
new file mode 100644
index 0000000..29e3b4e
--- /dev/null
+++ b/media/prettify-20110601/js-modules/extractSourceSpans.js
@@ -0,0 +1,99 @@
+/**
+ * Split markup into a string of source code and an array mapping ranges in
+ * that string to the text nodes in which they appear.
+ *
+ * <p>
+ * The HTML DOM structure:</p>
+ * <pre>
+ * (Element "p"
+ * (Element "b"
+ * (Text "print ")) ; #1
+ * (Text "'Hello '") ; #2
+ * (Element "br") ; #3
+ * (Text " + 'World';")) ; #4
+ * </pre>
+ * <p>
+ * corresponds to the HTML
+ * {@code <p><b>print </b>'Hello '<br> + 'World';</p>}.</p>
+ *
+ * <p>
+ * It will produce the output:</p>
+ * <pre>
+ * {
+ * sourceCode: "print 'Hello '\n + 'World';",
+ * // 1 2
+ * // 012345678901234 5678901234567
+ * spans: [0, #1, 6, #2, 14, #3, 15, #4]
+ * }
+ * </pre>
+ * <p>
+ * where #1 is a reference to the {@code "print "} text node above, and so
+ * on for the other text nodes.
+ * </p>
+ *
+ * <p>
+ * The {@code} spans array is an array of pairs. Even elements are the start
+ * indices of substrings, and odd elements are the text nodes (or BR elements)
+ * that contain the text for those substrings.
+ * Substrings continue until the next index or the end of the source.
+ * </p>
+ *
+ * @param {Node} node an HTML DOM subtree containing source-code.
+ * @return {Object} source code and the text nodes in which they occur.
+ */
+function extractSourceSpans(node) {
+ var nocode = /(?:^|\s)nocode(?:\s|$)/;
+
+ var chunks = [];
+ var length = 0;
+ var spans = [];
+ var k = 0;
+
+ var whitespace;
+ if (node.currentStyle) {
+ whitespace = node.currentStyle.whiteSpace;
+ } else if (window.getComputedStyle) {
+ whitespace = document.defaultView.getComputedStyle(node, null)
+ .getPropertyValue('white-space');
+ }
+ var isPreformatted = whitespace && 'pre' === whitespace.substring(0, 3);
+
+ function walk(node) {
+ switch (node.nodeType) {
+ case 1: // Element
+ if (nocode.test(node.className)) { return; }
+ for (var child = node.firstChild; child; child = child.nextSibling) {
+ walk(child);
+ }
+ var nodeName = node.nodeName;
+ if ('BR' === nodeName || 'LI' === nodeName) {
+ chunks[k] = '\n';
+ spans[k << 1] = length++;
+ spans[(k++ << 1) | 1] = node;
+ }
+ break;
+ case 3: case 4: // Text
+ var text = node.nodeValue;
+ if (text.length) {
+ if (!isPreformatted) {
+ text = text.replace(/[ \t\r\n]+/g, ' ');
+ } else {
+ text = text.replace(/\r\n?/g, '\n'); // Normalize newlines.
+ }
+ // TODO: handle tabs here?
+ chunks[k] = text;
+ spans[k << 1] = length;
+ length += text.length;
+ spans[(k++ << 1) | 1] = node;
+ }
+ break;
+ }
+ }
+
+ walk(node);
+
+ return {
+ sourceCode: chunks.join('').replace(/\n$/, ''),
+ spans: spans
+ };
+}
diff --git a/media/prettify-20110601/js-modules/extractSourceSpans_test.html b/media/prettify-20110601/js-modules/extractSourceSpans_test.html
new file mode 100644
index 0000000..090f6e2
--- /dev/null
+++ b/media/prettify-20110601/js-modules/extractSourceSpans_test.html
@@ -0,0 +1,129 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html> <head>
+<title>Extract Source Spans Test</title>
+<script src="extractSourceSpans.js"></script>
+<script src="http://github.com/douglascrockford/JSON-js/raw/master/json2.js"></script>
+<style>
+.ok { background: #dfd }
+.error, .failure { background: #fdd }
+td { font-family: monospace }
+.actual { white-space: pre }
+tr { vertical-align: top }
+.break { padding-left: 2px; border-right-style: dotted !important }
+.odd, .even { border-style: solid; border-width: 1px }
+.even { background: #fff; border-color: #888 }
+.odd { background: #ddd; border-color: #000 }
+</style>
+</head>
+
+<body>
+<h1>Extract Source Spans Test</h1>
+
+<table border=1 cellpadding=2 cellspacing=0>
+ <tr><th colspan=3>Test space preserved in PRE</th></tr>
+ <tr>
+ <td><pre class="testinput"><b>print </b>'Hello '<br> + '&lt;World&gt;';</pre></td>
+ <td class="golden"><pre>^print ^'Hello '^\n^ + '&lt;World&gt;';^</pre></td>
+ </tr>
+ <tr><th colspan=3>Test class="nocode"</th></tr>
+ <tr>
+ <td><pre class="testinput"><span class=nocode>1. </span><b>print </b>'Hello '<br><span class=nocode>2. </span> + '&lt;World&gt;';</pre></td>
+ <td class="golden"><pre>^print ^'Hello '^\n^ + '&lt;World&gt;';^</pre></td>
+ </tr>
+ <tr><th colspan=3>Test whitespace normalized in code</th></tr>
+ <tr>
+ <td><code class="testinput"><b>print </b>'Hello '
+ + '&lt;World&gt;';</pre></td>
+ <td class="golden"><pre>^print ^'Hello ' + '&lt;World&gt;';^</pre></td>
+ </tr>
+ <tr><th colspan=3>Test XMP</th></tr>
+ <tr>
+ <td><xmp class="testinput">print 'Hello '
+ + '<World>';</xmp></td>
+ <td class="golden"><pre>^print 'Hello '\n + '&lt;World&gt;';^</pre></td>
+ </tr>
+ <tr><th colspan=3>Test tabs</th></tr>
+ <tr>
+ <td><pre class="testinput">print 'Hello '
+&#9;+ '&lt;World&gt;';</pre></td>
+ <td class="golden"><pre>^print 'Hello '\n\t+ '&lt;World&gt;';^</pre></td>
+ </tr>
+ <tr><th colspan=3>Test number lines output</th></tr>
+ <tr>
+ <td><pre class="testinput"><ul><li><b>print </b>'Hello '</li><li> + '&lt;World&gt;';</pre></li></ul></td>
+ <td class="golden"><pre>^print ^'Hello '^\n^ + '&lt;World&gt;';^^</pre></td>
+ </tr>
+</table>
+
+<script>
+if (!document.body.getElementsByClassName) {
+ document.body.getElementsByClassName = function (className) {
+ className = className.replace(/\s+/g, ' ').replace(/^\s*|\s*$/g, ' ');
+ var results = [];
+ function walk(node) {
+ if (node.nodeType !== 1) { return; }
+ // This test should be order-insensitive.
+ if ((' ' + node.className + ' ').indexOf(className) >= 0) {
+ results[results.length] = node;
+ }
+ for (var child = node.firstChild; child; child = child.nextSibling) {
+ walk(child);
+ }
+ }
+ walk(document.body);
+ return results;
+ };
+}
+
+setTimeout(function () {
+ function stringify(s) {
+ return JSON.stringify(s).replace(/\r/g, '\\r').replace(/\n/g, '\\n')
+ .replace(/\t/g, '\\t');
+ }
+
+ var testInputs = Array.prototype.slice.call(
+ document.body.getElementsByClassName('testinput'), 0);
+ for (var i = 0, n = testInputs.length; i < n; ++i) {
+ var testInput = testInputs[i];
+ var testResult = testInput.parentNode.nextSibling;
+ while (testResult.nodeType !== 1) { testResult = testResult.nextSibling; }
+ var actual = document.createElement('TD');
+ actual.className = 'actual';
+ testResult.parentNode.appendChild(actual);
+ try {
+ var sourceAndSpans = extractSourceSpans(testInput);
+ var source = sourceAndSpans.source;
+ var actualText = '^';
+ var actualHtml = '';
+ var spans = sourceAndSpans.spans;
+ for (var j = 0, m = spans.length; j < m; j += 2) {
+ var start = spans[j], end = spans[j + 2] || source.length;
+ var span = source.substring(start, end);
+ actualText += span + '^';
+ var spanClass = ((j & 2) ? 'odd' : 'even');
+ if (spans[j + 1].nodeName === 'BR') {
+ spanClass += ' break';
+ }
+ actualHtml += '<span class="' + spanClass+ '">'
+ + span.replace(/&/g, '&amp;').replace(/</g, '&lt;') + '<\/span>';
+ }
+ actual.innerHTML = '<pre>' + actualHtml + '<\/pre>';
+ var goldenText = testResult.innerText || testResult.textContent;
+ var goldenNormalized = '"' + goldenText.replace(/(?:\r\n?|\n)$/, '') + '"';
+ var actualNormalized = stringify(actualText);
+ var passed = actualNormalized === goldenNormalized;
+ if (!passed) {
+ console.log(goldenNormalized + ' !==\n' + actualNormalized);
+ }
+ actual.className += passed ? ' ok' : ' failure';
+ } catch (ex) {
+ actual.className += ' error';
+ actual.appendChild(document.createTextNode('Error: ' + (ex.message || ex)));
+ }
+ }
+}, 0)</script>
+
+<hr>
+<address></address>
+<!-- hhmts start --> Last modified: Tue Mar 29 16:38:23 PDT 2011 <!-- hhmts end -->
+</body> </html>
diff --git a/media/prettify-20110601/js-modules/numberLines.js b/media/prettify-20110601/js-modules/numberLines.js
new file mode 100644
index 0000000..b1c5dab
--- /dev/null
+++ b/media/prettify-20110601/js-modules/numberLines.js
@@ -0,0 +1,147 @@
+/**
+ * Given a DOM subtree, wraps it in a list, and puts each line into its own
+ * list item.
+ *
+ * @param {Node} node modified in place. Its content is pulled into an
+ * HTMLOListElement, and each line is moved into a separate list item.
+ * This requires cloning elements, so the input might not have unique
+ * IDs after numbering.
+ */
+function numberLines(node, opt_startLineNum) {
+ var nocode = /(?:^|\s)nocode(?:\s|$)/;
+ var lineBreak = /\r\n?|\n/;
+
+ var document = node.ownerDocument;
+
+ var whitespace;
+ if (node.currentStyle) {
+ whitespace = node.currentStyle.whiteSpace;
+ } else if (window.getComputedStyle) {
+ whitespace = document.defaultView.getComputedStyle(node, null)
+ .getPropertyValue('white-space');
+ }
+ // If it's preformatted, then we need to split lines on line breaks
+ // in addition to <BR>s.
+ var isPreformatted = whitespace && 'pre' === whitespace.substring(0, 3);
+
+ var li = document.createElement('LI');
+ while (node.firstChild) {
+ li.appendChild(node.firstChild);
+ }
+ // An array of lines. We split below, so this is initialized to one
+ // un-split line.
+ var listItems = [li];
+
+ function walk(node) {
+ switch (node.nodeType) {
+ case 1: // Element
+ if (nocode.test(node.className)) { break; }
+ if ('BR' === node.nodeName) {
+ breakAfter(node);
+ // Discard the <BR> since it is now flush against a </LI>.
+ if (node.parentNode) {
+ node.parentNode.removeChild(node);
+ }
+ } else {
+ for (var child = node.firstChild; child; child = child.nextSibling) {
+ walk(child);
+ }
+ }
+ break;
+ case 3: case 4: // Text
+ if (isPreformatted) {
+ var text = node.nodeValue;
+ var match = text.match(lineBreak);
+ if (match) {
+ var firstLine = text.substring(0, match.index);
+ node.nodeValue = firstLine;
+ var tail = text.substring(match.index + match[0].length);
+ if (tail) {
+ var parent = node.parentNode;
+ parent.insertBefore(
+ document.createTextNode(tail), node.nextSibling);
+ }
+ breakAfter(node);
+ if (!firstLine) {
+ // Don't leave blank text nodes in the DOM.
+ node.parentNode.removeChild(node);
+ }
+ }
+ }
+ break;
+ }
+ }
+
+ // Split a line after the given node.
+ function breakAfter(lineEndNode) {
+ // If there's nothing to the right, then we can skip ending the line
+ // here, and move root-wards since splitting just before an end-tag
+ // would require us to create a bunch of empty copies.
+ while (!lineEndNode.nextSibling) {
+ lineEndNode = lineEndNode.parentNode;
+ if (!lineEndNode) { return; }
+ }
+
+ function breakLeftOf(limit, copy) {
+ // Clone shallowly if this node needs to be on both sides of the break.
+ var rightSide = copy ? limit.cloneNode(false) : limit;
+ var parent = limit.parentNode;
+ if (parent) {
+ // We clone the parent chain.
+ // This helps us resurrect important styling elements that cross lines.
+ // E.g. in <i>Foo<br>Bar</i>
+ // should be rewritten to <li><i>Foo</i></li><li><i>Bar</i></li>.
+ var parentClone = breakLeftOf(parent, 1);
+ // Move the clone and everything to the right of the original
+ // onto the cloned parent.
+ var next = limit.nextSibling;
+ parentClone.appendChild(rightSide);
+ for (var sibling = next; sibling; sibling = next) {
+ next = sibling.nextSibling;
+ parentClone.appendChild(sibling);
+ }
+ }
+ return rightSide;
+ }
+
+ var copiedListItem = breakLeftOf(lineEndNode.nextSibling, 0);
+
+ // Walk the parent chain until we reach an unattached LI.
+ for (var parent;
+ // Check nodeType since IE invents document fragments.
+ (parent = copiedListItem.parentNode) && parent.nodeType === 1;) {
+ copiedListItem = parent;
+ }
+ // Put it on the list of lines for later processing.
+ listItems.push(copiedListItem);
+ }
+
+ // Split lines while there are lines left to split.
+ for (var i = 0; // Number of lines that have been split so far.
+ i < listItems.length; // length updated by breakAfter calls.
+ ++i) {
+ walk(listItems[i]);
+ }
+
+ // Make sure numeric indices show correctly.
+ if (opt_startLineNum === (opt_startLineNum|0)) {
+ listItems[0].setAttribute('value', opt_startLineNum);
+ }
+
+ var ol = document.createElement('OL');
+ ol.className = 'linenums';
+ var offset = Math.max(0, ((opt_startLineNum - 1 /* zero index */)) | 0) || 0;
+ for (var i = 0, n = listItems.length; i < n; ++i) {
+ li = listItems[i];
+ // Stick a class on the LIs so that stylesheets can
+ // color odd/even rows, or any other row pattern that
+ // is co-prime with 10.
+ li.className = 'L' + ((i + offset) % 10);
+ if (!li.firstChild) {
+ li.appendChild(document.createTextNode('\xA0'));
+ }
+ ol.appendChild(li);
+ }
+
+ node.appendChild(ol);
+} \ No newline at end of file
diff --git a/media/prettify-20110601/js-modules/numberLines_test.html b/media/prettify-20110601/js-modules/numberLines_test.html
new file mode 100644
index 0000000..a074e01
--- /dev/null
+++ b/media/prettify-20110601/js-modules/numberLines_test.html
@@ -0,0 +1,119 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html> <head>
+<title>Number Lines Test</title>
+<script src="numberLines.js"></script>
+<script src="http://github.com/douglascrockford/JSON-js/raw/master/json2.js"></script>
+<style>
+.ok { background: #dfd }
+.error, .failure { background: #fdd }
+td { font-family: monospace }
+tr { vertical-align: top }
+</style>
+</head>
+
+<body>
+<h1>Number Lines Test</h1>
+
+<table>
+ <tr><th colspan=3>Test Nothing to Split</th></tr>
+ <tr>
+ <td><code class="testinput">Hello, World!</code></td>
+ <td><code><ol class="linenums"><li class="L0">Hello, World!</li></ol></code></td>
+ </tr>
+ <tr><th colspan=3>Test Normalized Spaces</th></tr>
+ <tr>
+ <td><code class="testinput">Hello,&#10;World!</code></td>
+ <td><code><ol class="linenums"><li class="L0">Hello,&#10;World!</li></ol></code></td>
+ </tr>
+ <tr><th colspan=3>Test BR</th></tr>
+ <tr>
+ <td><pre class="testinput">Hello,<br>World!</pre></td>
+ <td><pre><ol class="linenums"><li class="L0">Hello,</li><li class="L1">World!</li></ol></pre></td>
+ </tr>
+ <tr><th colspan=3>Test line breaks</th></tr>
+ <tr>
+ <td><pre class="testinput">Hello,&#10;there&#10;World!</pre></td>
+ <td><pre><ol class="linenums"><li class="L0">Hello,</li><li class="L1">there</li><li class="L2">World!</li></ol></pre></td>
+ </tr>
+ <tr><th colspan=3>Test line breaks with followers</th></tr>
+ <tr>
+ <td><pre class="testinput"><b>Hello,&#10;there&#10;World!&#10;</b><button>OK</button></pre></td>
+ <td><pre><ol class="linenums"><li class="L0"><b>Hello,</b></li><li class="L1"><b>there</b></li><li class="L2"><b>World!</b></li><li class="L3"><button>OK</button></ol></pre></td>
+ </tr>
+ <tr><th colspan=3>Test nocode</th></tr>
+ <tr>
+ <td><pre class="testinput">Hello,&#10;the<span class="nocode">re&#10;World!</span></pre></td>
+ <td><pre><ol class="linenums"><li class="L0">Hello,</li><li class="L1">the<span class="nocode">re&#10;World!</span></li></ol></pre></td>
+ </tr>
+ <tr><th colspan=3>Test link</th></tr>
+ <tr>
+ <td><pre class="testinput">Hello,&#10;the<a href="#" style="font-weight: bold">re&#10;Wor</a>ld!</pre></td>
+ <td><pre><ol class="linenums"><li class="L0">Hello,</li><li class="L1">the<a href="#" style="font-weight: bold">re</a></li><li class="L2"><a href="#" style="font-weight: bold">Wor</a>ld!</li></ol></pre></td>
+ </tr>
+ <tr><th colspan=3>Test blank lines</th></tr>
+ <tr>
+ <td><pre class="testinput">One&#10;&#10;Three</pre></td>
+ <td><pre><ol class="linenums"><li class="L0">One</li><li class="L1">&nbsp;</li><li class="L2">Three</li></ol></pre></td>
+ </tr>
+</table>
+
+<script>
+if (!document.body.getElementsByClassName) {
+ document.body.getElementsByClassName = function (className) {
+ className = className.replace(/\s+/g, ' ').replace(/^\s*|\s*$/g, ' ');
+ var results = [];
+ function walk(node) {
+ if (node.nodeType !== 1) { return; }
+ // This test should be order-insensitive.
+ if ((' ' + node.className + ' ').indexOf(className) >= 0) {
+ results[results.length] = node;
+ }
+ for (var child = node.firstChild; child; child = child.nextSibling) {
+ walk(child);
+ }
+ }
+ walk(document.body);
+ return results;
+ };
+}
+
+setTimeout(function () {
+ function normListItems(html) {
+ // IE likes to leave out </li>s before <li>s.
+ return html.replace(/<\/li>(<li\b)/gi, '$1');
+ }
+
+ var testInputs = Array.prototype.slice.call(
+ document.body.getElementsByClassName('testinput'), 0);
+ for (var i = 0, n = testInputs.length; i < n; ++i) {
+ var testInput = testInputs[i];
+ var testResult = testInput.parentNode.nextSibling;
+ while (testResult.nodeType !== 1) { testResult = testResult.nextSibling; }
+ var actual = document.createElement('TD');
+ testResult.parentNode.appendChild(actual);
+ try {
+ var testInputClone = testInput.cloneNode(true);
+ testInputClone.className = ''; // IE
+ testInputClone.removeAttribute('class'); // Not IE.
+ actual.appendChild(testInputClone);
+ numberLines(testInputClone);
+ var goldenNorm = normListItems(testResult.innerHTML);
+ var actualNorm = normListItems(actual.innerHTML);
+ var passed = goldenNorm === actualNorm;
+ if (!passed) {
+ console.log(JSON.stringify(goldenNorm)
+ + ' !==\n' + JSON.stringify(actualNorm));
+ }
+ actual.className = passed ? 'ok' : 'failure';
+ } catch (ex) {
+ actual.className = 'error';
+ actual.appendChild(document.createTextNode('Error: ' + (ex.message || ex)));
+ }
+ actual.className += ' actual';
+ }
+}, 0)</script>
+
+<hr>
+<address></address>
+<!-- hhmts start --> Last modified: Tue Mar 29 16:44:05 PDT 2011 <!-- hhmts end -->
+</body> </html>
diff --git a/media/prettify-20110601/js-modules/prettify.js b/media/prettify-20110601/js-modules/prettify.js
new file mode 100644
index 0000000..1cfa4f2
--- /dev/null
+++ b/media/prettify-20110601/js-modules/prettify.js
@@ -0,0 +1,861 @@
+// Copyright (C) 2006 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+
+/**
+ * @fileoverview
+ * some functions for browser-side pretty printing of code contained in html.
+ *
+ * <p>
+ * For a fairly comprehensive set of languages see the
+ * <a href="http://google-code-prettify.googlecode.com/svn/trunk/README.html#langs">README</a>
+ * file that came with this source. At a minimum, the lexer should work on a
+ * number of languages including C and friends, Java, Python, Bash, SQL, HTML,
+ * XML, CSS, Javascript, and Makefiles. It works passably on Ruby, PHP and Awk
+ * and a subset of Perl, but, because of commenting conventions, doesn't work on
+ * Smalltalk, Lisp-like, or CAML-like languages without an explicit lang class.
+ * <p>
+ * Usage: <ol>
+ * <li> include this source file in an html page via
+ * {@code <script type="text/javascript" src="/path/to/prettify.js"></script>}
+ * <li> define style rules. See the example page for examples.
+ * <li> mark the {@code <pre>} and {@code <code>} tags in your source with
+ * {@code class=prettyprint.}
+ * You can also use the (html deprecated) {@code <xmp>} tag, but the pretty
+ * printer needs to do more substantial DOM manipulations to support that, so
+ * some css styles may not be preserved.
+ * </ol>
+ * That's it. I wanted to keep the API as simple as possible, so there's no
+ * need to specify which language the code is in, but if you wish, you can add
+ * another class to the {@code <pre>} or {@code <code>} element to specify the
+ * language, as in {@code <pre class="prettyprint lang-java">}. Any class that
+ * starts with "lang-" followed by a file extension, specifies the file type.
+ * See the "lang-*.js" files in this directory for code that implements
+ * per-language file handlers.
+ * <p>
+ * Change log:<br>
+ * cbeust, 2006/08/22
+ * <blockquote>
+ * Java annotations (start with "@") are now captured as literals ("lit")
+ * </blockquote>
+ * @requires console
+ */
+
+// JSLint declarations
+/*global console, document, navigator, setTimeout, window */
+
+/**
+ * Split {@code prettyPrint} into multiple timeouts so as not to interfere with
+ * UI events.
+ * If set to {@code false}, {@code prettyPrint()} is synchronous.
+ */
+window['PR_SHOULD_USE_CONTINUATION'] = true;
+
+(function () {
+ // Keyword lists for various languages.
+ // We use things that coerce to strings to make them compact when minified
+ // and to defeat aggressive optimizers that fold large string constants.
+ var FLOW_CONTROL_KEYWORDS = ["break,continue,do,else,for,if,return,while"];
+ var C_KEYWORDS = [FLOW_CONTROL_KEYWORDS,"auto,case,char,const,default," +
+ "double,enum,extern,float,goto,int,long,register,short,signed,sizeof," +
+ "static,struct,switch,typedef,union,unsigned,void,volatile"];
+ var COMMON_KEYWORDS = [C_KEYWORDS,"catch,class,delete,false,import," +
+ "new,operator,private,protected,public,this,throw,true,try,typeof"];
+ var CPP_KEYWORDS = [COMMON_KEYWORDS,"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,where"];
+ var JAVA_KEYWORDS = [COMMON_KEYWORDS,
+ "abstract,boolean,byte,extends,final,finally,implements,import," +
+ "instanceof,null,native,package,strictfp,super,synchronized,throws," +
+ "transient"];
+ var CSHARP_KEYWORDS = [JAVA_KEYWORDS,
+ "as,base,by,checked,decimal,delegate,descending,dynamic,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"];
+ var COFFEE_KEYWORDS = "all,and,by,catch,class,else,extends,false,finally," +
+ "for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then," +
+ "true,try,unless,until,when,while,yes";
+ var JSCRIPT_KEYWORDS = [COMMON_KEYWORDS,
+ "debugger,eval,export,function,get,null,set,undefined,var,with," +
+ "Infinity,NaN"];
+ var PERL_KEYWORDS = "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";
+ var PYTHON_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "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"];
+ var RUBY_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "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"];
+ var SH_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "case,done,elif,esac,eval,fi," +
+ "function,in,local,set,then,until"];
+ var ALL_KEYWORDS = [
+ CPP_KEYWORDS, CSHARP_KEYWORDS, JSCRIPT_KEYWORDS, PERL_KEYWORDS +
+ PYTHON_KEYWORDS, RUBY_KEYWORDS, SH_KEYWORDS];
+ var C_TYPES = /^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;
+
+ // token style names. correspond to css classes
+ /**
+ * token style for a string literal
+ * @const
+ */
+ var PR_STRING = 'str';
+ /**
+ * token style for a keyword
+ * @const
+ */
+ var PR_KEYWORD = 'kwd';
+ /**
+ * token style for a comment
+ * @const
+ */
+ var PR_COMMENT = 'com';
+ /**
+ * token style for a type
+ * @const
+ */
+ var PR_TYPE = 'typ';
+ /**
+ * token style for a literal value. e.g. 1, null, true.
+ * @const
+ */
+ var PR_LITERAL = 'lit';
+ /**
+ * token style for a punctuation string.
+ * @const
+ */
+ var PR_PUNCTUATION = 'pun';
+ /**
+ * token style for a punctuation string.
+ * @const
+ */
+ var PR_PLAIN = 'pln';
+
+ /**
+ * token style for an sgml tag.
+ * @const
+ */
+ var PR_TAG = 'tag';
+ /**
+ * token style for a markup declaration such as a DOCTYPE.
+ * @const
+ */
+ var PR_DECLARATION = 'dec';
+ /**
+ * token style for embedded source.
+ * @const
+ */
+ var PR_SOURCE = 'src';
+ /**
+ * token style for an sgml attribute name.
+ * @const
+ */
+ var PR_ATTRIB_NAME = 'atn';
+ /**
+ * token style for an sgml attribute value.
+ * @const
+ */
+ var PR_ATTRIB_VALUE = 'atv';
+
+ /**
+ * A class that indicates a section of markup that is not code, e.g. to allow
+ * embedding of line numbers within code listings.
+ * @const
+ */
+ var PR_NOCODE = 'nocode';
+
+ include("regexpPrecederPatterns.pl");
+
+ include("combinePrefixPatterns.js");
+
+ include("extractSourceSpans.js");
+
+ /**
+ * Apply the given language handler to sourceCode and add the resulting
+ * decorations to out.
+ * @param {number} basePos the index of sourceCode within the chunk of source
+ * whose decorations are already present on out.
+ */
+ function appendDecorations(basePos, sourceCode, langHandler, out) {
+ if (!sourceCode) { return; }
+ var job = {
+ sourceCode: sourceCode,
+ basePos: basePos
+ };
+ langHandler(job);
+ out.push.apply(out, job.decorations);
+ }
+
+ var notWs = /\S/;
+
+ /**
+ * Given an element, if it contains only one child element and any text nodes
+ * it contains contain only space characters, return the sole child element.
+ * Otherwise returns undefined.
+ * <p>
+ * This is meant to return the CODE element in {@code <pre><code ...>} when
+ * there is a single child element that contains all the non-space textual
+ * content, but not to return anything where there are multiple child elements
+ * as in {@code <pre><code>...</code><code>...</code></pre>} or when there
+ * is textual content.
+ */
+ function childContentWrapper(element) {
+ var wrapper = undefined;
+ for (var c = element.firstChild; c; c = c.nextSibling) {
+ var type = c.nodeType;
+ wrapper = (type === 1) // Element Node
+ ? (wrapper ? element : c)
+ : (type === 3) // Text Node
+ ? (notWs.test(c.nodeValue) ? element : wrapper)
+ : wrapper;
+ }
+ return wrapper === element ? undefined : wrapper;
+ }
+
+ /** Given triples of [style, pattern, context] returns a lexing function,
+ * The lexing function interprets the patterns to find token boundaries and
+ * returns a decoration list of the form
+ * [index_0, style_0, index_1, style_1, ..., index_n, style_n]
+ * where index_n is an index into the sourceCode, and style_n is a style
+ * constant like PR_PLAIN. index_n-1 <= index_n, and style_n-1 applies to
+ * all characters in sourceCode[index_n-1:index_n].
+ *
+ * The stylePatterns is a list whose elements have the form
+ * [style : string, pattern : RegExp, DEPRECATED, shortcut : string].
+ *
+ * Style is a style constant like PR_PLAIN, or can be a string of the
+ * form 'lang-FOO', where FOO is a language extension describing the
+ * language of the portion of the token in $1 after pattern executes.
+ * E.g., if style is 'lang-lisp', and group 1 contains the text
+ * '(hello (world))', then that portion of the token will be passed to the
+ * registered lisp handler for formatting.
+ * The text before and after group 1 will be restyled using this decorator
+ * so decorators should take care that this doesn't result in infinite
+ * recursion. For example, the HTML lexer rule for SCRIPT elements looks
+ * something like ['lang-js', /<[s]cript>(.+?)<\/script>/]. This may match
+ * '<script>foo()<\/script>', which would cause the current decorator to
+ * be called with '<script>' which would not match the same rule since
+ * group 1 must not be empty, so it would be instead styled as PR_TAG by
+ * the generic tag rule. The handler registered for the 'js' extension would
+ * then be called with 'foo()', and finally, the current decorator would
+ * be called with '<\/script>' which would not match the original rule and
+ * so the generic tag rule would identify it as a tag.
+ *
+ * Pattern must only match prefixes, and if it matches a prefix, then that
+ * match is considered a token with the same style.
+ *
+ * Context is applied to the last non-whitespace, non-comment token
+ * recognized.
+ *
+ * Shortcut is an optional string of characters, any of which, if the first
+ * character, gurantee that this pattern and only this pattern matches.
+ *
+ * @param {Array} shortcutStylePatterns patterns that always start with
+ * a known character. Must have a shortcut string.
+ * @param {Array} fallthroughStylePatterns patterns that will be tried in
+ * order if the shortcut ones fail. May have shortcuts.
+ *
+ * @return {function (Object)} a
+ * function that takes source code and returns a list of decorations.
+ */
+ function createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns) {
+ var shortcuts = {};
+ var tokenizer;
+ (function () {
+ var allPatterns = shortcutStylePatterns.concat(fallthroughStylePatterns);
+ var allRegexs = [];
+ var regexKeys = {};
+ for (var i = 0, n = allPatterns.length; i < n; ++i) {
+ var patternParts = allPatterns[i];
+ var shortcutChars = patternParts[3];
+ if (shortcutChars) {
+ for (var c = shortcutChars.length; --c >= 0;) {
+ shortcuts[shortcutChars.charAt(c)] = patternParts;
+ }
+ }
+ var regex = patternParts[1];
+ var k = '' + regex;
+ if (!regexKeys.hasOwnProperty(k)) {
+ allRegexs.push(regex);
+ regexKeys[k] = null;
+ }
+ }
+ allRegexs.push(/[\0-\uffff]/);
+ tokenizer = combinePrefixPatterns(allRegexs);
+ })();
+
+ var nPatterns = fallthroughStylePatterns.length;
+
+ /**
+ * Lexes job.sourceCode and produces an output array job.decorations of
+ * style classes preceded by the position at which they start in
+ * job.sourceCode in order.
+ *
+ * @param {Object} job an object like <pre>{
+ * sourceCode: {string} sourceText plain text,
+ * basePos: {int} position of job.sourceCode in the larger chunk of
+ * sourceCode.
+ * }</pre>
+ */
+ var decorate = function (job) {
+ var sourceCode = job.sourceCode, basePos = job.basePos;
+ /** Even entries are positions in source in ascending order. Odd enties
+ * are style markers (e.g., PR_COMMENT) that run from that position until
+ * the end.
+ * @type {Array.<number|string>}
+ */
+ var decorations = [basePos, PR_PLAIN];
+ var pos = 0; // index into sourceCode
+ var tokens = sourceCode.match(tokenizer) || [];
+ var styleCache = {};
+
+ for (var ti = 0, nTokens = tokens.length; ti < nTokens; ++ti) {
+ var token = tokens[ti];
+ var style = styleCache[token];
+ var match = void 0;
+
+ var isEmbedded;
+ if (typeof style === 'string') {
+ isEmbedded = false;
+ } else {
+ var patternParts = shortcuts[token.charAt(0)];
+ if (patternParts) {
+ match = token.match(patternParts[1]);
+ style = patternParts[0];
+ } else {
+ for (var i = 0; i < nPatterns; ++i) {
+ patternParts = fallthroughStylePatterns[i];
+ match = token.match(patternParts[1]);
+ if (match) {
+ style = patternParts[0];
+ break;
+ }
+ }
+
+ if (!match) { // make sure that we make progress
+ style = PR_PLAIN;
+ }
+ }
+
+ isEmbedded = style.length >= 5 && 'lang-' === style.substring(0, 5);
+ if (isEmbedded && !(match && typeof match[1] === 'string')) {
+ isEmbedded = false;
+ style = PR_SOURCE;
+ }
+
+ if (!isEmbedded) { styleCache[token] = style; }
+ }
+
+ var tokenStart = pos;
+ pos += token.length;
+
+ if (!isEmbedded) {
+ decorations.push(basePos + tokenStart, style);
+ } else { // Treat group 1 as an embedded block of source code.
+ var embeddedSource = match[1];
+ var embeddedSourceStart = token.indexOf(embeddedSource);
+ var embeddedSourceEnd = embeddedSourceStart + embeddedSource.length;
+ if (match[2]) {
+ // If embeddedSource can be blank, then it would match at the
+ // beginning which would cause us to infinitely recurse on the
+ // entire token, so we catch the right context in match[2].
+ embeddedSourceEnd = token.length - match[2].length;
+ embeddedSourceStart = embeddedSourceEnd - embeddedSource.length;
+ }
+ var lang = style.substring(5);
+ // Decorate the left of the embedded source
+ appendDecorations(
+ basePos + tokenStart,
+ token.substring(0, embeddedSourceStart),
+ decorate, decorations);
+ // Decorate the embedded source
+ appendDecorations(
+ basePos + tokenStart + embeddedSourceStart,
+ embeddedSource,
+ langHandlerForExtension(lang, embeddedSource),
+ decorations);
+ // Decorate the right of the embedded section
+ appendDecorations(
+ basePos + tokenStart + embeddedSourceEnd,
+ token.substring(embeddedSourceEnd),
+ decorate, decorations);
+ }
+ }
+ job.decorations = decorations;
+ };
+ return decorate;
+ }
+
+ /** returns a function that produces a list of decorations from source text.
+ *
+ * This code treats ", ', and ` as string delimiters, and \ as a string
+ * escape. It does not recognize perl's qq() style strings.
+ * It has no special handling for double delimiter escapes as in basic, or
+ * the tripled delimiters used in python, but should work on those regardless
+ * although in those cases a single string literal may be broken up into
+ * multiple adjacent string literals.
+ *
+ * It recognizes C, C++, and shell style comments.
+ *
+ * @param {Object} options a set of optional parameters.
+ * @return {function (Object)} a function that examines the source code
+ * in the input job and builds the decoration list.
+ */
+ function sourceDecorator(options) {
+ var shortcutStylePatterns = [], fallthroughStylePatterns = [];
+ if (options['tripleQuotedStrings']) {
+ // '''multi-line-string''', 'single-line-string', and double-quoted
+ shortcutStylePatterns.push(
+ [PR_STRING, /^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,
+ null, '\'"']);
+ } else if (options['multiLineStrings']) {
+ // 'multi-line-string', "multi-line-string"
+ shortcutStylePatterns.push(
+ [PR_STRING, /^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,
+ null, '\'"`']);
+ } else {
+ // 'single-line-string', "single-line-string"
+ shortcutStylePatterns.push(
+ [PR_STRING,
+ /^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,
+ null, '"\'']);
+ }
+ if (options['verbatimStrings']) {
+ // verbatim-string-literal production from the C# grammar. See issue 93.
+ fallthroughStylePatterns.push(
+ [PR_STRING, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null]);
+ }
+ var hc = options['hashComments'];
+ if (hc) {
+ if (options['cStyleComments']) {
+ if (hc > 1) { // multiline hash comments
+ shortcutStylePatterns.push(
+ [PR_COMMENT, /^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/, null, '#']);
+ } else {
+ // Stop C preprocessor declarations at an unclosed open comment
+ shortcutStylePatterns.push(
+ [PR_COMMENT, /^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,
+ null, '#']);
+ }
+ fallthroughStylePatterns.push(
+ [PR_STRING,
+ /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,
+ null]);
+ } else {
+ shortcutStylePatterns.push([PR_COMMENT, /^#[^\r\n]*/, null, '#']);
+ }
+ }
+ if (options['cStyleComments']) {
+ fallthroughStylePatterns.push([PR_COMMENT, /^\/\/[^\r\n]*/, null]);
+ fallthroughStylePatterns.push(
+ [PR_COMMENT, /^\/\*[\s\S]*?(?:\*\/|$)/, null]);
+ }
+ if (options['regexLiterals']) {
+ /**
+ * @const
+ */
+ var REGEX_LITERAL = (
+ // A regular expression literal starts with a slash that is
+ // not followed by * or / so that it is not confused with
+ // comments.
+ '/(?=[^/*])'
+ // and then contains any number of raw characters,
+ + '(?:[^/\\x5B\\x5C]'
+ // escape sequences (\x5C),
+ + '|\\x5C[\\s\\S]'
+ // or non-nesting character sets (\x5B\x5D);
+ + '|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+'
+ // finally closed by a /.
+ + '/');
+ fallthroughStylePatterns.push(
+ ['lang-regex',
+ new RegExp('^' + REGEXP_PRECEDER_PATTERN + '(' + REGEX_LITERAL + ')')
+ ]);
+ }
+
+ var types = options['types'];
+ if (types) {
+ fallthroughStylePatterns.push([PR_TYPE, types]);
+ }
+
+ var keywords = ("" + options['keywords']).replace(/^ | $/g, '');
+ if (keywords.length) {
+ fallthroughStylePatterns.push(
+ [PR_KEYWORD,
+ new RegExp('^(?:' + keywords.replace(/[\s,]+/g, '|') + ')\\b'),
+ null]);
+ }
+
+ shortcutStylePatterns.push([PR_PLAIN, /^\s+/, null, ' \r\n\t\xA0']);
+ fallthroughStylePatterns.push(
+ // TODO(mikesamuel): recognize non-latin letters and numerals in idents
+ [PR_LITERAL, /^@[a-z_$][a-z_$@0-9]*/i, null],
+ [PR_TYPE, /^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/, null],
+ [PR_PLAIN, /^[a-z_$][a-z_$@0-9]*/i, null],
+ [PR_LITERAL,
+ new RegExp(
+ '^(?:'
+ // A hex number
+ + '0x[a-f0-9]+'
+ // or an octal or decimal number,
+ + '|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)'
+ // possibly in scientific notation
+ + '(?:e[+\\-]?\\d+)?'
+ + ')'
+ // with an optional modifier like UL for unsigned long
+ + '[a-z]*', 'i'),
+ null, '0123456789'],
+ // Don't treat escaped quotes in bash as starting strings. See issue 144.
+ [PR_PLAIN, /^\\[\s\S]?/, null],
+ [PR_PUNCTUATION, /^.[^\s\w\.$@\'\"\`\/\#\\]*/, null]);
+
+ return createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns);
+ }
+
+ var decorateSource = sourceDecorator({
+ 'keywords': ALL_KEYWORDS,
+ 'hashComments': true,
+ 'cStyleComments': true,
+ 'multiLineStrings': true,
+ 'regexLiterals': true
+ });
+
+ include("numberLines.js");
+
+ include("recombineTagsAndDecorations.js");
+
+ /** Maps language-specific file extensions to handlers. */
+ var langHandlerRegistry = {};
+ /** Register a language handler for the given file extensions.
+ * @param {function (Object)} handler a function from source code to a list
+ * of decorations. Takes a single argument job which describes the
+ * state of the computation. The single parameter has the form
+ * {@code {
+ * sourceCode: {string} as plain text.
+ * decorations: {Array.<number|string>} an array of style classes
+ * preceded by the position at which they start in
+ * job.sourceCode in order.
+ * The language handler should assigned this field.
+ * basePos: {int} the position of source in the larger source chunk.
+ * All positions in the output decorations array are relative
+ * to the larger source chunk.
+ * } }
+ * @param {Array.<string>} fileExtensions
+ */
+ function registerLangHandler(handler, fileExtensions) {
+ for (var i = fileExtensions.length; --i >= 0;) {
+ var ext = fileExtensions[i];
+ if (!langHandlerRegistry.hasOwnProperty(ext)) {
+ langHandlerRegistry[ext] = handler;
+ } else if (window['console']) {
+ console['warn']('cannot override language handler %s', ext);
+ }
+ }
+ }
+ function langHandlerForExtension(extension, source) {
+ if (!(extension && langHandlerRegistry.hasOwnProperty(extension))) {
+ // Treat it as markup if the first non whitespace character is a < and
+ // the last non-whitespace character is a >.
+ extension = /^\s*</.test(source)
+ ? 'default-markup'
+ : 'default-code';
+ }
+ return langHandlerRegistry[extension];
+ }
+ registerLangHandler(decorateSource, ['default-code']);
+ registerLangHandler(
+ createSimpleLexer(
+ [],
+ [
+ [PR_PLAIN, /^[^<?]+/],
+ [PR_DECLARATION, /^<!\w[^>]*(?:>|$)/],
+ [PR_COMMENT, /^<\!--[\s\S]*?(?:-\->|$)/],
+ // Unescaped content in an unknown language
+ ['lang-', /^<\?([\s\S]+?)(?:\?>|$)/],
+ ['lang-', /^<%([\s\S]+?)(?:%>|$)/],
+ [PR_PUNCTUATION, /^(?:<[%?]|[%?]>)/],
+ ['lang-', /^<xmp\b[^>]*>([\s\S]+?)<\/xmp\b[^>]*>/i],
+ // Unescaped content in javascript. (Or possibly vbscript).
+ ['lang-js', /^<script\b[^>]*>([\s\S]*?)(<\/script\b[^>]*>)/i],
+ // Contains unescaped stylesheet content
+ ['lang-css', /^<style\b[^>]*>([\s\S]*?)(<\/style\b[^>]*>)/i],
+ ['lang-in.tag', /^(<\/?[a-z][^<>]*>)/i]
+ ]),
+ ['default-markup', 'htm', 'html', 'mxml', 'xhtml', 'xml', 'xsl']);
+ registerLangHandler(
+ createSimpleLexer(
+ [
+ [PR_PLAIN, /^[\s]+/, null, ' \t\r\n'],
+ [PR_ATTRIB_VALUE, /^(?:\"[^\"]*\"?|\'[^\']*\'?)/, null, '\"\'']
+ ],
+ [
+ [PR_TAG, /^^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],
+ [PR_ATTRIB_NAME, /^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],
+ ['lang-uq.val', /^=\s*([^>\'\"\s]*(?:[^>\'\"\s\/]|\/(?=\s)))/],
+ [PR_PUNCTUATION, /^[=<>\/]+/],
+ ['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']);
+ registerLangHandler(
+ createSimpleLexer([], [[PR_ATTRIB_VALUE, /^[\s\S]+/]]), ['uq.val']);
+ registerLangHandler(sourceDecorator({
+ 'keywords': CPP_KEYWORDS,
+ 'hashComments': true,
+ 'cStyleComments': true,
+ 'types': C_TYPES
+ }), ['c', 'cc', 'cpp', 'cxx', 'cyc', 'm']);
+ registerLangHandler(sourceDecorator({
+ 'keywords': 'null,true,false'
+ }), ['json']);
+ registerLangHandler(sourceDecorator({
+ 'keywords': CSHARP_KEYWORDS,
+ 'hashComments': true,
+ 'cStyleComments': true,
+ 'verbatimStrings': true,
+ 'types': C_TYPES
+ }), ['cs']);
+ registerLangHandler(sourceDecorator({
+ 'keywords': JAVA_KEYWORDS,
+ 'cStyleComments': true
+ }), ['java']);
+ registerLangHandler(sourceDecorator({
+ 'keywords': SH_KEYWORDS,
+ 'hashComments': true,
+ 'multiLineStrings': true
+ }), ['bsh', 'csh', 'sh']);
+ registerLangHandler(sourceDecorator({
+ 'keywords': PYTHON_KEYWORDS,
+ 'hashComments': true,
+ 'multiLineStrings': true,
+ 'tripleQuotedStrings': true
+ }), ['cv', 'py']);
+ registerLangHandler(sourceDecorator({
+ 'keywords': PERL_KEYWORDS,
+ 'hashComments': true,
+ 'multiLineStrings': true,
+ 'regexLiterals': true
+ }), ['perl', 'pl', 'pm']);
+ registerLangHandler(sourceDecorator({
+ 'keywords': RUBY_KEYWORDS,
+ 'hashComments': true,
+ 'multiLineStrings': true,
+ 'regexLiterals': true
+ }), ['rb']);
+ registerLangHandler(sourceDecorator({
+ 'keywords': JSCRIPT_KEYWORDS,
+ 'cStyleComments': true,
+ 'regexLiterals': true
+ }), ['js']);
+ registerLangHandler(sourceDecorator({
+ 'keywords': COFFEE_KEYWORDS,
+ 'hashComments': 3, // ### style block comments
+ 'cStyleComments': true,
+ 'multilineStrings': true,
+ 'tripleQuotedStrings': true,
+ 'regexLiterals': true
+ }), ['coffee']);
+ registerLangHandler(createSimpleLexer([], [[PR_STRING, /^[\s\S]+/]]), ['regex']);
+
+ function applyDecorator(job) {
+ var opt_langExtension = job.langExtension;
+
+ try {
+ // Extract tags, and convert the source code to plain text.
+ var sourceAndSpans = extractSourceSpans(job.sourceNode);
+ /** Plain text. @type {string} */
+ var source = sourceAndSpans.sourceCode;
+ job.sourceCode = source;
+ job.spans = sourceAndSpans.spans;
+ job.basePos = 0;
+
+ // Apply the appropriate language handler
+ langHandlerForExtension(opt_langExtension, source)(job);
+
+ // Integrate the decorations and tags back into the source code,
+ // modifying the sourceNode in place.
+ recombineTagsAndDecorations(job);
+ } catch (e) {
+ if ('console' in window) {
+ console['log'](e && e['stack'] ? e['stack'] : e);
+ }
+ }
+ }
+
+ /**
+ * @param sourceCodeHtml {string} The HTML to pretty print.
+ * @param opt_langExtension {string} The language name to use.
+ * Typically, a filename extension like 'cpp' or 'java'.
+ * @param opt_numberLines {number|boolean} True to number lines,
+ * or the 1-indexed number of the first line in sourceCodeHtml.
+ */
+ function prettyPrintOne(sourceCodeHtml, opt_langExtension, opt_numberLines) {
+ var container = document.createElement('PRE');
+ // This could cause images to load and onload listeners to fire.
+ // E.g. <img onerror="alert(1337)" src="nosuchimage.png">.
+ // We assume that the inner HTML is from a trusted source.
+ container.innerHTML = sourceCodeHtml;
+ if (opt_numberLines) {
+ numberLines(container, opt_numberLines);
+ }
+
+ var job = {
+ langExtension: opt_langExtension,
+ numberLines: opt_numberLines,
+ sourceNode: container
+ };
+ applyDecorator(job);
+ return container.innerHTML;
+ }
+
+ function prettyPrint(opt_whenDone) {
+ function byTagName(tn) { return document.getElementsByTagName(tn); }
+ // fetch a list of nodes to rewrite
+ var codeSegments = [byTagName('pre'), byTagName('code'), byTagName('xmp')];
+ var elements = [];
+ for (var i = 0; i < codeSegments.length; ++i) {
+ for (var j = 0, n = codeSegments[i].length; j < n; ++j) {
+ elements.push(codeSegments[i][j]);
+ }
+ }
+ codeSegments = null;
+
+ var clock = Date;
+ if (!clock['now']) {
+ clock = { 'now': function () { return +(new Date); } };
+ }
+
+ // The loop is broken into a series of continuations to make sure that we
+ // don't make the browser unresponsive when rewriting a large page.
+ var k = 0;
+ var prettyPrintingJob;
+
+ var langExtensionRe = /\blang(?:uage)?-([\w.]+)(?!\S)/;
+ var prettyPrintRe = /\bprettyprint\b/;
+
+ function doWork() {
+ var endTime = (window['PR_SHOULD_USE_CONTINUATION'] ?
+ clock['now']() + 250 /* ms */ :
+ Infinity);
+ for (; k < elements.length && clock['now']() < endTime; k++) {
+ var cs = elements[k];
+ var className = cs.className;
+ if (className.indexOf('prettyprint') >= 0) {
+ // If the classes includes a language extensions, use it.
+ // Language extensions can be specified like
+ // <pre class="prettyprint lang-cpp">
+ // the language extension "cpp" is used to find a language handler as
+ // passed to PR.registerLangHandler.
+ // HTML5 recommends that a language be specified using "language-"
+ // as the prefix instead. Google Code Prettify supports both.
+ // http://dev.w3.org/html5/spec-author-view/the-code-element.html
+ var langExtension = className.match(langExtensionRe);
+ // Support <pre class="prettyprint"><code class="language-c">
+ var wrapper;
+ if (!langExtension && (wrapper = childContentWrapper(cs))
+ && "CODE" === wrapper.tagName) {
+ langExtension = wrapper.className.match(langExtensionRe);
+ }
+
+ if (langExtension) {
+ langExtension = langExtension[1];
+ }
+
+ // make sure this is not nested in an already prettified element
+ var nested = false;
+ for (var p = cs.parentNode; p; p = p.parentNode) {
+ if ((p.tagName === 'pre' || p.tagName === 'code' ||
+ p.tagName === 'xmp') &&
+ p.className && p.className.indexOf('prettyprint') >= 0) {
+ nested = true;
+ break;
+ }
+ }
+ if (!nested) {
+ // Look for a class like linenums or linenums:<n> where <n> is the
+ // 1-indexed number of the first line.
+ var lineNums = cs.className.match(/\blinenums\b(?::(\d+))?/);
+ lineNums = lineNums
+ ? lineNums[1] && lineNums[1].length ? +lineNums[1] : true
+ : false;
+ if (lineNums) { numberLines(cs, lineNums); }
+
+ // do the pretty printing
+ prettyPrintingJob = {
+ langExtension: langExtension,
+ sourceNode: cs,
+ numberLines: lineNums
+ };
+ applyDecorator(prettyPrintingJob);
+ }
+ }
+ }
+ if (k < elements.length) {
+ // finish up in a continuation
+ setTimeout(doWork, 250);
+ } else if (opt_whenDone) {
+ opt_whenDone();
+ }
+ }
+
+ doWork();
+ }
+
+ /**
+ * Find all the {@code <pre>} and {@code <code>} tags in the DOM with
+ * {@code class=prettyprint} and prettify them.
+ *
+ * @param {Function?} opt_whenDone if specified, called when the last entry
+ * has been finished.
+ */
+ window['prettyPrintOne'] = prettyPrintOne;
+ /**
+ * Pretty print a chunk of code.
+ *
+ * @param {string} sourceCodeHtml code as html
+ * @return {string} code as html, but prettier
+ */
+ window['prettyPrint'] = prettyPrint;
+ /**
+ * Contains functions for creating and registering new language handlers.
+ * @type {Object}
+ */
+ window['PR'] = {
+ 'createSimpleLexer': createSimpleLexer,
+ 'registerLangHandler': registerLangHandler,
+ 'sourceDecorator': sourceDecorator,
+ 'PR_ATTRIB_NAME': PR_ATTRIB_NAME,
+ 'PR_ATTRIB_VALUE': PR_ATTRIB_VALUE,
+ 'PR_COMMENT': PR_COMMENT,
+ 'PR_DECLARATION': PR_DECLARATION,
+ 'PR_KEYWORD': PR_KEYWORD,
+ 'PR_LITERAL': PR_LITERAL,
+ 'PR_NOCODE': PR_NOCODE,
+ 'PR_PLAIN': PR_PLAIN,
+ 'PR_PUNCTUATION': PR_PUNCTUATION,
+ 'PR_SOURCE': PR_SOURCE,
+ 'PR_STRING': PR_STRING,
+ 'PR_TAG': PR_TAG,
+ 'PR_TYPE': PR_TYPE
+ };
+})();
diff --git a/media/prettify-20110601/js-modules/recombineTagsAndDecorations.js b/media/prettify-20110601/js-modules/recombineTagsAndDecorations.js
new file mode 100644
index 0000000..9db38ce
--- /dev/null
+++ b/media/prettify-20110601/js-modules/recombineTagsAndDecorations.js
@@ -0,0 +1,108 @@
+/**
+ * Breaks {@code job.sourceCode} around style boundaries in
+ * {@code job.decorations} and modifies {@code job.sourceNode} in place.
+ * @param {Object} job like <pre>{
+ * sourceCode: {string} source as plain text,
+ * spans: {Array.<number|Node>} alternating span start indices into source
+ * and the text node or element (e.g. {@code <BR>}) corresponding to that
+ * span.
+ * decorations: {Array.<number|string} an array of style classes preceded
+ * by the position at which they start in job.sourceCode in order
+ * }</pre>
+ * @private
+ */
+function recombineTagsAndDecorations(job) {
+ var isIE = /\bMSIE\b/.test(navigator.userAgent);
+ var newlineRe = /\n/g;
+
+ var source = job.sourceCode;
+ var sourceLength = source.length;
+ // Index into source after the last code-unit recombined.
+ var sourceIndex = 0;
+
+ var spans = job.spans;
+ var nSpans = spans.length;
+ // Index into spans after the last span which ends at or before sourceIndex.
+ var spanIndex = 0;
+
+ var decorations = job.decorations;
+ var nDecorations = decorations.length;
+ // Index into decorations after the last decoration which ends at or before
+ // sourceIndex.
+ var decorationIndex = 0;
+
+ // Remove all zero-length decorations.
+ decorations[nDecorations] = sourceLength;
+ var decPos, i;
+ for (i = decPos = 0; i < nDecorations;) {
+ if (decorations[i] !== decorations[i + 2]) {
+ decorations[decPos++] = decorations[i++];
+ decorations[decPos++] = decorations[i++];
+ } else {
+ i += 2;
+ }
+ }
+ nDecorations = decPos;
+
+ // Simplify decorations.
+ for (i = decPos = 0; i < nDecorations;) {
+ var startPos = decorations[i];
+ // Conflate all adjacent decorations that use the same style.
+ var startDec = decorations[i + 1];
+ var end = i + 2;
+ while (end + 2 <= nDecorations && decorations[end + 1] === startDec) {
+ end += 2;
+ }
+ decorations[decPos++] = startPos;
+ decorations[decPos++] = startDec;
+ i = end;
+ }
+
+ nDecorations = decorations.length = decPos;
+
+ var decoration = null;
+ while (spanIndex < nSpans) {
+ var spanStart = spans[spanIndex];
+ var spanEnd = spans[spanIndex + 2] || sourceLength;
+
+ var decStart = decorations[decorationIndex];
+ var decEnd = decorations[decorationIndex + 2] || sourceLength;
+
+ var end = Math.min(spanEnd, decEnd);
+
+ var textNode = spans[spanIndex + 1];
+ var styledText;
+ if (textNode.nodeType !== 1 // Don't muck with <BR>s or <LI>s
+ // Don't introduce spans around empty text nodes.
+ && (styledText = source.substring(sourceIndex, end))) {
+ // This may seem bizarre, and it is. Emitting LF on IE causes the
+ // code to display with spaces instead of line breaks.
+ // Emitting Windows standard issue linebreaks (CRLF) causes a blank
+ // space to appear at the beginning of every line but the first.
+ // Emitting an old Mac OS 9 line separator makes everything spiffy.
+ if (isIE) { styledText = styledText.replace(newlineRe, '\r'); }
+ textNode.nodeValue = styledText;
+ var document = textNode.ownerDocument;
+ var span = document.createElement('SPAN');
+ span.className = decorations[decorationIndex + 1];
+ var parentNode = textNode.parentNode;
+ parentNode.replaceChild(span, textNode);
+ span.appendChild(textNode);
+ if (sourceIndex < spanEnd) { // Split off a text node.
+ spans[spanIndex + 1] = textNode
+ // TODO: Possibly optimize by using '' if there's no flicker.
+ = document.createTextNode(source.substring(end, spanEnd));
+ parentNode.insertBefore(textNode, span.nextSibling);
+ }
+ }
+
+ sourceIndex = end;
+
+ if (sourceIndex >= spanEnd) {
+ spanIndex += 2;
+ }
+ if (sourceIndex >= decEnd) {
+ decorationIndex += 2;
+ }
+ }
+}
diff --git a/media/prettify-20110601/js-modules/recombineTagsAndDecorations_test.html b/media/prettify-20110601/js-modules/recombineTagsAndDecorations_test.html
new file mode 100644
index 0000000..555ee3c
--- /dev/null
+++ b/media/prettify-20110601/js-modules/recombineTagsAndDecorations_test.html
@@ -0,0 +1,98 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html> <head>
+<title>Recombine Tags And Decorations</title>
+<script src="extractSourceSpans.js"></script>
+<script src="numberLines.js"></script>
+<script src="recombineTagsAndDecorations.js"></script>
+<script src="http://github.com/douglascrockford/JSON-js/raw/master/json2.js"></script>
+<link rel="stylesheet" href="../src/prettify.css" type="text/css" />
+<style>
+.ok { background: #dfd }
+.error, .failure { background: #fdd }
+.error { white-space: pre }
+td { font-family: monospace }
+tr { vertical-align: top }
+</style>
+</head>
+
+<body>
+<h1>Recombine Tags And Decorations</h1>
+
+<table border="1" cellpadding="2" cellspacing="0">
+ <tr><th colspan="4">Test Single Decoration</th></tr>
+ <tr>
+ <td><code class="testinput">"Hello, World!"</code></td>
+ <td class="decorations">[0, 'str']</td>
+ <td><code><span class="str">"Hello, World!"</span></code></td>
+ </tr>
+ <tr><th colspan="4">Test Single Span</th></tr>
+ <tr>
+ <td><code class="testinput">print "Hello, &lt;World&gt;!";</code></td>
+ <td class="decorations">[0, 'kwd', 5, 'pln', 6, 'str', 14, 'tag', 21, 'str', 23, 'pun']</td>
+ <td><code><span class="kwd">print</span><span class="pln"> </span><span class="str">"Hello, </span><span class="tag">&lt;World&gt;</span><span class="str">!"</span><span class="pun">;</span></code></td>
+ </tr>
+ <tr><th colspan="4">Test Interleaved</th></tr>
+ <tr>
+ <td><code class="testinput">print "Hello, &lt;<b>World</b>&gt;!";</code></td>
+ <td class="decorations">[0, 'kwd', 5, 'pln', 6, 'str', 14, 'tag', 21, 'str', 23, 'pun']</td>
+ <td><code><span class="kwd">print</span><span class="pln"> </span><span class="str">"Hello, </span><span class="tag">&lt;</span><b><span class="tag">World</span></b><span class="tag">&gt;</span><span class="str">!"</span><span class="pun">;</span></code></td>
+ </tr>
+</table>
+
+<script>
+if (!document.body.getElementsByClassName) {
+ document.body.getElementsByClassName = function (className) {
+ className = className.replace(/\s+/g, ' ').replace(/^\s*|\s*$/g, ' ');
+ var results = [];
+ function walk(node) {
+ if (node.nodeType !== 1) { return; }
+ // This test should be order-insensitive.
+ if ((' ' + node.className + ' ').indexOf(className) >= 0) {
+ results[results.length] = node;
+ }
+ for (var child = node.firstChild; child; child = child.nextSibling) {
+ walk(child);
+ }
+ }
+ walk(document.body);
+ return results;
+ };
+}
+
+setTimeout(function () {
+ var testInputs = Array.prototype.slice.call(
+ document.body.getElementsByClassName('testinput'), 0);
+ for (var i = 0, n = testInputs.length; i < n; ++i) {
+ var testInput = testInputs[i];
+ var decorationsNode = testInput.parentNode.nextSibling;
+ while (decorationsNode.nodeType !== 1) { decorationsNode = decorationsNode.nextSibling; }
+ var testResult = decorationsNode.nextSibling;
+ while (testResult.nodeType !== 1) { testResult = testResult.nextSibling; }
+ var actual = document.createElement('TD');
+ testResult.parentNode.appendChild(actual);
+ var clone = testInput.cloneNode(true);
+ clone.className = ''; // IE
+ clone.removeAttribute('class'); // Not IE.
+ actual.appendChild(clone);
+ var job = extractSourceSpans(clone);
+ job.decorations = eval(decorationsNode.innerText || decorationsNode.textContent);
+ try {
+ recombineTagsAndDecorations(job);
+ var passed = testResult.innerHTML === actual.innerHTML;
+ if (!passed) {
+ console.log(JSON.stringify(testResult.innerHTML) + ' !==\n' + JSON.stringify(actual.innerHTML));
+ }
+ actual.className = passed ? 'ok' : 'failure';
+ } catch (ex) {
+ actual.className = 'error';
+ actual.appendChild(document.createTextNode(
+ 'Error: ' + (ex.message || ex) + '\n' + ex.stack));
+ }
+ actual.className += ' actual';
+ }
+}, 0)</script>
+
+<hr>
+<address></address>
+<!-- hhmts start --> Last modified: Tue Mar 29 10:41:34 PDT 2011 <!-- hhmts end -->
+</body> </html>
diff --git a/media/prettify-20110601/js-modules/regexpPrecederPatterns.pl b/media/prettify-20110601/js-modules/regexpPrecederPatterns.pl
new file mode 100644
index 0000000..12a5364
--- /dev/null
+++ b/media/prettify-20110601/js-modules/regexpPrecederPatterns.pl
@@ -0,0 +1,53 @@
+use strict;
+
+print "
+
+/**
+ * A set of tokens that can precede a regular expression literal in
+ * javascript
+ * http://web.archive.org/web/20070717142515/http://www.mozilla.org/js/language/js20/rationale/syntax.html
+ * has the full list, but I've removed ones that might be problematic when
+ * seen in languages that don't support regular expression literals.
+ *
+ * <p>Specifically, I've removed any keywords that can't precede a regexp
+ * literal in a syntactically legal javascript program, and I've removed the
+ * \"in\" keyword since it's not a keyword in many languages, and might be used
+ * as a count of inches.
+ *
+ * <p>The link a above does not accurately describe EcmaScript rules since
+ * it fails to distinguish between (a=++/b/i) and (a++/b/i) but it works
+ * very well in practice.
+ *
+ * \@private
+ * \@const
+ */
+var REGEXP_PRECEDER_PATTERN = ";
+
+my @preceders = (
+ "!", "!=", "!==", "#", "%", "%=", "&", "&&", "&&=",
+ "&=", "(", "*", "*=",
+ # "+", "-", ".", "..", "..." handled below
+ "+=", ",", "-=", "->", "/", "/=", ":", "::", ";",
+ "<", "<<", "<<=", "<=", "=", "==", "===", ">",
+ ">=", ">>", ">>=", ">>>", ">>>=", "?", "@", "[",
+ "^", "^=", "^^", "^^=", "{", "|", "|=", "||",
+ "||=", "~", # handles =~ and !~
+ "break", "case", "continue", "delete",
+ "do", "else", "finally", "instanceof",
+ "return", "throw", "try", "typeof"
+ );
+my $pattern = "'(?:^^\\\\.?|[+-]"; # match at beginning or sign.
+foreach my $preceder (@preceders) {
+ $preceder =~ s/([^=<>:&a-z])/\\\\$1/gi;
+ $pattern .= "|$preceder";
+}
+$pattern .= ")\\\\s*'"; # matches at end, and matches empty string
+print "$pattern;\n";
+
+print "
+// CAVEAT: this does not properly handle the case where a regular
+// expression immediately follows another since a regular expression may
+// have flags for case-sensitivity and the like. Having regexp tokens
+// adjacent is not valid in any language I'm aware of, so I'm punting.
+// TODO: maybe style special characters inside a regexp as punctuation.
+";
diff --git a/media/prettify-20100721/lang-apollo.js b/media/prettify-20110601/src/lang-apollo.js
index c218210..9fa1d24 100644
--- a/media/prettify-20100721/lang-apollo.js
+++ b/media/prettify-20110601/src/lang-apollo.js
@@ -25,27 +25,27 @@
* @author ohommes@alumni.cmu.edu
*/
-PR.registerLangHandler(
- PR.createSimpleLexer(
+PR['registerLangHandler'](
+ PR['createSimpleLexer'](
[
// A line comment that starts with ;
- [PR.PR_COMMENT, /^#[^\r\n]*/, null, '#'],
+ [PR['PR_COMMENT'], /^#[^\r\n]*/, null, '#'],
// Whitespace
- [PR.PR_PLAIN, /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'],
+ [PR['PR_PLAIN'], /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'],
// A double quoted, possibly multi-line, string.
- [PR.PR_STRING, /^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/, null, '"']
+ [PR['PR_STRING'], /^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/, null, '"']
],
[
- [PR.PR_KEYWORD, /^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\s/,null],
- [PR.PR_TYPE, /^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[SE]?BANK\=?|BLOCK|BNKSUM|E?CADR|COUNT\*?|2?DEC\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\s/,null],
+ [PR['PR_KEYWORD'], /^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\s/,null],
+ [PR['PR_TYPE'], /^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[SE]?BANK\=?|BLOCK|BNKSUM|E?CADR|COUNT\*?|2?DEC\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\s/,null],
// A single quote possibly followed by a word that optionally ends with
// = ! or ?.
- [PR.PR_LITERAL,
+ [PR['PR_LITERAL'],
/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],
// Any word including labels that optionally ends with = ! or ?.
- [PR.PR_PLAIN,
+ [PR['PR_PLAIN'],
/^-*(?:[!-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],
// A printable non-space non-special character
- [PR.PR_PUNCTUATION, /^[^\w\t\n\r \xA0()\"\\\';]+/]
+ [PR['PR_PUNCTUATION'], /^[^\w\t\n\r \xA0()\"\\\';]+/]
]),
['apollo', 'agc', 'aea']);
diff --git a/media/prettify-20110601/src/lang-clj.js b/media/prettify-20110601/src/lang-clj.js
new file mode 100644
index 0000000..0758335
--- /dev/null
+++ b/media/prettify-20110601/src/lang-clj.js
@@ -0,0 +1,64 @@
+/**
+ * @license Copyright (C) 2011 Google Inc.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+/**
+ * @fileoverview
+ * Registers a language handler for Clojure.
+ *
+ *
+ * To use, include prettify.js and this file in your HTML page.
+ * Then put your code in an HTML tag like
+ * <pre class="prettyprint lang-lisp">(my lisp code)</pre>
+ * The lang-cl class identifies the language as common lisp.
+ * This file supports the following language extensions:
+ * lang-clj - Clojure
+ *
+ *
+ * I used lang-lisp.js as the basis for this adding the clojure specific
+ * keywords and syntax.
+ *
+ * "Name" = 'Clojure'
+ * "Author" = 'Rich Hickey'
+ * "Version" = '1.2'
+ * "About" = 'Clojure is a lisp for the jvm with concurrency primitives and a richer set of types.'
+ *
+ *
+ * I used <a href="http://clojure.org/Reference">Clojure.org Reference</a> as
+ * the basis for the reserved word list.
+ *
+ *
+ * @author jwall@google.com
+ */
+
+PR['registerLangHandler'](
+ PR['createSimpleLexer'](
+ [
+ // clojure has more paren types than minimal lisp.
+ ['opn', /^[\(\{\[]+/, null, '([{'],
+ ['clo', /^[\)\}\]]+/, null, ')]}'],
+ // A line comment that starts with ;
+ [PR['PR_COMMENT'], /^;[^\r\n]*/, null, ';'],
+ // Whitespace
+ [PR['PR_PLAIN'], /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'],
+ // A double quoted, possibly multi-line, string.
+ [PR['PR_STRING'], /^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/, null, '"']
+ ],
+ [
+ // clojure has a much larger set of keywords
+ [PR['PR_KEYWORD'], /^(?:def|if|do|let|quote|var|fn|loop|recur|throw|try|monitor-enter|monitor-exit|defmacro|defn|defn-|macroexpand|macroexpand-1|for|doseq|dosync|dotimes|and|or|when|not|assert|doto|proxy|defstruct|first|rest|cons|defprotocol|deftype|defrecord|reify|defmulti|defmethod|meta|with-meta|ns|in-ns|create-ns|import|intern|refer|alias|namespace|resolve|ref|deref|refset|new|set!|memfn|to-array|into-array|aset|gen-class|reduce|map|filter|find|nil?|empty?|hash-map|hash-set|vec|vector|seq|flatten|reverse|assoc|dissoc|list|list?|disj|get|union|difference|intersection|extend|extend-type|extend-protocol|prn)\b/, null],
+ [PR['PR_TYPE'], /^:[0-9a-zA-Z\-]+/]
+ ]),
+ ['clj']);
diff --git a/media/prettify-20100721/lang-css.js b/media/prettify-20110601/src/lang-css.js
index 44013d2..034bd59 100644
--- a/media/prettify-20100721/lang-css.js
+++ b/media/prettify-20110601/src/lang-css.js
@@ -30,49 +30,49 @@
* @author mikesamuel@gmail.com
*/
-PR.registerLangHandler(
- PR.createSimpleLexer(
+PR['registerLangHandler'](
+ PR['createSimpleLexer'](
[
// The space production <s>
- [PR.PR_PLAIN, /^[ \t\r\n\f]+/, null, ' \t\r\n\f']
+ [PR['PR_PLAIN'], /^[ \t\r\n\f]+/, null, ' \t\r\n\f']
],
[
// Quoted strings. <string1> and <string2>
- [PR.PR_STRING,
+ [PR['PR_STRING'],
/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/, null],
- [PR.PR_STRING,
+ [PR['PR_STRING'],
/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/, null],
['lang-css-str', /^url\(([^\)\"\']*)\)/i],
- [PR.PR_KEYWORD,
+ [PR['PR_KEYWORD'],
/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,
null],
// A property name -- an identifier followed by a colon.
['lang-css-kw', /^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],
// A C style block comment. The <comment> production.
- [PR.PR_COMMENT, /^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],
+ [PR['PR_COMMENT'], /^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],
// Escaping text spans
- [PR.PR_COMMENT, /^(?:<!--|-->)/],
+ [PR['PR_COMMENT'], /^(?:<!--|-->)/],
// A number possibly containing a suffix.
- [PR.PR_LITERAL, /^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],
+ [PR['PR_LITERAL'], /^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],
// A hex color
- [PR.PR_LITERAL, /^#(?:[0-9a-f]{3}){1,2}/i],
+ [PR['PR_LITERAL'], /^#(?:[0-9a-f]{3}){1,2}/i],
// An identifier
- [PR.PR_PLAIN,
+ [PR['PR_PLAIN'],
/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],
// A run of punctuation
- [PR.PR_PUNCTUATION, /^[^\s\w\'\"]+/]
+ [PR['PR_PUNCTUATION'], /^[^\s\w\'\"]+/]
]),
['css']);
-PR.registerLangHandler(
- PR.createSimpleLexer([],
+PR['registerLangHandler'](
+ PR['createSimpleLexer']([],
[
- [PR.PR_KEYWORD,
+ [PR['PR_KEYWORD'],
/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]
]),
['css-kw']);
-PR.registerLangHandler(
- PR.createSimpleLexer([],
+PR['registerLangHandler'](
+ PR['createSimpleLexer']([],
[
- [PR.PR_STRING, /^[^\)\"\']+/]
+ [PR['PR_STRING'], /^[^\)\"\']+/]
]),
['css-str']);
diff --git a/media/prettify-20110601/src/lang-go.js b/media/prettify-20110601/src/lang-go.js
new file mode 100644
index 0000000..f329e29
--- /dev/null
+++ b/media/prettify-20110601/src/lang-go.js
@@ -0,0 +1,58 @@
+// Copyright (C) 2010 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+
+
+/**
+ * @fileoverview
+ * Registers a language handler for the Go language..
+ * <p>
+ * Based on the lexical grammar at
+ * http://golang.org/doc/go_spec.html#Lexical_elements
+ * <p>
+ * Go uses a minimal style for highlighting so the below does not distinguish
+ * strings, keywords, literals, etc. by design.
+ * From a discussion with the Go designers:
+ * <pre>
+ * On Thursday, July 22, 2010, Mike Samuel <...> wrote:
+ * > On Thu, Jul 22, 2010, Rob 'Commander' Pike <...> wrote:
+ * >> Personally, I would vote for the subdued style godoc presents at http://golang.org
+ * >>
+ * >> Not as fancy as some like, but a case can be made it's the official style.
+ * >> If people want more colors, I wouldn't fight too hard, in the interest of
+ * >> encouragement through familiarity, but even then I would ask to shy away
+ * >> from technicolor starbursts.
+ * >
+ * > Like http://golang.org/pkg/go/scanner/ where comments are blue and all
+ * > other content is black? I can do that.
+ * </pre>
+ *
+ * @author mikesamuel@gmail.com
+ */
+
+PR['registerLangHandler'](
+ PR['createSimpleLexer'](
+ [
+ // Whitespace is made up of spaces, tabs and newline characters.
+ [PR['PR_PLAIN'], /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'],
+ // Not escaped as a string. See note on minimalism above.
+ [PR['PR_PLAIN'], /^(?:\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\]|\\[\s\S])+(?:\'|$)|`[^`]*(?:`|$))/, null, '"\'']
+ ],
+ [
+ // Block comments are delimited by /* and */.
+ // Single-line comments begin with // and extend to the end of a line.
+ [PR['PR_COMMENT'], /^(?:\/\/[^\r\n]*|\/\*[\s\S]*?\*\/)/],
+ [PR['PR_PLAIN'], /^(?:[^\/\"\'`]|\/(?![\/\*]))+/i]
+ ]),
+ ['go']);
diff --git a/media/prettify-20100721/lang-hs.js b/media/prettify-20110601/src/lang-hs.js
index 91157b9..4a15cf0 100644
--- a/media/prettify-20100721/lang-hs.js
+++ b/media/prettify-20110601/src/lang-hs.js
@@ -39,22 +39,22 @@
* @author mikesamuel@gmail.com
*/
-PR.registerLangHandler(
- PR.createSimpleLexer(
+PR['registerLangHandler'](
+ PR['createSimpleLexer'](
[
// Whitespace
// whitechar -> newline | vertab | space | tab | uniWhite
// newline -> return linefeed | return | linefeed | formfeed
- [PR.PR_PLAIN, /^[\t\n\x0B\x0C\r ]+/, null, '\t\n\x0B\x0C\r '],
+ [PR['PR_PLAIN'], /^[\t\n\x0B\x0C\r ]+/, null, '\t\n\x0B\x0C\r '],
// Single line double and single-quoted strings.
// char -> ' (graphic<' | \> | space | escape<\&>) '
// string -> " {graphic<" | \> | space | escape | gap}"
// escape -> \ ( charesc | ascii | decimal | o octal
// | x hexadecimal )
// charesc -> a | b | f | n | r | t | v | \ | " | ' | &
- [PR.PR_STRING, /^\"(?:[^\"\\\n\x0C\r]|\\[\s\S])*(?:\"|$)/,
+ [PR['PR_STRING'], /^\"(?:[^\"\\\n\x0C\r]|\\[\s\S])*(?:\"|$)/,
null, '"'],
- [PR.PR_STRING, /^\'(?:[^\'\\\n\x0C\r]|\\[^&])\'?/,
+ [PR['PR_STRING'], /^\'(?:[^\'\\\n\x0C\r]|\\[^&])\'?/,
null, "'"],
// decimal -> digit{digit}
// octal -> octit{octit}
@@ -65,7 +65,7 @@ PR.registerLangHandler(
// float -> decimal . decimal [exponent]
// | decimal exponent
// exponent -> (e | E) [+ | -] decimal
- [PR.PR_LITERAL,
+ [PR['PR_LITERAL'],
/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+\-]?\d+)?)/i,
null, '0123456789']
],
@@ -77,12 +77,12 @@ PR.registerLangHandler(
// dashes -> '--' {'-'}
// opencom -> '{-'
// closecom -> '-}'
- [PR.PR_COMMENT, /^(?:(?:--+(?:[^\r\n\x0C]*)?)|(?:\{-(?:[^-]|-+[^-\}])*-\}))/],
+ [PR['PR_COMMENT'], /^(?:(?:--+(?:[^\r\n\x0C]*)?)|(?:\{-(?:[^-]|-+[^-\}])*-\}))/],
// reservedid -> case | class | data | default | deriving | do
// | else | if | import | in | infix | infixl | infixr
// | instance | let | module | newtype | of | then
// | type | where | _
- [PR.PR_KEYWORD, /^(?:case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)(?=[^a-zA-Z0-9\']|$)/, null],
+ [PR['PR_KEYWORD'], /^(?:case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)(?=[^a-zA-Z0-9\']|$)/, null],
// qvarid -> [ modid . ] varid
// qconid -> [ modid . ] conid
// varid -> (small {small | large | digit | ' })<reservedid>
@@ -94,8 +94,8 @@ PR.registerLangHandler(
// large -> ascLarge | uniLarge
// ascLarge -> A | B | ... | Z
// uniLarge -> any uppercase or titlecase Unicode letter
- [PR.PR_PLAIN, /^(?:[A-Z][\w\']*\.)*[a-zA-Z][\w\']*/],
+ [PR['PR_PLAIN'], /^(?:[A-Z][\w\']*\.)*[a-zA-Z][\w\']*/],
// matches the symbol production
- [PR.PR_PUNCTUATION, /^[^\t\n\x0B\x0C\r a-zA-Z0-9\'\"]+/]
+ [PR['PR_PUNCTUATION'], /^[^\t\n\x0B\x0C\r a-zA-Z0-9\'\"]+/]
]),
['hs']);
diff --git a/media/prettify-20100721/lang-lisp.js b/media/prettify-20110601/src/lang-lisp.js
index 14e4f3c..3bf75d7 100644
--- a/media/prettify-20100721/lang-lisp.js
+++ b/media/prettify-20110601/src/lang-lisp.js
@@ -64,30 +64,30 @@
* @author mikesamuel@gmail.com
*/
-PR.registerLangHandler(
- PR.createSimpleLexer(
+PR['registerLangHandler'](
+ PR['createSimpleLexer'](
[
- ['opn', /^\(/, null, '('],
- ['clo', /^\)/, null, ')'],
+ ['opn', /^\(+/, null, '('],
+ ['clo', /^\)+/, null, ')'],
// A line comment that starts with ;
- [PR.PR_COMMENT, /^;[^\r\n]*/, null, ';'],
+ [PR['PR_COMMENT'], /^;[^\r\n]*/, null, ';'],
// Whitespace
- [PR.PR_PLAIN, /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'],
+ [PR['PR_PLAIN'], /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'],
// A double quoted, possibly multi-line, string.
- [PR.PR_STRING, /^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/, null, '"']
+ [PR['PR_STRING'], /^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/, null, '"']
],
[
- [PR.PR_KEYWORD, /^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/, null],
- [PR.PR_LITERAL,
- /^[+\-]?(?:0x[0-9a-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[ed][+\-]?\d+)?)/i],
+ [PR['PR_KEYWORD'], /^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/, null],
+ [PR['PR_LITERAL'],
+ /^[+\-]?(?:[0#]x[0-9a-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[ed][+\-]?\d+)?)/i],
// A single quote possibly followed by a word that optionally ends with
// = ! or ?.
- [PR.PR_LITERAL,
+ [PR['PR_LITERAL'],
/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],
// A word that optionally ends with = ! or ?.
- [PR.PR_PLAIN,
+ [PR['PR_PLAIN'],
/^-*(?:[a-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],
// A printable non-space non-special character
- [PR.PR_PUNCTUATION, /^[^\w\t\n\r \xA0()\"\\\';]+/]
+ [PR['PR_PUNCTUATION'], /^[^\w\t\n\r \xA0()\"\\\';]+/]
]),
['cl', 'el', 'lisp', 'scm']);
diff --git a/media/prettify-20100721/lang-lua.js b/media/prettify-20110601/src/lang-lua.js
index 68bb30b..7a3f976 100644
--- a/media/prettify-20100721/lang-lua.js
+++ b/media/prettify-20110601/src/lang-lua.js
@@ -32,28 +32,28 @@
* @author mikesamuel@gmail.com
*/
-PR.registerLangHandler(
- PR.createSimpleLexer(
+PR['registerLangHandler'](
+ PR['createSimpleLexer'](
[
// Whitespace
- [PR.PR_PLAIN, /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'],
+ [PR['PR_PLAIN'], /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'],
// A double or single quoted, possibly multi-line, string.
- [PR.PR_STRING, /^(?:\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\]|\\[\s\S])*(?:\'|$))/, null, '"\'']
+ [PR['PR_STRING'], /^(?:\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\]|\\[\s\S])*(?:\'|$))/, null, '"\'']
],
[
// A comment is either a line comment that starts with two dashes, or
// two dashes preceding a long bracketed block.
- [PR.PR_COMMENT, /^--(?:\[(=*)\[[\s\S]*?(?:\]\1\]|$)|[^\r\n]*)/],
+ [PR['PR_COMMENT'], /^--(?:\[(=*)\[[\s\S]*?(?:\]\1\]|$)|[^\r\n]*)/],
// A long bracketed block not preceded by -- is a string.
- [PR.PR_STRING, /^\[(=*)\[[\s\S]*?(?:\]\1\]|$)/],
- [PR.PR_KEYWORD, /^(?:and|break|do|else|elseif|end|false|for|function|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/, null],
+ [PR['PR_STRING'], /^\[(=*)\[[\s\S]*?(?:\]\1\]|$)/],
+ [PR['PR_KEYWORD'], /^(?:and|break|do|else|elseif|end|false|for|function|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/, null],
// A number is a hex integer literal, a decimal real literal, or in
// scientific notation.
- [PR.PR_LITERAL,
+ [PR['PR_LITERAL'],
/^[+-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],
// An identifier
- [PR.PR_PLAIN, /^[a-z_]\w*/i],
+ [PR['PR_PLAIN'], /^[a-z_]\w*/i],
// A run of punctuation
- [PR.PR_PUNCTUATION, /^[^\w\t\n\r \xA0][^\w\t\n\r \xA0\"\'\-\+=]*/]
+ [PR['PR_PUNCTUATION'], /^[^\w\t\n\r \xA0][^\w\t\n\r \xA0\"\'\-\+=]*/]
]),
['lua']);
diff --git a/media/prettify-20100721/lang-ml.js b/media/prettify-20110601/src/lang-ml.js
index c5a3db7..b5a4c17 100644
--- a/media/prettify-20100721/lang-ml.js
+++ b/media/prettify-20110601/src/lang-ml.js
@@ -19,38 +19,38 @@
* Registers a language handler for OCaml, SML, F# and similar languages.
*
* Based on the lexical grammar at
- * http://research.microsoft.com/fsharp/manual/spec2.aspx#_Toc202383715
+ * http://research.microsoft.com/en-us/um/cambridge/projects/fsharp/manual/spec.html#_Toc270597388
*
* @author mikesamuel@gmail.com
*/
-PR.registerLangHandler(
- PR.createSimpleLexer(
+PR['registerLangHandler'](
+ PR['createSimpleLexer'](
[
// Whitespace is made up of spaces, tabs and newline characters.
- [PR.PR_PLAIN, /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'],
+ [PR['PR_PLAIN'], /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'],
// #if ident/#else/#endif directives delimit conditional compilation
// sections
- [PR.PR_COMMENT,
+ [PR['PR_COMMENT'],
/^#(?:if[\t\n\r \xA0]+(?:[a-z_$][\w\']*|``[^\r\n\t`]*(?:``|$))|else|endif|light)/i,
null, '#'],
// A double or single quoted, possibly multi-line, string.
// F# allows escaped newlines in strings.
- [PR.PR_STRING, /^(?:\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\]|\\[\s\S])*(?:\'|$))/, null, '"\'']
+ [PR['PR_STRING'], /^(?:\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\]|\\[\s\S])(?:\'|$))/, null, '"\'']
],
[
// Block comments are delimited by (* and *) and may be
// nested. Single-line comments begin with // and extend to
// the end of a line.
// TODO: (*...*) comments can be nested. This does not handle that.
- [PR.PR_COMMENT, /^(?:\/\/[^\r\n]*|\(\*[\s\S]*?\*\))/],
- [PR.PR_KEYWORD, /^(?:abstract|and|as|assert|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|if|in|inherit|inline|interface|internal|lazy|let|match|member|module|mutable|namespace|new|null|of|open|or|override|private|public|rec|return|static|struct|then|to|true|try|type|upcast|use|val|void|when|while|with|yield|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|global|include|method|mixin|object|parallel|process|protected|pure|sealed|trait|virtual|volatile)\b/],
+ [PR['PR_COMMENT'], /^(?:\/\/[^\r\n]*|\(\*[\s\S]*?\*\))/],
+ [PR['PR_KEYWORD'], /^(?:abstract|and|as|assert|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|if|in|inherit|inline|interface|internal|lazy|let|match|member|module|mutable|namespace|new|null|of|open|or|override|private|public|rec|return|static|struct|then|to|true|try|type|upcast|use|val|void|when|while|with|yield|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|global|include|method|mixin|object|parallel|process|protected|pure|sealed|trait|virtual|volatile)\b/],
// A number is a hex integer literal, a decimal real literal, or in
// scientific notation.
- [PR.PR_LITERAL,
+ [PR['PR_LITERAL'],
/^[+\-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],
- [PR.PR_PLAIN, /^(?:[a-z_]\w*[!?#]?|``[^\r\n\t`]*(?:``|$))/i],
+ [PR['PR_PLAIN'], /^(?:[a-z_][\w']*[!?#]?|``[^\r\n\t`]*(?:``|$))/i],
// A printable non-space non-special character
- [PR.PR_PUNCTUATION, /^[^\t\n\r \xA0\"\'\w]+/]
+ [PR['PR_PUNCTUATION'], /^[^\t\n\r \xA0\"\'\w]+/]
]),
['fs', 'ml']);
diff --git a/media/prettify-20110601/src/lang-n.js b/media/prettify-20110601/src/lang-n.js
new file mode 100644
index 0000000..babe8f3
--- /dev/null
+++ b/media/prettify-20110601/src/lang-n.js
@@ -0,0 +1,62 @@
+// Copyright (C) 2011 Zimin A.V.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+
+/**
+ * @fileoverview
+ * Registers a language handler for the Nemerle language.
+ * http://nemerle.org
+ * @author Zimin A.V.
+ */
+(function () {
+ var keywords = 'abstract|and|as|base|catch|class|def|delegate|enum|event|extern|false|finally|'
+ + 'fun|implements|interface|internal|is|macro|match|matches|module|mutable|namespace|new|'
+ + 'null|out|override|params|partial|private|protected|public|ref|sealed|static|struct|'
+ + 'syntax|this|throw|true|try|type|typeof|using|variant|virtual|volatile|when|where|with|'
+ + 'assert|assert2|async|break|checked|continue|do|else|ensures|for|foreach|if|late|lock|new|nolate|'
+ + 'otherwise|regexp|repeat|requires|return|surroundwith|unchecked|unless|using|while|yield';
+
+ var shortcutStylePatterns = [
+ [PR.PR_STRING, /^(?:\'(?:[^\\\'\r\n]|\\.)*\'|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/, null, '"'],
+ [PR.PR_COMMENT, /^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/, null, '#'],
+ [PR.PR_PLAIN, /^\s+/, null, ' \r\n\t\xA0']
+ ];
+
+ var fallthroughStylePatterns = [
+ [PR.PR_STRING, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null],
+ [PR.PR_STRING, /^<#(?:[^#>])*(?:#>|$)/, null],
+ [PR.PR_STRING, /^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/, null],
+ [PR.PR_COMMENT, /^\/\/[^\r\n]*/, null],
+ [PR.PR_COMMENT, /^\/\*[\s\S]*?(?:\*\/|$)/, null],
+ [PR.PR_KEYWORD, new RegExp('^(?:' + keywords + ')\\b'), null],
+ [PR.PR_TYPE, /^(?:array|bool|byte|char|decimal|double|float|int|list|long|object|sbyte|short|string|ulong|uint|ufloat|ulong|ushort|void)\b/, null],
+ [PR.PR_LITERAL, /^@[a-z_$][a-z_$@0-9]*/i, null],
+ [PR.PR_TYPE, /^@[A-Z]+[a-z][A-Za-z_$@0-9]*/, null],
+ [PR.PR_PLAIN, /^'?[A-Za-z_$][a-z_$@0-9]*/i, null],
+ [PR.PR_LITERAL, new RegExp(
+ '^(?:'
+ // A hex number
+ + '0x[a-f0-9]+'
+ // or an octal or decimal number,
+ + '|(?:\\d(?:_\\d+)*\\d*(?:\\.\\d*)?|\\.\\d\\+)'
+ // possibly in scientific notation
+ + '(?:e[+\\-]?\\d+)?'
+ + ')'
+ // with an optional modifier like UL for unsigned long
+ + '[a-z]*', 'i'), null, '0123456789'],
+
+ [PR.PR_PUNCTUATION, /^.[^\s\w\.$@\'\"\`\/\#]*/, null]
+ ];
+ PR.registerLangHandler(PR.createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns), ['n', 'nemerle']);
+})();
diff --git a/media/prettify-20100721/lang-proto.js b/media/prettify-20110601/src/lang-proto.js
index d6531fd..5395491 100644
--- a/media/prettify-20100721/lang-proto.js
+++ b/media/prettify-20110601/src/lang-proto.js
@@ -24,12 +24,12 @@
* @author mikesamuel@gmail.com
*/
-PR.registerLangHandler(PR.sourceDecorator({
- keywords: (
- 'bool bytes default double enum extend extensions false fixed32 '
- + 'fixed64 float group import int32 int64 max message option '
- + 'optional package repeated required returns rpc service '
- + 'sfixed32 sfixed64 sint32 sint64 string syntax to true uint32 '
- + 'uint64'),
- cStyleComments: true
+PR['registerLangHandler'](PR['sourceDecorator']({
+ 'keywords': (
+ 'bytes,default,double,enum,extend,extensions,false,'
+ + 'group,import,max,message,option,'
+ + 'optional,package,repeated,required,returns,rpc,service,'
+ + 'syntax,to,true'),
+ 'types': /^(bool|(double|s?fixed|[su]?int)(32|64)|float|string)\b/,
+ 'cStyleComments': true
}), ['proto']);
diff --git a/media/prettify-20100721/lang-scala.js b/media/prettify-20110601/src/lang-scala.js
index e0d675a..db9b484 100644
--- a/media/prettify-20100721/lang-scala.js
+++ b/media/prettify-20110601/src/lang-scala.js
@@ -22,33 +22,33 @@
* @author mikesamuel@gmail.com
*/
-PR.registerLangHandler(
- PR.createSimpleLexer(
+PR['registerLangHandler'](
+ PR['createSimpleLexer'](
[
// Whitespace
- [PR.PR_PLAIN, /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'],
+ [PR['PR_PLAIN'], /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'],
// A double or single quoted string
// or a triple double-quoted multi-line string.
- [PR.PR_STRING,
+ [PR['PR_STRING'],
/^(?:"(?:(?:""(?:""?(?!")|[^\\"]|\\.)*"{0,3})|(?:[^"\r\n\\]|\\.)*"?))/,
null, '"'],
- [PR.PR_LITERAL, /^`(?:[^\r\n\\`]|\\.)*`?/, null, '`'],
- [PR.PR_PUNCTUATION, /^[!#%&()*+,\-:;<=>?@\[\\\]^{|}~]+/, null,
+ [PR['PR_LITERAL'], /^`(?:[^\r\n\\`]|\\.)*`?/, null, '`'],
+ [PR['PR_PUNCTUATION'], /^[!#%&()*+,\-:;<=>?@\[\\\]^{|}~]+/, null,
'!#%&()*+,-:;<=>?@[\\]^{|}~']
],
[
// A symbol literal is a single quote followed by an identifier with no
// single quote following
// A character literal has single quotes on either side
- [PR.PR_STRING, /^'(?:[^\r\n\\']|\\(?:'|[^\r\n']+))'/],
- [PR.PR_LITERAL, /^'[a-zA-Z_$][\w$]*(?!['$\w])/],
- [PR.PR_KEYWORD, /^(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|object|override|package|private|protected|requires|return|sealed|super|throw|trait|try|type|val|var|while|with|yield)\b/],
- [PR.PR_LITERAL, /^(?:true|false|null|this)\b/],
- [PR.PR_LITERAL, /^(?:(?:0(?:[0-7]+|X[0-9A-F]+))L?|(?:(?:0|[1-9][0-9]*)(?:(?:\.[0-9]+)?(?:E[+\-]?[0-9]+)?F?|L?))|\\.[0-9]+(?:E[+\-]?[0-9]+)?F?)/i],
+ [PR['PR_STRING'], /^'(?:[^\r\n\\']|\\(?:'|[^\r\n']+))'/],
+ [PR['PR_LITERAL'], /^'[a-zA-Z_$][\w$]*(?!['$\w])/],
+ [PR['PR_KEYWORD'], /^(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|object|override|package|private|protected|requires|return|sealed|super|throw|trait|try|type|val|var|while|with|yield)\b/],
+ [PR['PR_LITERAL'], /^(?:true|false|null|this)\b/],
+ [PR['PR_LITERAL'], /^(?:(?:0(?:[0-7]+|X[0-9A-F]+))L?|(?:(?:0|[1-9][0-9]*)(?:(?:\.[0-9]+)?(?:E[+\-]?[0-9]+)?F?|L?))|\\.[0-9]+(?:E[+\-]?[0-9]+)?F?)/i],
// Treat upper camel case identifiers as types.
- [PR.PR_TYPE, /^[$_]*[A-Z][_$A-Z0-9]*[a-z][\w$]*/],
- [PR.PR_PLAIN, /^[$a-zA-Z_][\w$]*/],
- [PR.PR_COMMENT, /^\/(?:\/.*|\*(?:\/|\**[^*/])*(?:\*+\/?)?)/],
- [PR.PR_PUNCTUATION, /^(?:\.+|\/)/]
+ [PR['PR_TYPE'], /^[$_]*[A-Z][_$A-Z0-9]*[a-z][\w$]*/],
+ [PR['PR_PLAIN'], /^[$a-zA-Z_][\w$]*/],
+ [PR['PR_COMMENT'], /^\/(?:\/.*|\*(?:\/|\**[^*/])*(?:\*+\/?)?)/],
+ [PR['PR_PUNCTUATION'], /^(?:\.+|\/)/]
]),
['scala']);
diff --git a/media/prettify-20110601/src/lang-sql.js b/media/prettify-20110601/src/lang-sql.js
new file mode 100644
index 0000000..a4adec8
--- /dev/null
+++ b/media/prettify-20110601/src/lang-sql.js
@@ -0,0 +1,57 @@
+// Copyright (C) 2008 Google Inc.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+
+
+/**
+ * @fileoverview
+ * Registers a language handler for SQL.
+ *
+ *
+ * To use, include prettify.js and this file in your HTML page.
+ * Then put your code in an HTML tag like
+ * <pre class="prettyprint lang-sql">(my SQL code)</pre>
+ *
+ *
+ * http://savage.net.au/SQL/sql-99.bnf.html is the basis for the grammar, and
+ * http://msdn.microsoft.com/en-us/library/aa238507(SQL.80).aspx as the basis
+ * for the keyword list.
+ *
+ * @author mikesamuel@gmail.com
+ */
+
+PR['registerLangHandler'](
+ PR['createSimpleLexer'](
+ [
+ // Whitespace
+ [PR['PR_PLAIN'], /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'],
+ // A double or single quoted, possibly multi-line, string.
+ [PR['PR_STRING'], /^(?:"(?:[^\"\\]|\\.)*"|'(?:[^\'\\]|\\.)*')/, null,
+ '"\'']
+ ],
+ [
+ // A comment is either a line comment that starts with two dashes, or
+ // two dashes preceding a long bracketed block.
+ [PR['PR_COMMENT'], /^(?:--[^\r\n]*|\/\*[\s\S]*?(?:\*\/|$))/],
+ [PR['PR_KEYWORD'], /^(?:ADD|ALL|ALTER|AND|ANY|AS|ASC|AUTHORIZATION|BACKUP|BEGIN|BETWEEN|BREAK|BROWSE|BULK|BY|CASCADE|CASE|CHECK|CHECKPOINT|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMN|COMMIT|COMPUTE|CONSTRAINT|CONTAINS|CONTAINSTABLE|CONTINUE|CONVERT|CREATE|CROSS|CURRENT|CURRENT_DATE|CURRENT_TIME|CURRENT_TIMESTAMP|CURRENT_USER|CURSOR|DATABASE|DBCC|DEALLOCATE|DECLARE|DEFAULT|DELETE|DENY|DESC|DISK|DISTINCT|DISTRIBUTED|DOUBLE|DROP|DUMMY|DUMP|ELSE|END|ERRLVL|ESCAPE|EXCEPT|EXEC|EXECUTE|EXISTS|EXIT|FETCH|FILE|FILLFACTOR|FOR|FOREIGN|FREETEXT|FREETEXTTABLE|FROM|FULL|FUNCTION|GOTO|GRANT|GROUP|HAVING|HOLDLOCK|IDENTITY|IDENTITYCOL|IDENTITY_INSERT|IF|IN|INDEX|INNER|INSERT|INTERSECT|INTO|IS|JOIN|KEY|KILL|LEFT|LIKE|LINENO|LOAD|MATCH|MERGE|NATIONAL|NOCHECK|NONCLUSTERED|NOT|NULL|NULLIF|OF|OFF|OFFSETS|ON|OPEN|OPENDATASOURCE|OPENQUERY|OPENROWSET|OPENXML|OPTION|OR|ORDER|OUTER|OVER|PERCENT|PLAN|PRECISION|PRIMARY|PRINT|PROC|PROCEDURE|PUBLIC|RAISERROR|READ|READTEXT|RECONFIGURE|REFERENCES|REPLICATION|RESTORE|RESTRICT|RETURN|REVOKE|RIGHT|ROLLBACK|ROWCOUNT|ROWGUIDCOL|RULE|SAVE|SCHEMA|SELECT|SESSION_USER|SET|SETUSER|SHUTDOWN|SOME|STATISTICS|SYSTEM_USER|TABLE|TEXTSIZE|THEN|TO|TOP|TRAN|TRANSACTION|TRIGGER|TRUNCATE|TSEQUAL|UNION|UNIQUE|UPDATE|UPDATETEXT|USE|USER|USING|VALUES|VARYING|VIEW|WAITFOR|WHEN|WHERE|WHILE|WITH|WRITETEXT)(?=[^\w-]|$)/i, null],
+ // A number is a hex integer literal, a decimal real literal, or in
+ // scientific notation.
+ [PR['PR_LITERAL'],
+ /^[+-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],
+ // An identifier
+ [PR['PR_PLAIN'], /^[a-z_][\w-]*/i],
+ // A run of punctuation
+ [PR['PR_PUNCTUATION'], /^[^\w\t\n\r \xA0\"\'][^\w\t\n\r \xA0+\-\"\']*/]
+ ]),
+ ['sql']);
diff --git a/media/prettify-20110601/src/lang-tex.js b/media/prettify-20110601/src/lang-tex.js
new file mode 100644
index 0000000..57d0ac4
--- /dev/null
+++ b/media/prettify-20110601/src/lang-tex.js
@@ -0,0 +1,46 @@
+// Copyright (C) 2011 Martin S.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+/**
+ * @fileoverview
+ * Support for tex highlighting as discussed on
+ * <a href="http://meta.tex.stackexchange.com/questions/872/text-immediate-following-double-backslashes-is-highlighted-as-macro-inside-a-code/876#876">meta.tex.stackexchange.com</a>.
+ *
+ * @author Martin S.
+ */
+
+PR.registerLangHandler(
+ PR.createSimpleLexer(
+ [
+ // whitespace
+ [PR.PR_PLAIN, /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0'],
+ // all comments begin with '%'
+ [PR.PR_COMMENT, /^%[^\r\n]*/, null, '%']
+ ],
+ [
+ //[PR.PR_DECLARATION, /^\\([egx]?def|(new|renew|provide)(command|environment))\b/],
+ // any command starting with a \ and contains
+ // either only letters (a-z,A-Z), '@' (internal macros)
+ [PR.PR_KEYWORD, /^\\[a-zA-Z@]+/],
+ // or contains only one character
+ [PR.PR_KEYWORD, /^\\./],
+ // Highlight dollar for math mode and ampersam for tabular
+ [PR.PR_TYPE, /^[$&]/],
+ // numeric measurement values with attached units
+ [PR.PR_LITERAL,
+ /[+-]?(?:\.\d+|\d+(?:\.\d*)?)(cm|em|ex|in|pc|pt|bp|mm)/i],
+ // punctuation usually occurring within commands
+ [PR.PR_PUNCTUATION, /^[{}()\[\]=]+/]
+ ]),
+ ['latex', 'tex']);
diff --git a/media/prettify-20100721/lang-vb.js b/media/prettify-20110601/src/lang-vb.js
index a38db45..5fb4a38 100644
--- a/media/prettify-20100721/lang-vb.js
+++ b/media/prettify-20110601/src/lang-vb.js
@@ -30,32 +30,32 @@
* @author mikesamuel@gmail.com
*/
-PR.registerLangHandler(
- PR.createSimpleLexer(
+PR['registerLangHandler'](
+ PR['createSimpleLexer'](
[
// Whitespace
- [PR.PR_PLAIN, /^[\t\n\r \xA0\u2028\u2029]+/, null, '\t\n\r \xA0\u2028\u2029'],
+ [PR['PR_PLAIN'], /^[\t\n\r \xA0\u2028\u2029]+/, null, '\t\n\r \xA0\u2028\u2029'],
// A double quoted string with quotes escaped by doubling them.
// A single character can be suffixed with C.
- [PR.PR_STRING, /^(?:[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})(?:[\"\u201C\u201D]c|$)|[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})*(?:[\"\u201C\u201D]|$))/i, null,
+ [PR['PR_STRING'], /^(?:[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})(?:[\"\u201C\u201D]c|$)|[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})*(?:[\"\u201C\u201D]|$))/i, null,
'"\u201C\u201D'],
// A comment starts with a single quote and runs until the end of the
// line.
- [PR.PR_COMMENT, /^[\'\u2018\u2019][^\r\n\u2028\u2029]*/, null, '\'\u2018\u2019']
+ [PR['PR_COMMENT'], /^[\'\u2018\u2019][^\r\n\u2028\u2029]*/, null, '\'\u2018\u2019']
],
[
- [PR.PR_KEYWORD, /^(?:AddHandler|AddressOf|Alias|And|AndAlso|Ansi|As|Assembly|Auto|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|CBool|CByte|CChar|CDate|CDbl|CDec|Char|CInt|Class|CLng|CObj|Const|CShort|CSng|CStr|CType|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else|ElseIf|End|EndIf|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get|GetType|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|Let|Lib|Like|Long|Loop|Me|Mod|Module|MustInherit|MustOverride|MyBase|MyClass|Namespace|New|Next|Not|NotInheritable|NotOverridable|Object|On|Option|Optional|Or|OrElse|Overloads|Overridable|Overrides|ParamArray|Preserve|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|Select|Set|Shadows|Shared|Short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TypeOf|Unicode|Until|Variant|Wend|When|While|With|WithEvents|WriteOnly|Xor|EndIf|GoSub|Let|Variant|Wend)\b/i, null],
+ [PR['PR_KEYWORD'], /^(?:AddHandler|AddressOf|Alias|And|AndAlso|Ansi|As|Assembly|Auto|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|CBool|CByte|CChar|CDate|CDbl|CDec|Char|CInt|Class|CLng|CObj|Const|CShort|CSng|CStr|CType|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else|ElseIf|End|EndIf|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get|GetType|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|Let|Lib|Like|Long|Loop|Me|Mod|Module|MustInherit|MustOverride|MyBase|MyClass|Namespace|New|Next|Not|NotInheritable|NotOverridable|Object|On|Option|Optional|Or|OrElse|Overloads|Overridable|Overrides|ParamArray|Preserve|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|Select|Set|Shadows|Shared|Short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TypeOf|Unicode|Until|Variant|Wend|When|While|With|WithEvents|WriteOnly|Xor|EndIf|GoSub|Let|Variant|Wend)\b/i, null],
// A second comment form
- [PR.PR_COMMENT, /^REM[^\r\n\u2028\u2029]*/i],
+ [PR['PR_COMMENT'], /^REM[^\r\n\u2028\u2029]*/i],
// A boolean, numeric, or date literal.
- [PR.PR_LITERAL,
+ [PR['PR_LITERAL'],
/^(?:True\b|False\b|Nothing\b|\d+(?:E[+\-]?\d+[FRD]?|[FRDSIL])?|(?:&H[0-9A-F]+|&O[0-7]+)[SIL]?|\d*\.\d+(?:E[+\-]?\d+)?[FRD]?|#\s+(?:\d+[\-\/]\d+[\-\/]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)?|\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)\s+#)/i],
// An identifier?
- [PR.PR_PLAIN, /^(?:(?:[a-z]|_\w)\w*|\[(?:[a-z]|_\w)\w*\])/i],
+ [PR['PR_PLAIN'], /^(?:(?:[a-z]|_\w)\w*|\[(?:[a-z]|_\w)\w*\])/i],
// A run of punctuation
- [PR.PR_PUNCTUATION,
+ [PR['PR_PUNCTUATION'],
/^[^\w\t\n\r \"\'\[\]\xA0\u2018\u2019\u201C\u201D\u2028\u2029]+/],
// Square brackets
- [PR.PR_PUNCTUATION, /^(?:\[|\])/]
+ [PR['PR_PUNCTUATION'], /^(?:\[|\])/]
]),
['vb', 'vbs']);
diff --git a/media/prettify-20110601/src/lang-vhdl.js b/media/prettify-20110601/src/lang-vhdl.js
new file mode 100644
index 0000000..f6410bc
--- /dev/null
+++ b/media/prettify-20110601/src/lang-vhdl.js
@@ -0,0 +1,34 @@
+/**
+ * @fileoverview
+ * Registers a language handler for VHDL '93.
+ *
+ * Based on the lexical grammar and keywords at
+ * http://www.iis.ee.ethz.ch/~zimmi/download/vhdl93_syntax.html
+ *
+ * @author benoit@ryder.fr
+ */
+
+PR['registerLangHandler'](
+ PR['createSimpleLexer'](
+ [
+ // Whitespace
+ [PR['PR_PLAIN'], /^[\t\n\r \xA0]+/, null, '\t\n\r \xA0']
+ ],
+ [
+ // String, character or bit string
+ [PR['PR_STRING'], /^(?:[BOX]?"(?:[^\"]|"")*"|'.')/i],
+ // Comment, from two dashes until end of line.
+ [PR['PR_COMMENT'], /^--[^\r\n]*/],
+ [PR['PR_KEYWORD'], /^(?:abs|access|after|alias|all|and|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|mod|nand|new|next|nor|not|null|of|on|open|or|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|rem|report|return|rol|ror|select|severity|shared|signal|sla|sll|sra|srl|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with|xnor|xor)(?=[^\w-]|$)/i, null],
+ // Type, predefined or standard
+ [PR['PR_TYPE'], /^(?:bit|bit_vector|character|boolean|integer|real|time|string|severity_level|positive|natural|signed|unsigned|line|text|std_u?logic(?:_vector)?)(?=[^\w-]|$)/i, null],
+ // Predefined attributes
+ [PR['PR_TYPE'], /^\'(?:ACTIVE|ASCENDING|BASE|DELAYED|DRIVING|DRIVING_VALUE|EVENT|HIGH|IMAGE|INSTANCE_NAME|LAST_ACTIVE|LAST_EVENT|LAST_VALUE|LEFT|LEFTOF|LENGTH|LOW|PATH_NAME|POS|PRED|QUIET|RANGE|REVERSE_RANGE|RIGHT|RIGHTOF|SIMPLE_NAME|STABLE|SUCC|TRANSACTION|VAL|VALUE)(?=[^\w-]|$)/i, null],
+ // Number, decimal or based literal
+ [PR['PR_LITERAL'], /^\d+(?:_\d+)*(?:#[\w\\.]+#(?:[+\-]?\d+(?:_\d+)*)?|(?:\.\d+(?:_\d+)*)?(?:E[+\-]?\d+(?:_\d+)*)?)/i],
+ // Identifier, basic or extended
+ [PR['PR_PLAIN'], /^(?:[a-z]\w*|\\[^\\]*\\)/i],
+ // Punctuation
+ [PR['PR_PUNCTUATION'], /^[^\w\t\n\r \xA0\"\'][^\w\t\n\r \xA0\-\"\']*/]
+ ]),
+ ['vhdl', 'vhd']);
diff --git a/media/prettify-20100721/lang-wiki.js b/media/prettify-20110601/src/lang-wiki.js
index d4aa350..660423e 100644
--- a/media/prettify-20100721/lang-wiki.js
+++ b/media/prettify-20110601/src/lang-wiki.js
@@ -22,32 +22,32 @@
* @author mikesamuel@gmail.com
*/
-PR.registerLangHandler(
- PR.createSimpleLexer(
+PR['registerLangHandler'](
+ PR['createSimpleLexer'](
[
// Whitespace
- [PR.PR_PLAIN, /^[\t \xA0a-gi-z0-9]+/, null,
+ [PR['PR_PLAIN'], /^[\t \xA0a-gi-z0-9]+/, null,
'\t \xA0abcdefgijklmnopqrstuvwxyz0123456789'],
// Wiki formatting
- [PR.PR_PUNCTUATION, /^[=*~\^\[\]]+/, null, '=*~^[]']
+ [PR['PR_PUNCTUATION'], /^[=*~\^\[\]]+/, null, '=*~^[]']
],
[
// Meta-info like #summary, #labels, etc.
['lang-wiki.meta', /(?:^^|\r\n?|\n)(#[a-z]+)\b/],
// A WikiWord
- [PR.PR_LITERAL, /^(?:[A-Z][a-z][a-z0-9]+[A-Z][a-z][a-zA-Z0-9]+)\b/
+ [PR['PR_LITERAL'], /^(?:[A-Z][a-z][a-z0-9]+[A-Z][a-z][a-zA-Z0-9]+)\b/
],
// A preformatted block in an unknown language
['lang-', /^\{\{\{([\s\S]+?)\}\}\}/],
// A block of source code in an unknown language
['lang-', /^`([^\r\n`]+)`/],
// An inline URL.
- [PR.PR_STRING,
+ [PR['PR_STRING'],
/^https?:\/\/[^\/?#\s]*(?:\/[^?#\s]*)?(?:\?[^#\s]*)?(?:#\S*)?/i],
- [PR.PR_PLAIN, /^(?:\r\n|[\s\S])[^#=*~^A-Zh\{`\[\r\n]*/]
+ [PR['PR_PLAIN'], /^(?:\r\n|[\s\S])[^#=*~^A-Zh\{`\[\r\n]*/]
]),
['wiki']);
-PR.registerLangHandler(
- PR.createSimpleLexer([[PR.PR_KEYWORD, /^#[a-z]+/i, null, '#']], []),
+PR['registerLangHandler'](
+ PR['createSimpleLexer']([[PR['PR_KEYWORD'], /^#[a-z]+/i, null, '#']], []),
['wiki.meta']);
diff --git a/media/prettify-20110601/src/lang-xq.js b/media/prettify-20110601/src/lang-xq.js
new file mode 100644
index 0000000..38ffd72
--- /dev/null
+++ b/media/prettify-20110601/src/lang-xq.js
@@ -0,0 +1,67 @@
+// Copyright (C) 2011 Patrick Wied
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+
+
+/**
+ * @fileoverview
+ * Registers a language handler for XQuery.
+ *
+ * To use, include prettify.js and this file in your HTML page.
+ * Then put your code in an HTML tag like
+ * <pre class="prettyprint lang-xq"></pre>
+ *
+ *
+ * @author Patrick Wied ( patpa7p@live.de )
+ * @version 2010-09-28
+ */
+
+// Falls back to plain for stylesheets that don't style fun.
+var PR_FUNCTION = 'fun pln';
+// Falls back to plaiin for stylesheets that don't style var.
+var PR_VARIABLE = 'var pln';
+
+PR['registerLangHandler'](
+ PR['createSimpleLexer'](
+ [
+ // Matching $var-ia_bles
+ [PR_VARIABLE, /^\$[A-Za-z0-9_\-]+/, null, "$"]
+ ],
+ [
+ // Matching lt and gt operators
+ // Not the best matching solution but you have to differentiate between the gt operator and the tag closing char
+ [PR['PR_PLAIN'], /^[\s=][<>][\s=]/],
+ // Matching @Attributes
+ [PR['PR_LITERAL'], /^\@[\w-]+/],
+ // Matching xml tags
+ [PR['PR_TAG'], /^<\/?[a-z](?:[\w.:-]*\w)?|\/?>$/i],
+ // Matching single or multiline xquery comments -> (: <text> :)
+ [PR['PR_COMMENT'], /^\(:[\s\S]*?:\)/],
+ // Tokenizing /{}:=;*,[]() as plain
+ [PR['PR_PLAIN'], /^[\/\{\};,\[\]\(\)]$/],
+ // Matching a double or single quoted, possibly multi-line, string.
+ // with the special condition that a { in a string changes to xquery context
+ [PR['PR_STRING'], /^(?:\"(?:[^\"\\\{]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\\{]|\\[\s\S])*(?:\'|$))/, null, '"\''],
+ // Matching standard xquery keywords
+ [PR['PR_KEYWORD'], /^(?:xquery|where|version|variable|union|typeswitch|treat|to|then|text|stable|sortby|some|self|schema|satisfies|returns|return|ref|processing-instruction|preceding-sibling|preceding|precedes|parent|only|of|node|namespace|module|let|item|intersect|instance|in|import|if|function|for|follows|following-sibling|following|external|except|every|else|element|descending|descendant-or-self|descendant|define|default|declare|comment|child|cast|case|before|attribute|assert|ascending|as|ancestor-or-self|ancestor|after|eq|order|by|or|and|schema-element|document-node|node|at)\b/],
+ // Matching standard xquery types
+ [PR['PR_TYPE'], /^(?:xs:yearMonthDuration|xs:unsignedLong|xs:time|xs:string|xs:short|xs:QName|xs:Name|xs:long|xs:integer|xs:int|xs:gYearMonth|xs:gYear|xs:gMonthDay|xs:gDay|xs:float|xs:duration|xs:double|xs:decimal|xs:dayTimeDuration|xs:dateTime|xs:date|xs:byte|xs:boolean|xs:anyURI|xf:yearMonthDuration)\b/, null],
+ // Matching standard xquery functions
+ [PR_FUNCTION, /^(?:xp:dereference|xinc:node-expand|xinc:link-references|xinc:link-expand|xhtml:restructure|xhtml:clean|xhtml:add-lists|xdmp:zip-manifest|xdmp:zip-get|xdmp:zip-create|xdmp:xquery-version|xdmp:word-convert|xdmp:with-namespaces|xdmp:version|xdmp:value|xdmp:user-roles|xdmp:user-last-login|xdmp:user|xdmp:url-encode|xdmp:url-decode|xdmp:uri-is-file|xdmp:uri-format|xdmp:uri-content-type|xdmp:unquote|xdmp:unpath|xdmp:triggers-database|xdmp:trace|xdmp:to-json|xdmp:tidy|xdmp:subbinary|xdmp:strftime|xdmp:spawn-in|xdmp:spawn|xdmp:sleep|xdmp:shutdown|xdmp:set-session-field|xdmp:set-response-encoding|xdmp:set-response-content-type|xdmp:set-response-code|xdmp:set-request-time-limit|xdmp:set|xdmp:servers|xdmp:server-status|xdmp:server-name|xdmp:server|xdmp:security-database|xdmp:security-assert|xdmp:schema-database|xdmp:save|xdmp:role-roles|xdmp:role|xdmp:rethrow|xdmp:restart|xdmp:request-timestamp|xdmp:request-status|xdmp:request-cancel|xdmp:request|xdmp:redirect-response|xdmp:random|xdmp:quote|xdmp:query-trace|xdmp:query-meters|xdmp:product-edition|xdmp:privilege-roles|xdmp:privilege|xdmp:pretty-print|xdmp:powerpoint-convert|xdmp:platform|xdmp:permission|xdmp:pdf-convert|xdmp:path|xdmp:octal-to-integer|xdmp:node-uri|xdmp:node-replace|xdmp:node-kind|xdmp:node-insert-child|xdmp:node-insert-before|xdmp:node-insert-after|xdmp:node-delete|xdmp:node-database|xdmp:mul64|xdmp:modules-root|xdmp:modules-database|xdmp:merging|xdmp:merge-cancel|xdmp:merge|xdmp:md5|xdmp:logout|xdmp:login|xdmp:log-level|xdmp:log|xdmp:lock-release|xdmp:lock-acquire|xdmp:load|xdmp:invoke-in|xdmp:invoke|xdmp:integer-to-octal|xdmp:integer-to-hex|xdmp:http-put|xdmp:http-post|xdmp:http-options|xdmp:http-head|xdmp:http-get|xdmp:http-delete|xdmp:hosts|xdmp:host-status|xdmp:host-name|xdmp:host|xdmp:hex-to-integer|xdmp:hash64|xdmp:hash32|xdmp:has-privilege|xdmp:groups|xdmp:group-serves|xdmp:group-servers|xdmp:group-name|xdmp:group-hosts|xdmp:group|xdmp:get-session-field-names|xdmp:get-session-field|xdmp:get-response-encoding|xdmp:get-response-code|xdmp:get-request-username|xdmp:get-request-user|xdmp:get-request-url|xdmp:get-request-protocol|xdmp:get-request-path|xdmp:get-request-method|xdmp:get-request-header-names|xdmp:get-request-header|xdmp:get-request-field-names|xdmp:get-request-field-filename|xdmp:get-request-field-content-type|xdmp:get-request-field|xdmp:get-request-client-certificate|xdmp:get-request-client-address|xdmp:get-request-body|xdmp:get-current-user|xdmp:get-current-roles|xdmp:get|xdmp:function-name|xdmp:function-module|xdmp:function|xdmp:from-json|xdmp:forests|xdmp:forest-status|xdmp:forest-restore|xdmp:forest-restart|xdmp:forest-name|xdmp:forest-delete|xdmp:forest-databases|xdmp:forest-counts|xdmp:forest-clear|xdmp:forest-backup|xdmp:forest|xdmp:filesystem-file|xdmp:filesystem-directory|xdmp:exists|xdmp:excel-convert|xdmp:eval-in|xdmp:eval|xdmp:estimate|xdmp:email|xdmp:element-content-type|xdmp:elapsed-time|xdmp:document-set-quality|xdmp:document-set-property|xdmp:document-set-properties|xdmp:document-set-permissions|xdmp:document-set-collections|xdmp:document-remove-properties|xdmp:document-remove-permissions|xdmp:document-remove-collections|xdmp:document-properties|xdmp:document-locks|xdmp:document-load|xdmp:document-insert|xdmp:document-get-quality|xdmp:document-get-properties|xdmp:document-get-permissions|xdmp:document-get-collections|xdmp:document-get|xdmp:document-forest|xdmp:document-delete|xdmp:document-add-properties|xdmp:document-add-permissions|xdmp:document-add-collections|xdmp:directory-properties|xdmp:directory-locks|xdmp:directory-delete|xdmp:directory-create|xdmp:directory|xdmp:diacritic-less|xdmp:describe|xdmp:default-permissions|xdmp:default-collections|xdmp:databases|xdmp:database-restore-validate|xdmp:database-restore-status|xdmp:database-restore-cancel|xdmp:database-restore|xdmp:database-name|xdmp:database-forests|xdmp:database-backup-validate|xdmp:database-backup-status|xdmp:database-backup-purge|xdmp:database-backup-cancel|xdmp:database-backup|xdmp:database|xdmp:collection-properties|xdmp:collection-locks|xdmp:collection-delete|xdmp:collation-canonical-uri|xdmp:castable-as|xdmp:can-grant-roles|xdmp:base64-encode|xdmp:base64-decode|xdmp:architecture|xdmp:apply|xdmp:amp-roles|xdmp:amp|xdmp:add64|xdmp:add-response-header|xdmp:access|trgr:trigger-set-recursive|trgr:trigger-set-permissions|trgr:trigger-set-name|trgr:trigger-set-module|trgr:trigger-set-event|trgr:trigger-set-description|trgr:trigger-remove-permissions|trgr:trigger-module|trgr:trigger-get-permissions|trgr:trigger-enable|trgr:trigger-disable|trgr:trigger-database-online-event|trgr:trigger-data-event|trgr:trigger-add-permissions|trgr:remove-trigger|trgr:property-content|trgr:pre-commit|trgr:post-commit|trgr:get-trigger-by-id|trgr:get-trigger|trgr:document-scope|trgr:document-content|trgr:directory-scope|trgr:create-trigger|trgr:collection-scope|trgr:any-property-content|thsr:set-entry|thsr:remove-term|thsr:remove-synonym|thsr:remove-entry|thsr:query-lookup|thsr:lookup|thsr:load|thsr:insert|thsr:expand|thsr:add-synonym|spell:suggest-detailed|spell:suggest|spell:remove-word|spell:make-dictionary|spell:load|spell:levenshtein-distance|spell:is-correct|spell:insert|spell:double-metaphone|spell:add-word|sec:users-collection|sec:user-set-roles|sec:user-set-password|sec:user-set-name|sec:user-set-description|sec:user-set-default-permissions|sec:user-set-default-collections|sec:user-remove-roles|sec:user-privileges|sec:user-get-roles|sec:user-get-description|sec:user-get-default-permissions|sec:user-get-default-collections|sec:user-doc-permissions|sec:user-doc-collections|sec:user-add-roles|sec:unprotect-collection|sec:uid-for-name|sec:set-realm|sec:security-version|sec:security-namespace|sec:security-installed|sec:security-collection|sec:roles-collection|sec:role-set-roles|sec:role-set-name|sec:role-set-description|sec:role-set-default-permissions|sec:role-set-default-collections|sec:role-remove-roles|sec:role-privileges|sec:role-get-roles|sec:role-get-description|sec:role-get-default-permissions|sec:role-get-default-collections|sec:role-doc-permissions|sec:role-doc-collections|sec:role-add-roles|sec:remove-user|sec:remove-role-from-users|sec:remove-role-from-role|sec:remove-role-from-privileges|sec:remove-role-from-amps|sec:remove-role|sec:remove-privilege|sec:remove-amp|sec:protect-collection|sec:privileges-collection|sec:privilege-set-roles|sec:privilege-set-name|sec:privilege-remove-roles|sec:privilege-get-roles|sec:privilege-add-roles|sec:priv-doc-permissions|sec:priv-doc-collections|sec:get-user-names|sec:get-unique-elem-id|sec:get-role-names|sec:get-role-ids|sec:get-privilege|sec:get-distinct-permissions|sec:get-collection|sec:get-amp|sec:create-user-with-role|sec:create-user|sec:create-role|sec:create-privilege|sec:create-amp|sec:collections-collection|sec:collection-set-permissions|sec:collection-remove-permissions|sec:collection-get-permissions|sec:collection-add-permissions|sec:check-admin|sec:amps-collection|sec:amp-set-roles|sec:amp-remove-roles|sec:amp-get-roles|sec:amp-doc-permissions|sec:amp-doc-collections|sec:amp-add-roles|search:unparse|search:suggest|search:snippet|search:search|search:resolve-nodes|search:resolve|search:remove-constraint|search:parse|search:get-default-options|search:estimate|search:check-options|prof:value|prof:reset|prof:report|prof:invoke|prof:eval|prof:enable|prof:disable|prof:allowed|ppt:clean|pki:template-set-request|pki:template-set-name|pki:template-set-key-type|pki:template-set-key-options|pki:template-set-description|pki:template-in-use|pki:template-get-version|pki:template-get-request|pki:template-get-name|pki:template-get-key-type|pki:template-get-key-options|pki:template-get-id|pki:template-get-description|pki:need-certificate|pki:is-temporary|pki:insert-trusted-certificates|pki:insert-template|pki:insert-signed-certificates|pki:insert-certificate-revocation-list|pki:get-trusted-certificate-ids|pki:get-template-ids|pki:get-template-certificate-authority|pki:get-template-by-name|pki:get-template|pki:get-pending-certificate-requests-xml|pki:get-pending-certificate-requests-pem|pki:get-pending-certificate-request|pki:get-certificates-for-template-xml|pki:get-certificates-for-template|pki:get-certificates|pki:get-certificate-xml|pki:get-certificate-pem|pki:get-certificate|pki:generate-temporary-certificate-if-necessary|pki:generate-temporary-certificate|pki:generate-template-certificate-authority|pki:generate-certificate-request|pki:delete-template|pki:delete-certificate|pki:create-template|pdf:make-toc|pdf:insert-toc-headers|pdf:get-toc|pdf:clean|p:status-transition|p:state-transition|p:remove|p:pipelines|p:insert|p:get-by-id|p:get|p:execute|p:create|p:condition|p:collection|p:action|ooxml:runs-merge|ooxml:package-uris|ooxml:package-parts-insert|ooxml:package-parts|msword:clean|mcgm:polygon|mcgm:point|mcgm:geospatial-query-from-elements|mcgm:geospatial-query|mcgm:circle|math:tanh|math:tan|math:sqrt|math:sinh|math:sin|math:pow|math:modf|math:log10|math:log|math:ldexp|math:frexp|math:fmod|math:floor|math:fabs|math:exp|math:cosh|math:cos|math:ceil|math:atan2|math:atan|math:asin|math:acos|map:put|map:map|map:keys|map:get|map:delete|map:count|map:clear|lnk:to|lnk:remove|lnk:insert|lnk:get|lnk:from|lnk:create|kml:polygon|kml:point|kml:interior-polygon|kml:geospatial-query-from-elements|kml:geospatial-query|kml:circle|kml:box|gml:polygon|gml:point|gml:interior-polygon|gml:geospatial-query-from-elements|gml:geospatial-query|gml:circle|gml:box|georss:point|georss:geospatial-query|georss:circle|geo:polygon|geo:point|geo:interior-polygon|geo:geospatial-query-from-elements|geo:geospatial-query|geo:circle|geo:box|fn:zero-or-one|fn:years-from-duration|fn:year-from-dateTime|fn:year-from-date|fn:upper-case|fn:unordered|fn:true|fn:translate|fn:trace|fn:tokenize|fn:timezone-from-time|fn:timezone-from-dateTime|fn:timezone-from-date|fn:sum|fn:subtract-dateTimes-yielding-yearMonthDuration|fn:subtract-dateTimes-yielding-dayTimeDuration|fn:substring-before|fn:substring-after|fn:substring|fn:subsequence|fn:string-to-codepoints|fn:string-pad|fn:string-length|fn:string-join|fn:string|fn:static-base-uri|fn:starts-with|fn:seconds-from-time|fn:seconds-from-duration|fn:seconds-from-dateTime|fn:round-half-to-even|fn:round|fn:root|fn:reverse|fn:resolve-uri|fn:resolve-QName|fn:replace|fn:remove|fn:QName|fn:prefix-from-QName|fn:position|fn:one-or-more|fn:number|fn:not|fn:normalize-unicode|fn:normalize-space|fn:node-name|fn:node-kind|fn:nilled|fn:namespace-uri-from-QName|fn:namespace-uri-for-prefix|fn:namespace-uri|fn:name|fn:months-from-duration|fn:month-from-dateTime|fn:month-from-date|fn:minutes-from-time|fn:minutes-from-duration|fn:minutes-from-dateTime|fn:min|fn:max|fn:matches|fn:lower-case|fn:local-name-from-QName|fn:local-name|fn:last|fn:lang|fn:iri-to-uri|fn:insert-before|fn:index-of|fn:in-scope-prefixes|fn:implicit-timezone|fn:idref|fn:id|fn:hours-from-time|fn:hours-from-duration|fn:hours-from-dateTime|fn:floor|fn:false|fn:expanded-QName|fn:exists|fn:exactly-one|fn:escape-uri|fn:escape-html-uri|fn:error|fn:ends-with|fn:encode-for-uri|fn:empty|fn:document-uri|fn:doc-available|fn:doc|fn:distinct-values|fn:distinct-nodes|fn:default-collation|fn:deep-equal|fn:days-from-duration|fn:day-from-dateTime|fn:day-from-date|fn:data|fn:current-time|fn:current-dateTime|fn:current-date|fn:count|fn:contains|fn:concat|fn:compare|fn:collection|fn:codepoints-to-string|fn:codepoint-equal|fn:ceiling|fn:boolean|fn:base-uri|fn:avg|fn:adjust-time-to-timezone|fn:adjust-dateTime-to-timezone|fn:adjust-date-to-timezone|fn:abs|feed:unsubscribe|feed:subscription|feed:subscribe|feed:request|feed:item|feed:description|excel:clean|entity:enrich|dom:set-pipelines|dom:set-permissions|dom:set-name|dom:set-evaluation-context|dom:set-domain-scope|dom:set-description|dom:remove-pipeline|dom:remove-permissions|dom:remove|dom:get|dom:evaluation-context|dom:domains|dom:domain-scope|dom:create|dom:configuration-set-restart-user|dom:configuration-set-permissions|dom:configuration-set-evaluation-context|dom:configuration-set-default-domain|dom:configuration-get|dom:configuration-create|dom:collection|dom:add-pipeline|dom:add-permissions|dls:retention-rules|dls:retention-rule-remove|dls:retention-rule-insert|dls:retention-rule|dls:purge|dls:node-expand|dls:link-references|dls:link-expand|dls:documents-query|dls:document-versions-query|dls:document-version-uri|dls:document-version-query|dls:document-version-delete|dls:document-version-as-of|dls:document-version|dls:document-update|dls:document-unmanage|dls:document-set-quality|dls:document-set-property|dls:document-set-properties|dls:document-set-permissions|dls:document-set-collections|dls:document-retention-rules|dls:document-remove-properties|dls:document-remove-permissions|dls:document-remove-collections|dls:document-purge|dls:document-manage|dls:document-is-managed|dls:document-insert-and-manage|dls:document-include-query|dls:document-history|dls:document-get-permissions|dls:document-extract-part|dls:document-delete|dls:document-checkout-status|dls:document-checkout|dls:document-checkin|dls:document-add-properties|dls:document-add-permissions|dls:document-add-collections|dls:break-checkout|dls:author-query|dls:as-of-query|dbk:convert|dbg:wait|dbg:value|dbg:stopped|dbg:stop|dbg:step|dbg:status|dbg:stack|dbg:out|dbg:next|dbg:line|dbg:invoke|dbg:function|dbg:finish|dbg:expr|dbg:eval|dbg:disconnect|dbg:detach|dbg:continue|dbg:connect|dbg:clear|dbg:breakpoints|dbg:break|dbg:attached|dbg:attach|cvt:save-converted-documents|cvt:part-uri|cvt:destination-uri|cvt:basepath|cvt:basename|cts:words|cts:word-query-weight|cts:word-query-text|cts:word-query-options|cts:word-query|cts:word-match|cts:walk|cts:uris|cts:uri-match|cts:train|cts:tokenize|cts:thresholds|cts:stem|cts:similar-query-weight|cts:similar-query-nodes|cts:similar-query|cts:shortest-distance|cts:search|cts:score|cts:reverse-query-weight|cts:reverse-query-nodes|cts:reverse-query|cts:remainder|cts:registered-query-weight|cts:registered-query-options|cts:registered-query-ids|cts:registered-query|cts:register|cts:query|cts:quality|cts:properties-query-query|cts:properties-query|cts:polygon-vertices|cts:polygon|cts:point-longitude|cts:point-latitude|cts:point|cts:or-query-queries|cts:or-query|cts:not-query-weight|cts:not-query-query|cts:not-query|cts:near-query-weight|cts:near-query-queries|cts:near-query-options|cts:near-query-distance|cts:near-query|cts:highlight|cts:geospatial-co-occurrences|cts:frequency|cts:fitness|cts:field-words|cts:field-word-query-weight|cts:field-word-query-text|cts:field-word-query-options|cts:field-word-query-field-name|cts:field-word-query|cts:field-word-match|cts:entity-highlight|cts:element-words|cts:element-word-query-weight|cts:element-word-query-text|cts:element-word-query-options|cts:element-word-query-element-name|cts:element-word-query|cts:element-word-match|cts:element-values|cts:element-value-ranges|cts:element-value-query-weight|cts:element-value-query-text|cts:element-value-query-options|cts:element-value-query-element-name|cts:element-value-query|cts:element-value-match|cts:element-value-geospatial-co-occurrences|cts:element-value-co-occurrences|cts:element-range-query-weight|cts:element-range-query-value|cts:element-range-query-options|cts:element-range-query-operator|cts:element-range-query-element-name|cts:element-range-query|cts:element-query-query|cts:element-query-element-name|cts:element-query|cts:element-pair-geospatial-values|cts:element-pair-geospatial-value-match|cts:element-pair-geospatial-query-weight|cts:element-pair-geospatial-query-region|cts:element-pair-geospatial-query-options|cts:element-pair-geospatial-query-longitude-name|cts:element-pair-geospatial-query-latitude-name|cts:element-pair-geospatial-query-element-name|cts:element-pair-geospatial-query|cts:element-pair-geospatial-boxes|cts:element-geospatial-values|cts:element-geospatial-value-match|cts:element-geospatial-query-weight|cts:element-geospatial-query-region|cts:element-geospatial-query-options|cts:element-geospatial-query-element-name|cts:element-geospatial-query|cts:element-geospatial-boxes|cts:element-child-geospatial-values|cts:element-child-geospatial-value-match|cts:element-child-geospatial-query-weight|cts:element-child-geospatial-query-region|cts:element-child-geospatial-query-options|cts:element-child-geospatial-query-element-name|cts:element-child-geospatial-query-child-name|cts:element-child-geospatial-query|cts:element-child-geospatial-boxes|cts:element-attribute-words|cts:element-attribute-word-query-weight|cts:element-attribute-word-query-text|cts:element-attribute-word-query-options|cts:element-attribute-word-query-element-name|cts:element-attribute-word-query-attribute-name|cts:element-attribute-word-query|cts:element-attribute-word-match|cts:element-attribute-values|cts:element-attribute-value-ranges|cts:element-attribute-value-query-weight|cts:element-attribute-value-query-text|cts:element-attribute-value-query-options|cts:element-attribute-value-query-element-name|cts:element-attribute-value-query-attribute-name|cts:element-attribute-value-query|cts:element-attribute-value-match|cts:element-attribute-value-geospatial-co-occurrences|cts:element-attribute-value-co-occurrences|cts:element-attribute-range-query-weight|cts:element-attribute-range-query-value|cts:element-attribute-range-query-options|cts:element-attribute-range-query-operator|cts:element-attribute-range-query-element-name|cts:element-attribute-range-query-attribute-name|cts:element-attribute-range-query|cts:element-attribute-pair-geospatial-values|cts:element-attribute-pair-geospatial-value-match|cts:element-attribute-pair-geospatial-query-weight|cts:element-attribute-pair-geospatial-query-region|cts:element-attribute-pair-geospatial-query-options|cts:element-attribute-pair-geospatial-query-longitude-name|cts:element-attribute-pair-geospatial-query-latitude-name|cts:element-attribute-pair-geospatial-query-element-name|cts:element-attribute-pair-geospatial-query|cts:element-attribute-pair-geospatial-boxes|cts:document-query-uris|cts:document-query|cts:distance|cts:directory-query-uris|cts:directory-query-depth|cts:directory-query|cts:destination|cts:deregister|cts:contains|cts:confidence|cts:collections|cts:collection-query-uris|cts:collection-query|cts:collection-match|cts:classify|cts:circle-radius|cts:circle-center|cts:circle|cts:box-west|cts:box-south|cts:box-north|cts:box-east|cts:box|cts:bearing|cts:arc-intersection|cts:and-query-queries|cts:and-query-options|cts:and-query|cts:and-not-query-positive-query|cts:and-not-query-negative-query|cts:and-not-query|css:get|css:convert|cpf:success|cpf:failure|cpf:document-set-state|cpf:document-set-processing-status|cpf:document-set-last-updated|cpf:document-set-error|cpf:document-get-state|cpf:document-get-processing-status|cpf:document-get-last-updated|cpf:document-get-error|cpf:check-transition|alert:spawn-matching-actions|alert:rule-user-id-query|alert:rule-set-user-id|alert:rule-set-query|alert:rule-set-options|alert:rule-set-name|alert:rule-set-description|alert:rule-set-action|alert:rule-remove|alert:rule-name-query|alert:rule-insert|alert:rule-id-query|alert:rule-get-user-id|alert:rule-get-query|alert:rule-get-options|alert:rule-get-name|alert:rule-get-id|alert:rule-get-description|alert:rule-get-action|alert:rule-action-query|alert:remove-triggers|alert:make-rule|alert:make-log-action|alert:make-config|alert:make-action|alert:invoke-matching-actions|alert:get-my-rules|alert:get-all-rules|alert:get-actions|alert:find-matching-rules|alert:create-triggers|alert:config-set-uri|alert:config-set-trigger-ids|alert:config-set-options|alert:config-set-name|alert:config-set-description|alert:config-set-cpf-domain-names|alert:config-set-cpf-domain-ids|alert:config-insert|alert:config-get-uri|alert:config-get-trigger-ids|alert:config-get-options|alert:config-get-name|alert:config-get-id|alert:config-get-description|alert:config-get-cpf-domain-names|alert:config-get-cpf-domain-ids|alert:config-get|alert:config-delete|alert:action-set-options|alert:action-set-name|alert:action-set-module-root|alert:action-set-module-db|alert:action-set-module|alert:action-set-description|alert:action-remove|alert:action-insert|alert:action-get-options|alert:action-get-name|alert:action-get-module-root|alert:action-get-module-db|alert:action-get-module|alert:action-get-description|zero-or-one|years-from-duration|year-from-dateTime|year-from-date|upper-case|unordered|true|translate|trace|tokenize|timezone-from-time|timezone-from-dateTime|timezone-from-date|sum|subtract-dateTimes-yielding-yearMonthDuration|subtract-dateTimes-yielding-dayTimeDuration|substring-before|substring-after|substring|subsequence|string-to-codepoints|string-pad|string-length|string-join|string|static-base-uri|starts-with|seconds-from-time|seconds-from-duration|seconds-from-dateTime|round-half-to-even|round|root|reverse|resolve-uri|resolve-QName|replace|remove|QName|prefix-from-QName|position|one-or-more|number|not|normalize-unicode|normalize-space|node-name|node-kind|nilled|namespace-uri-from-QName|namespace-uri-for-prefix|namespace-uri|name|months-from-duration|month-from-dateTime|month-from-date|minutes-from-time|minutes-from-duration|minutes-from-dateTime|min|max|matches|lower-case|local-name-from-QName|local-name|last|lang|iri-to-uri|insert-before|index-of|in-scope-prefixes|implicit-timezone|idref|id|hours-from-time|hours-from-duration|hours-from-dateTime|floor|false|expanded-QName|exists|exactly-one|escape-uri|escape-html-uri|error|ends-with|encode-for-uri|empty|document-uri|doc-available|doc|distinct-values|distinct-nodes|default-collation|deep-equal|days-from-duration|day-from-dateTime|day-from-date|data|current-time|current-dateTime|current-date|count|contains|concat|compare|collection|codepoints-to-string|codepoint-equal|ceiling|boolean|base-uri|avg|adjust-time-to-timezone|adjust-dateTime-to-timezone|adjust-date-to-timezone|abs)\b/],
+ // Matching normal words if none of the previous regular expressions matched
+ [PR['PR_PLAIN'], /^[A-Za-z0-9_\-\:]+/],
+ // Matching whitespaces
+ [PR['PR_PLAIN'], /^[\t\n\r \xA0]+/]
+ ]),
+ ['xq', 'xquery']);
diff --git a/media/prettify-20110601/src/lang-yaml.js b/media/prettify-20110601/src/lang-yaml.js
new file mode 100644
index 0000000..c2e52b2
--- /dev/null
+++ b/media/prettify-20110601/src/lang-yaml.js
@@ -0,0 +1,27 @@
+// Contributed by ribrdb @ code.google.com
+
+/**
+ * @fileoverview
+ * Registers a language handler for YAML.
+ *
+ * @author ribrdb
+ */
+
+PR['registerLangHandler'](
+ PR['createSimpleLexer'](
+ [
+ [PR['PR_PUNCTUATION'], /^[:|>?]+/, null, ':|>?'],
+ [PR['PR_DECLARATION'], /^%(?:YAML|TAG)[^#\r\n]+/, null, '%'],
+ [PR['PR_TYPE'], /^[&]\S+/, null, '&'],
+ [PR['PR_TYPE'], /^!\S*/, null, '!'],
+ [PR['PR_STRING'], /^"(?:[^\\"]|\\.)*(?:"|$)/, null, '"'],
+ [PR['PR_STRING'], /^'(?:[^']|'')*(?:'|$)/, null, "'"],
+ [PR['PR_COMMENT'], /^#[^\r\n]*/, null, '#'],
+ [PR['PR_PLAIN'], /^\s+/, null, ' \t\r\n']
+ ],
+ [
+ [PR['PR_DECLARATION'], /^(?:---|\.\.\.)(?:[\r\n]|$)/],
+ [PR['PR_PUNCTUATION'], /^-/],
+ [PR['PR_KEYWORD'], /^\w+:[ \r\n]/],
+ [PR['PR_PLAIN'], /^\w+/]
+ ]), ['yaml', 'yml']);
diff --git a/media/prettify-20110601/src/prettify.css b/media/prettify-20110601/src/prettify.css
new file mode 100644
index 0000000..400fd74
--- /dev/null
+++ b/media/prettify-20110601/src/prettify.css
@@ -0,0 +1,52 @@
+/* Pretty printing styles. Used with prettify.js. */
+
+/* SPAN elements with the classes below are added by prettyprint. */
+.pln { color: #000 } /* plain text */
+
+@media screen {
+ .str { color: #080 } /* string content */
+ .kwd { color: #008 } /* a keyword */
+ .com { color: #800 } /* a comment */
+ .typ { color: #606 } /* a type name */
+ .lit { color: #066 } /* a literal value */
+ /* punctuation, lisp open bracket, lisp close bracket */
+ .pun, .opn, .clo { color: #660 }
+ .tag { color: #008 } /* a markup tag name */
+ .atn { color: #606 } /* a markup attribute name */
+ .atv { color: #080 } /* a markup attribute value */
+ .dec, .var { color: #606 } /* a declaration; a variable name */
+ .fun { color: red } /* a function name */
+}
+
+/* Use higher contrast and text-weight for printable form. */
+@media print, projection {
+ .str { color: #060 }
+ .kwd { color: #006; font-weight: bold }
+ .com { color: #600; font-style: italic }
+ .typ { color: #404; font-weight: bold }
+ .lit { color: #044 }
+ .pun, .opn, .clo { color: #440 }
+ .tag { color: #006; font-weight: bold }
+ .atn { color: #404 }
+ .atv { color: #060 }
+}
+
+/* Put a border around prettyprinted code snippets. */
+pre.prettyprint { padding: 2px; border: 1px solid #888 }
+
+/* Specify class=linenums on a pre to get line numbering */
+ol.linenums { margin-top: 0; margin-bottom: 0 } /* IE indents via margin-left */
+li.L0,
+li.L1,
+li.L2,
+li.L3,
+li.L5,
+li.L6,
+li.L7,
+li.L8 { list-style-type: none }
+/* Alternate shading for lines */
+li.L1,
+li.L3,
+li.L5,
+li.L7,
+li.L9 { background: #eee }
diff --git a/media/prettify-20100721/prettify.js b/media/prettify-20110601/src/prettify.js
index 75893b9..037c26d 100644
--- a/media/prettify-20100721/prettify.js
+++ b/media/prettify-20110601/src/prettify.js
@@ -16,8 +16,8 @@
/**
* @fileoverview
* some functions for browser-side pretty printing of code contained in html.
- * <p>
*
+ * <p>
* For a fairly comprehensive set of languages see the
* <a href="http://google-code-prettify.googlecode.com/svn/trunk/README.html#langs">README</a>
* file that came with this source. At a minimum, the lexer should work on a
@@ -62,290 +62,157 @@
*/
window['PR_SHOULD_USE_CONTINUATION'] = true;
-/** the number of characters between tab columns */
-window['PR_TAB_WIDTH'] = 8;
-
-/** Walks the DOM returning a properly escaped version of innerHTML.
- * @param {Node} node
- * @param {Array.<string>} out output buffer that receives chunks of HTML.
- */
-window['PR_normalizedHtml']
-
-/** Contains functions for creating and registering new language handlers.
- * @type {Object}
- */
- = window['PR']
-
-/** Pretty print a chunk of code.
- *
- * @param {string} sourceCodeHtml code as html
- * @return {string} code as html, but prettier
- */
- = window['prettyPrintOne']
-/** Find all the {@code <pre>} and {@code <code>} tags in the DOM with
- * {@code class=prettyprint} and prettify them.
- * @param {Function?} opt_whenDone if specified, called when the last entry
- * has been finished.
- */
- = window['prettyPrint'] = void 0;
-
-/** browser detection. @extern @returns false if not IE, otherwise the major version. */
-window['_pr_isIE6'] = function () {
- var ieVersion = navigator && navigator.userAgent &&
- navigator.userAgent.match(/\bMSIE ([678])\./);
- ieVersion = ieVersion ? +ieVersion[1] : false;
- window['_pr_isIE6'] = function () { return ieVersion; };
- return ieVersion;
-};
-
-
(function () {
// Keyword lists for various languages.
- var FLOW_CONTROL_KEYWORDS =
- "break continue do else for if return while ";
- var C_KEYWORDS = FLOW_CONTROL_KEYWORDS + "auto case char const default " +
- "double enum extern float goto int long register short signed sizeof " +
- "static struct switch typedef union unsigned void volatile ";
- var COMMON_KEYWORDS = C_KEYWORDS + "catch class delete false import " +
- "new operator private protected public this throw true try typeof ";
- var CPP_KEYWORDS = COMMON_KEYWORDS + "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 ";
- var JAVA_KEYWORDS = COMMON_KEYWORDS +
- "abstract boolean byte extends final finally implements import " +
- "instanceof null native package strictfp super synchronized throws " +
- "transient ";
- var CSHARP_KEYWORDS = JAVA_KEYWORDS +
- "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 ";
- var JSCRIPT_KEYWORDS = COMMON_KEYWORDS +
- "debugger eval export function get null set undefined var with " +
- "Infinity NaN ";
- var PERL_KEYWORDS = "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 ";
- var PYTHON_KEYWORDS = FLOW_CONTROL_KEYWORDS + "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 ";
- var RUBY_KEYWORDS = FLOW_CONTROL_KEYWORDS + "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 ";
- var SH_KEYWORDS = FLOW_CONTROL_KEYWORDS + "case done elif esac eval fi " +
- "function in local set then until ";
- var ALL_KEYWORDS = (
- CPP_KEYWORDS + CSHARP_KEYWORDS + JSCRIPT_KEYWORDS + PERL_KEYWORDS +
- PYTHON_KEYWORDS + RUBY_KEYWORDS + SH_KEYWORDS);
+ // We use things that coerce to strings to make them compact when minified
+ // and to defeat aggressive optimizers that fold large string constants.
+ var FLOW_CONTROL_KEYWORDS = ["break,continue,do,else,for,if,return,while"];
+ var C_KEYWORDS = [FLOW_CONTROL_KEYWORDS,"auto,case,char,const,default," +
+ "double,enum,extern,float,goto,int,long,register,short,signed,sizeof," +
+ "static,struct,switch,typedef,union,unsigned,void,volatile"];
+ var COMMON_KEYWORDS = [C_KEYWORDS,"catch,class,delete,false,import," +
+ "new,operator,private,protected,public,this,throw,true,try,typeof"];
+ var CPP_KEYWORDS = [COMMON_KEYWORDS,"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,where"];
+ var JAVA_KEYWORDS = [COMMON_KEYWORDS,
+ "abstract,boolean,byte,extends,final,finally,implements,import," +
+ "instanceof,null,native,package,strictfp,super,synchronized,throws," +
+ "transient"];
+ var CSHARP_KEYWORDS = [JAVA_KEYWORDS,
+ "as,base,by,checked,decimal,delegate,descending,dynamic,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"];
+ var COFFEE_KEYWORDS = "all,and,by,catch,class,else,extends,false,finally," +
+ "for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then," +
+ "true,try,unless,until,when,while,yes";
+ var JSCRIPT_KEYWORDS = [COMMON_KEYWORDS,
+ "debugger,eval,export,function,get,null,set,undefined,var,with," +
+ "Infinity,NaN"];
+ var PERL_KEYWORDS = "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";
+ var PYTHON_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "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"];
+ var RUBY_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "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"];
+ var SH_KEYWORDS = [FLOW_CONTROL_KEYWORDS, "case,done,elif,esac,eval,fi," +
+ "function,in,local,set,then,until"];
+ var ALL_KEYWORDS = [
+ CPP_KEYWORDS, CSHARP_KEYWORDS, JSCRIPT_KEYWORDS, PERL_KEYWORDS +
+ PYTHON_KEYWORDS, RUBY_KEYWORDS, SH_KEYWORDS];
+ var C_TYPES = /^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/;
// token style names. correspond to css classes
- /** token style for a string literal */
+ /**
+ * token style for a string literal
+ * @const
+ */
var PR_STRING = 'str';
- /** token style for a keyword */
+ /**
+ * token style for a keyword
+ * @const
+ */
var PR_KEYWORD = 'kwd';
- /** token style for a comment */
+ /**
+ * token style for a comment
+ * @const
+ */
var PR_COMMENT = 'com';
- /** token style for a type */
+ /**
+ * token style for a type
+ * @const
+ */
var PR_TYPE = 'typ';
- /** token style for a literal value. e.g. 1, null, true. */
+ /**
+ * token style for a literal value. e.g. 1, null, true.
+ * @const
+ */
var PR_LITERAL = 'lit';
- /** token style for a punctuation string. */
+ /**
+ * token style for a punctuation string.
+ * @const
+ */
var PR_PUNCTUATION = 'pun';
- /** token style for a punctuation string. */
+ /**
+ * token style for a punctuation string.
+ * @const
+ */
var PR_PLAIN = 'pln';
- /** token style for an sgml tag. */
+ /**
+ * token style for an sgml tag.
+ * @const
+ */
var PR_TAG = 'tag';
- /** token style for a markup declaration such as a DOCTYPE. */
+ /**
+ * token style for a markup declaration such as a DOCTYPE.
+ * @const
+ */
var PR_DECLARATION = 'dec';
- /** token style for embedded source. */
+ /**
+ * token style for embedded source.
+ * @const
+ */
var PR_SOURCE = 'src';
- /** token style for an sgml attribute name. */
+ /**
+ * token style for an sgml attribute name.
+ * @const
+ */
var PR_ATTRIB_NAME = 'atn';
- /** token style for an sgml attribute value. */
+ /**
+ * token style for an sgml attribute value.
+ * @const
+ */
var PR_ATTRIB_VALUE = 'atv';
/**
* A class that indicates a section of markup that is not code, e.g. to allow
* embedding of line numbers within code listings.
+ * @const
*/
var PR_NOCODE = 'nocode';
- /** A set of tokens that can precede a regular expression literal in
- * javascript.
- * http://www.mozilla.org/js/language/js20/rationale/syntax.html has the full
- * list, but I've removed ones that might be problematic when seen in
- * languages that don't support regular expression literals.
- *
- * <p>Specifically, I've removed any keywords that can't precede a regexp
- * literal in a syntactically legal javascript program, and I've removed the
- * "in" keyword since it's not a keyword in many languages, and might be used
- * as a count of inches.
- *
- * <p>The link a above does not accurately describe EcmaScript rules since
- * it fails to distinguish between (a=++/b/i) and (a++/b/i) but it works
- * very well in practice.
- *
- * @private
- */
- var REGEXP_PRECEDER_PATTERN = function () {
- var preceders = [
- "!", "!=", "!==", "#", "%", "%=", "&", "&&", "&&=",
- "&=", "(", "*", "*=", /* "+", */ "+=", ",", /* "-", */ "-=",
- "->", /*".", "..", "...", handled below */ "/", "/=", ":", "::", ";",
- "<", "<<", "<<=", "<=", "=", "==", "===", ">",
- ">=", ">>", ">>=", ">>>", ">>>=", "?", "@", "[",
- "^", "^=", "^^", "^^=", "{", "|", "|=", "||",
- "||=", "~" /* handles =~ and !~ */,
- "break", "case", "continue", "delete",
- "do", "else", "finally", "instanceof",
- "return", "throw", "try", "typeof"
- ];
- var pattern = '(?:^^|[+-]';
- for (var i = 0; i < preceders.length; ++i) {
- pattern += '|' + preceders[i].replace(/([^=<>:&a-z])/g, '\\$1');
- }
- pattern += ')\\s*'; // matches at end, and matches empty string
- return pattern;
- // CAVEAT: this does not properly handle the case where a regular
- // expression immediately follows another since a regular expression may
- // have flags for case-sensitivity and the like. Having regexp tokens
- // adjacent is not valid in any language I'm aware of, so I'm punting.
- // TODO: maybe style special characters inside a regexp as punctuation.
- }();
-
- // Define regexps here so that the interpreter doesn't have to create an
- // object each time the function containing them is called.
- // The language spec requires a new object created even if you don't access
- // the $1 members.
- var pr_amp = /&/g;
- var pr_lt = /</g;
- var pr_gt = />/g;
- var pr_quot = /\"/g;
- /** like textToHtml but escapes double quotes to be attribute safe. */
- function attribToHtml(str) {
- return str.replace(pr_amp, '&amp;')
- .replace(pr_lt, '&lt;')
- .replace(pr_gt, '&gt;')
- .replace(pr_quot, '&quot;');
- }
-
- /** escapest html special characters to html. */
- function textToHtml(str) {
- return str.replace(pr_amp, '&amp;')
- .replace(pr_lt, '&lt;')
- .replace(pr_gt, '&gt;');
- }
-
- var pr_ltEnt = /&lt;/g;
- var pr_gtEnt = /&gt;/g;
- var pr_aposEnt = /&apos;/g;
- var pr_quotEnt = /&quot;/g;
- var pr_ampEnt = /&amp;/g;
- var pr_nbspEnt = /&nbsp;/g;
- /** unescapes html to plain text. */
- function htmlToText(html) {
- var pos = html.indexOf('&');
- if (pos < 0) { return html; }
- // Handle numeric entities specially. We can't use functional substitution
- // since that doesn't work in older versions of Safari.
- // These should be rare since most browsers convert them to normal chars.
- for (--pos; (pos = html.indexOf('&#', pos + 1)) >= 0;) {
- var end = html.indexOf(';', pos);
- if (end >= 0) {
- var num = html.substring(pos + 3, end);
- var radix = 10;
- if (num && num.charAt(0) === 'x') {
- num = num.substring(1);
- radix = 16;
- }
- var codePoint = parseInt(num, radix);
- if (!isNaN(codePoint)) {
- html = (html.substring(0, pos) + String.fromCharCode(codePoint) +
- html.substring(end + 1));
- }
- }
- }
-
- return html.replace(pr_ltEnt, '<')
- .replace(pr_gtEnt, '>')
- .replace(pr_aposEnt, "'")
- .replace(pr_quotEnt, '"')
- .replace(pr_nbspEnt, ' ')
- .replace(pr_ampEnt, '&');
- }
-
- /** is the given node's innerHTML normally unescaped? */
- function isRawContent(node) {
- return 'XMP' === node.tagName;
- }
- var newlineRe = /[\r\n]/g;
- /**
- * Are newlines and adjacent spaces significant in the given node's innerHTML?
- */
- function isPreformatted(node, content) {
- // PRE means preformatted, and is a very common case, so don't create
- // unnecessary computed style objects.
- if ('PRE' === node.tagName) { return true; }
- if (!newlineRe.test(content)) { return true; } // Don't care
- var whitespace = '';
- // For disconnected nodes, IE has no currentStyle.
- if (node.currentStyle) {
- whitespace = node.currentStyle.whiteSpace;
- } else if (window.getComputedStyle) {
- // Firefox makes a best guess if node is disconnected whereas Safari
- // returns the empty string.
- whitespace = window.getComputedStyle(node, null).whiteSpace;
- }
- return !whitespace || whitespace === 'pre';
- }
+/**
+ * A set of tokens that can precede a regular expression literal in
+ * javascript
+ * http://web.archive.org/web/20070717142515/http://www.mozilla.org/js/language/js20/rationale/syntax.html
+ * has the full list, but I've removed ones that might be problematic when
+ * seen in languages that don't support regular expression literals.
+ *
+ * <p>Specifically, I've removed any keywords that can't precede a regexp
+ * literal in a syntactically legal javascript program, and I've removed the
+ * "in" keyword since it's not a keyword in many languages, and might be used
+ * as a count of inches.
+ *
+ * <p>The link a above does not accurately describe EcmaScript rules since
+ * it fails to distinguish between (a=++/b/i) and (a++/b/i) but it works
+ * very well in practice.
+ *
+ * @private
+ * @const
+ */
+var REGEXP_PRECEDER_PATTERN = '(?:^^\\.?|[+-]|\\!|\\!=|\\!==|\\#|\\%|\\%=|&|&&|&&=|&=|\\(|\\*|\\*=|\\+=|\\,|\\-=|\\->|\\/|\\/=|:|::|\\;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|\\?|\\@|\\[|\\^|\\^=|\\^\\^|\\^\\^=|\\{|\\||\\|=|\\|\\||\\|\\|=|\\~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\\s*';
- function normalizedHtml(node, out, opt_sortAttrs) {
- switch (node.nodeType) {
- case 1: // an element
- var name = node.tagName.toLowerCase();
+// CAVEAT: this does not properly handle the case where a regular
+// expression immediately follows another since a regular expression may
+// have flags for case-sensitivity and the like. Having regexp tokens
+// adjacent is not valid in any language I'm aware of, so I'm punting.
+// TODO: maybe style special characters inside a regexp as punctuation.
- out.push('<', name);
- var attrs = node.attributes;
- var n = attrs.length;
- if (n) {
- if (opt_sortAttrs) {
- var sortedAttrs = [];
- for (var i = n; --i >= 0;) { sortedAttrs[i] = attrs[i]; }
- sortedAttrs.sort(function (a, b) {
- return (a.name < b.name) ? -1 : a.name === b.name ? 0 : 1;
- });
- attrs = sortedAttrs;
- }
- for (var i = 0; i < n; ++i) {
- var attr = attrs[i];
- if (!attr.specified) { continue; }
- out.push(' ', attr.name.toLowerCase(),
- '="', attribToHtml(attr.value), '"');
- }
- }
- out.push('>');
- for (var child = node.firstChild; child; child = child.nextSibling) {
- normalizedHtml(child, out, opt_sortAttrs);
- }
- if (node.firstChild || !/^(?:br|link|img)$/.test(name)) {
- out.push('<\/', name, '>');
- }
- break;
- case 3: case 4: // text
- out.push(textToHtml(node.nodeValue));
- break;
- }
- }
/**
* Given a group of {@link RegExp}s, returns a {@code RegExp} that globally
- * matches the union o the sets o strings matched d by the input RegExp.
+ * matches the union of the sets of strings matched by the input RegExp.
* Since it matches globally, if the input strings have a start-of-input
* anchor (/^.../), it is ignored for the purposes of unioning.
* @param {Array.<RegExp>} regexs non multiline, non-global regexs.
@@ -353,7 +220,7 @@ window['_pr_isIE6'] = function () {
*/
function combinePrefixPatterns(regexs) {
var capturedGroupIndex = 0;
-
+
var needToFoldCase = false;
var ignoreCase = false;
for (var i = 0, n = regexs.length; i < n; ++i) {
@@ -367,26 +234,34 @@ window['_pr_isIE6'] = function () {
break;
}
}
-
+
+ var escapeCharToCodeUnit = {
+ 'b': 8,
+ 't': 9,
+ 'n': 0xa,
+ 'v': 0xb,
+ 'f': 0xc,
+ 'r': 0xd
+ };
+
function decodeEscape(charsetPart) {
- if (charsetPart.charAt(0) !== '\\') { return charsetPart.charCodeAt(0); }
- switch (charsetPart.charAt(1)) {
- case 'b': return 8;
- case 't': return 9;
- case 'n': return 0xa;
- case 'v': return 0xb;
- case 'f': return 0xc;
- case 'r': return 0xd;
- case 'u': case 'x':
- return parseInt(charsetPart.substring(2), 16)
- || charsetPart.charCodeAt(1);
- case '0': case '1': case '2': case '3': case '4':
- case '5': case '6': case '7':
- return parseInt(charsetPart.substring(1), 8);
- default: return charsetPart.charCodeAt(1);
+ var cc0 = charsetPart.charCodeAt(0);
+ if (cc0 !== 92 /* \\ */) {
+ return cc0;
+ }
+ var c1 = charsetPart.charAt(1);
+ cc0 = escapeCharToCodeUnit[c1];
+ if (cc0) {
+ return cc0;
+ } else if ('0' <= c1 && c1 <= '7') {
+ return parseInt(charsetPart.substring(1), 8);
+ } else if (c1 === 'u' || c1 === 'x') {
+ return parseInt(charsetPart.substring(2), 16);
+ } else {
+ return charsetPart.charCodeAt(1);
}
}
-
+
function encodeEscape(charCode) {
if (charCode < 0x20) {
return (charCode < 0x10 ? '\\x0' : '\\x') + charCode.toString(16);
@@ -397,7 +272,7 @@ window['_pr_isIE6'] = function () {
}
return ch;
}
-
+
function caseFoldCharset(charSet) {
var charsetParts = charSet.substring(1, charSet.length - 1).match(
new RegExp(
@@ -414,34 +289,33 @@ window['_pr_isIE6'] = function () {
var inverse = charsetParts[0] === '^';
for (var i = inverse ? 1 : 0, n = charsetParts.length; i < n; ++i) {
var p = charsetParts[i];
- switch (p) {
- case '\\B': case '\\b':
- case '\\D': case '\\d':
- case '\\S': case '\\s':
- case '\\W': case '\\w':
- groups.push(p);
- continue;
- }
- var start = decodeEscape(p);
- var end;
- if (i + 2 < n && '-' === charsetParts[i + 1]) {
- end = decodeEscape(charsetParts[i + 2]);
- i += 2;
+ if (/\\[bdsw]/i.test(p)) { // Don't muck with named groups.
+ groups.push(p);
} else {
- end = start;
- }
- ranges.push([start, end]);
- // If the range might intersect letters, then expand it.
- if (!(end < 65 || start > 122)) {
- if (!(end < 65 || start > 90)) {
- ranges.push([Math.max(65, start) | 32, Math.min(end, 90) | 32]);
+ var start = decodeEscape(p);
+ var end;
+ if (i + 2 < n && '-' === charsetParts[i + 1]) {
+ end = decodeEscape(charsetParts[i + 2]);
+ i += 2;
+ } else {
+ end = start;
}
- if (!(end < 97 || start > 122)) {
- ranges.push([Math.max(97, start) & ~32, Math.min(end, 122) & ~32]);
+ ranges.push([start, end]);
+ // If the range might intersect letters, then expand it.
+ // This case handling is too simplistic.
+ // It does not deal with non-latin case folding.
+ // It works for latin source code identifiers though.
+ if (!(end < 65 || start > 122)) {
+ if (!(end < 65 || start > 90)) {
+ ranges.push([Math.max(65, start) | 32, Math.min(end, 90) | 32]);
+ }
+ if (!(end < 97 || start > 122)) {
+ ranges.push([Math.max(97, start) & ~32, Math.min(end, 122) & ~32]);
+ }
}
}
}
-
+
// [[1, 10], [3, 4], [8, 12], [14, 14], [16, 16], [17, 17]]
// -> [[1, 12], [14, 14], [16, 17]]
ranges.sort(function (a, b) { return (a[0] - b[0]) || (b[1] - a[1]); });
@@ -455,7 +329,7 @@ window['_pr_isIE6'] = function () {
consolidatedRanges.push(lastRange = range);
}
}
-
+
var out = ['['];
if (inverse) { out.push('^'); }
out.push.apply(out, groups);
@@ -470,7 +344,7 @@ window['_pr_isIE6'] = function () {
out.push(']');
return out.join('');
}
-
+
function allowAnywhereFoldCaseAndRenumberGroups(regex) {
// Split into character sets, escape sequences, punctuation strings
// like ('(', '(?:', ')', '^'), and runs of characters that do not
@@ -489,12 +363,12 @@ window['_pr_isIE6'] = function () {
+ ')',
'g'));
var n = parts.length;
-
+
// Maps captured group numbers to the number they will occupy in
// the output or to -1 if that has not been determined, or to
// undefined if they need not be capturing in the output.
var capturedGroups = [];
-
+
// Walk over and identify back references to build the capturedGroups
// mapping.
for (var i = 0, groupIndex = 0; i < n; ++i) {
@@ -509,7 +383,7 @@ window['_pr_isIE6'] = function () {
}
}
}
-
+
// Renumber groups and reduce capturing groups to non-capturing groups
// where possible.
for (var i = 1; i < capturedGroups.length; ++i) {
@@ -531,14 +405,14 @@ window['_pr_isIE6'] = function () {
}
}
}
-
+
// Remove any prefix anchors so that the output will match anywhere.
// ^^ really does mean an anchored match though.
for (var i = 0, groupIndex = 0; i < n; ++i) {
if ('^' === parts[i] && '^' !== parts[i + 1]) { parts[i] = ''; }
}
-
- // Expand letters to groupts to handle mixing of case-sensitive and
+
+ // Expand letters to groups to handle mixing of case-sensitive and
// case-insensitive patterns if necessary.
if (regex.ignoreCase && needToFoldCase) {
for (var i = 0; i < n; ++i) {
@@ -557,10 +431,10 @@ window['_pr_isIE6'] = function () {
}
}
}
-
+
return parts.join('');
}
-
+
var rewritten = [];
for (var i = 0, n = regexs.length; i < n; ++i) {
var regex = regexs[i];
@@ -568,181 +442,111 @@ window['_pr_isIE6'] = function () {
rewritten.push(
'(?:' + allowAnywhereFoldCaseAndRenumberGroups(regex) + ')');
}
-
+
return new RegExp(rewritten.join('|'), ignoreCase ? 'gi' : 'g');
}
- var PR_innerHtmlWorks = null;
- function getInnerHtml(node) {
- // inner html is hopelessly broken in Safari 2.0.4 when the content is
- // an html description of well formed XML and the containing tag is a PRE
- // tag, so we detect that case and emulate innerHTML.
- if (null === PR_innerHtmlWorks) {
- var testNode = document.createElement('PRE');
- testNode.appendChild(
- document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />'));
- PR_innerHtmlWorks = !/</.test(testNode.innerHTML);
- }
-
- if (PR_innerHtmlWorks) {
- var content = node.innerHTML;
- // XMP tags contain unescaped entities so require special handling.
- if (isRawContent(node)) {
- content = textToHtml(content);
- } else if (!isPreformatted(node, content)) {
- content = content.replace(/(<br\s*\/?>)[\r\n]+/g, '$1')
- .replace(/(?:[\r\n]+[ \t]*)+/g, ' ');
- }
- return content;
- }
- var out = [];
- for (var child = node.firstChild; child; child = child.nextSibling) {
- normalizedHtml(child, out);
+ /**
+ * Split markup into a string of source code and an array mapping ranges in
+ * that string to the text nodes in which they appear.
+ *
+ * <p>
+ * The HTML DOM structure:</p>
+ * <pre>
+ * (Element "p"
+ * (Element "b"
+ * (Text "print ")) ; #1
+ * (Text "'Hello '") ; #2
+ * (Element "br") ; #3
+ * (Text " + 'World';")) ; #4
+ * </pre>
+ * <p>
+ * corresponds to the HTML
+ * {@code <p><b>print </b>'Hello '<br> + 'World';</p>}.</p>
+ *
+ * <p>
+ * It will produce the output:</p>
+ * <pre>
+ * {
+ * sourceCode: "print 'Hello '\n + 'World';",
+ * // 1 2
+ * // 012345678901234 5678901234567
+ * spans: [0, #1, 6, #2, 14, #3, 15, #4]
+ * }
+ * </pre>
+ * <p>
+ * where #1 is a reference to the {@code "print "} text node above, and so
+ * on for the other text nodes.
+ * </p>
+ *
+ * <p>
+ * The {@code} spans array is an array of pairs. Even elements are the start
+ * indices of substrings, and odd elements are the text nodes (or BR elements)
+ * that contain the text for those substrings.
+ * Substrings continue until the next index or the end of the source.
+ * </p>
+ *
+ * @param {Node} node an HTML DOM subtree containing source-code.
+ * @return {Object} source code and the text nodes in which they occur.
+ */
+ function extractSourceSpans(node) {
+ var nocode = /(?:^|\s)nocode(?:\s|$)/;
+
+ var chunks = [];
+ var length = 0;
+ var spans = [];
+ var k = 0;
+
+ var whitespace;
+ if (node.currentStyle) {
+ whitespace = node.currentStyle.whiteSpace;
+ } else if (window.getComputedStyle) {
+ whitespace = document.defaultView.getComputedStyle(node, null)
+ .getPropertyValue('white-space');
}
- return out.join('');
- }
-
- /** returns a function that expand tabs to spaces. This function can be fed
- * successive chunks of text, and will maintain its own internal state to
- * keep track of how tabs are expanded.
- * @return {function (string) : string} a function that takes
- * plain text and return the text with tabs expanded.
- * @private
- */
- function makeTabExpander(tabWidth) {
- var SPACES = ' ';
- var charInLine = 0;
-
- return function (plainText) {
- // walk over each character looking for tabs and newlines.
- // On tabs, expand them. On newlines, reset charInLine.
- // Otherwise increment charInLine
- var out = null;
- var pos = 0;
- for (var i = 0, n = plainText.length; i < n; ++i) {
- var ch = plainText.charAt(i);
-
- switch (ch) {
- case '\t':
- if (!out) { out = []; }
- out.push(plainText.substring(pos, i));
- // calculate how much space we need in front of this part
- // nSpaces is the amount of padding -- the number of spaces needed
- // to move us to the next column, where columns occur at factors of
- // tabWidth.
- var nSpaces = tabWidth - (charInLine % tabWidth);
- charInLine += nSpaces;
- for (; nSpaces >= 0; nSpaces -= SPACES.length) {
- out.push(SPACES.substring(0, nSpaces));
- }
- pos = i + 1;
- break;
- case '\n':
- charInLine = 0;
- break;
- default:
- ++charInLine;
- }
- }
- if (!out) { return plainText; }
- out.push(plainText.substring(pos));
- return out.join('');
- };
- }
-
- var pr_chunkPattern = new RegExp(
- '[^<]+' // A run of characters other than '<'
- + '|<\!--[\\s\\S]*?--\>' // an HTML comment
- + '|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>' // a CDATA section
- // a probable tag that should not be highlighted
- + '|<\/?[a-zA-Z](?:[^>\"\']|\'[^\']*\'|\"[^\"]*\")*>'
- + '|<', // A '<' that does not begin a larger chunk
- 'g');
- var pr_commentPrefix = /^<\!--/;
- var pr_cdataPrefix = /^<!\[CDATA\[/;
- var pr_brPrefix = /^<br\b/i;
- var pr_tagNameRe = /^<(\/?)([a-zA-Z][a-zA-Z0-9]*)/;
-
- /** split markup into chunks of html tags (style null) and
- * plain text (style {@link #PR_PLAIN}), converting tags which are
- * significant for tokenization (<br>) into their textual equivalent.
- *
- * @param {string} s html where whitespace is considered significant.
- * @return {Object} source code and extracted tags.
- * @private
- */
- function extractTags(s) {
- // since the pattern has the 'g' modifier and defines no capturing groups,
- // this will return a list of all chunks which we then classify and wrap as
- // PR_Tokens
- var matches = s.match(pr_chunkPattern);
- var sourceBuf = [];
- var sourceBufLen = 0;
- var extractedTags = [];
- if (matches) {
- for (var i = 0, n = matches.length; i < n; ++i) {
- var match = matches[i];
- if (match.length > 1 && match.charAt(0) === '<') {
- if (pr_commentPrefix.test(match)) { continue; }
- if (pr_cdataPrefix.test(match)) {
- // strip CDATA prefix and suffix. Don't unescape since it's CDATA
- sourceBuf.push(match.substring(9, match.length - 3));
- sourceBufLen += match.length - 12;
- } else if (pr_brPrefix.test(match)) {
- // <br> tags are lexically significant so convert them to text.
- // This is undone later.
- sourceBuf.push('\n');
- ++sourceBufLen;
- } else {
- if (match.indexOf(PR_NOCODE) >= 0 && isNoCodeTag(match)) {
- // A <span class="nocode"> will start a section that should be
- // ignored. Continue walking the list until we see a matching end
- // tag.
- var name = match.match(pr_tagNameRe)[2];
- var depth = 1;
- var j;
- end_tag_loop:
- for (j = i + 1; j < n; ++j) {
- var name2 = matches[j].match(pr_tagNameRe);
- if (name2 && name2[2] === name) {
- if (name2[1] === '/') {
- if (--depth === 0) { break end_tag_loop; }
- } else {
- ++depth;
- }
- }
- }
- if (j < n) {
- extractedTags.push(
- sourceBufLen, matches.slice(i, j + 1).join(''));
- i = j;
- } else { // Ignore unclosed sections.
- extractedTags.push(sourceBufLen, match);
- }
+ var isPreformatted = whitespace && 'pre' === whitespace.substring(0, 3);
+
+ function walk(node) {
+ switch (node.nodeType) {
+ case 1: // Element
+ if (nocode.test(node.className)) { return; }
+ for (var child = node.firstChild; child; child = child.nextSibling) {
+ walk(child);
+ }
+ var nodeName = node.nodeName;
+ if ('BR' === nodeName || 'LI' === nodeName) {
+ chunks[k] = '\n';
+ spans[k << 1] = length++;
+ spans[(k++ << 1) | 1] = node;
+ }
+ break;
+ case 3: case 4: // Text
+ var text = node.nodeValue;
+ if (text.length) {
+ if (!isPreformatted) {
+ text = text.replace(/[ \t\r\n]+/g, ' ');
} else {
- extractedTags.push(sourceBufLen, match);
+ text = text.replace(/\r\n?/g, '\n'); // Normalize newlines.
}
+ // TODO: handle tabs here?
+ chunks[k] = text;
+ spans[k << 1] = length;
+ length += text.length;
+ spans[(k++ << 1) | 1] = node;
}
- } else {
- var literalText = htmlToText(match);
- sourceBuf.push(literalText);
- sourceBufLen += literalText.length;
- }
+ break;
}
}
- return { source: sourceBuf.join(''), tags: extractedTags };
+
+ walk(node);
+
+ return {
+ sourceCode: chunks.join('').replace(/\n$/, ''),
+ spans: spans
+ };
}
- /** True if the given tag contains a class attribute with the nocode class. */
- function isNoCodeTag(tag) {
- return !!tag
- // First canonicalize the representation of attributes
- .replace(/\s(\w+)\s*=\s*(?:\"([^\"]*)\"|'([^\']*)'|(\S+))/g,
- ' $1="$2$3$4"')
- // Then look for the attribute we want.
- .match(/[cC][lL][aA][sS][sS]=\"[^\"]*\bnocode\b/);
- }
/**
* Apply the given language handler to sourceCode and add the resulting
@@ -753,13 +557,39 @@ window['_pr_isIE6'] = function () {
function appendDecorations(basePos, sourceCode, langHandler, out) {
if (!sourceCode) { return; }
var job = {
- source: sourceCode,
+ sourceCode: sourceCode,
basePos: basePos
};
langHandler(job);
out.push.apply(out, job.decorations);
}
+ var notWs = /\S/;
+
+ /**
+ * Given an element, if it contains only one child element and any text nodes
+ * it contains contain only space characters, return the sole child element.
+ * Otherwise returns undefined.
+ * <p>
+ * This is meant to return the CODE element in {@code <pre><code ...>} when
+ * there is a single child element that contains all the non-space textual
+ * content, but not to return anything where there are multiple child elements
+ * as in {@code <pre><code>...</code><code>...</code></pre>} or when there
+ * is textual content.
+ */
+ function childContentWrapper(element) {
+ var wrapper = undefined;
+ for (var c = element.firstChild; c; c = c.nextSibling) {
+ var type = c.nodeType;
+ wrapper = (type === 1) // Element Node
+ ? (wrapper ? element : c)
+ : (type === 3) // Text Node
+ ? (notWs.test(c.nodeValue) ? element : wrapper)
+ : wrapper;
+ }
+ return wrapper === element ? undefined : wrapper;
+ }
+
/** Given triples of [style, pattern, context] returns a lexing function,
* The lexing function interprets the patterns to find token boundaries and
* returns a decoration list of the form
@@ -833,21 +663,20 @@ window['_pr_isIE6'] = function () {
})();
var nPatterns = fallthroughStylePatterns.length;
- var notWs = /\S/;
/**
- * Lexes job.source and produces an output array job.decorations of style
- * classes preceded by the position at which they start in job.source in
- * order.
+ * Lexes job.sourceCode and produces an output array job.decorations of
+ * style classes preceded by the position at which they start in
+ * job.sourceCode in order.
*
- * @param {Object} job an object like {@code
- * source: {string} sourceText plain text,
- * basePos: {int} position of job.source in the larger chunk of
+ * @param {Object} job an object like <pre>{
+ * sourceCode: {string} sourceText plain text,
+ * basePos: {int} position of job.sourceCode in the larger chunk of
* sourceCode.
- * }
+ * }</pre>
*/
var decorate = function (job) {
- var sourceCode = job.source, basePos = job.basePos;
+ var sourceCode = job.sourceCode, basePos = job.basePos;
/** Even entries are positions in source in ascending order. Odd enties
* are style markers (e.g., PR_COMMENT) that run from that position until
* the end.
@@ -974,12 +803,18 @@ window['_pr_isIE6'] = function () {
fallthroughStylePatterns.push(
[PR_STRING, /^@\"(?:[^\"]|\"\")*(?:\"|$)/, null]);
}
- if (options['hashComments']) {
+ var hc = options['hashComments'];
+ if (hc) {
if (options['cStyleComments']) {
- // Stop C preprocessor declarations at an unclosed open comment
- shortcutStylePatterns.push(
- [PR_COMMENT, /^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,
- null, '#']);
+ if (hc > 1) { // multiline hash comments
+ shortcutStylePatterns.push(
+ [PR_COMMENT, /^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/, null, '#']);
+ } else {
+ // Stop C preprocessor declarations at an unclosed open comment
+ shortcutStylePatterns.push(
+ [PR_COMMENT, /^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,
+ null, '#']);
+ }
fallthroughStylePatterns.push(
[PR_STRING,
/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,
@@ -994,6 +829,9 @@ window['_pr_isIE6'] = function () {
[PR_COMMENT, /^\/\*[\s\S]*?(?:\*\/|$)/, null]);
}
if (options['regexLiterals']) {
+ /**
+ * @const
+ */
var REGEX_LITERAL = (
// A regular expression literal starts with a slash that is
// not followed by * or / so that it is not confused with
@@ -1013,18 +851,24 @@ window['_pr_isIE6'] = function () {
]);
}
- var keywords = options['keywords'].replace(/^\s+|\s+$/g, '');
+ var types = options['types'];
+ if (types) {
+ fallthroughStylePatterns.push([PR_TYPE, types]);
+ }
+
+ var keywords = ("" + options['keywords']).replace(/^ | $/g, '');
if (keywords.length) {
fallthroughStylePatterns.push(
[PR_KEYWORD,
- new RegExp('^(?:' + keywords.replace(/\s+/g, '|') + ')\\b'), null]);
+ new RegExp('^(?:' + keywords.replace(/[\s,]+/g, '|') + ')\\b'),
+ null]);
}
shortcutStylePatterns.push([PR_PLAIN, /^\s+/, null, ' \r\n\t\xA0']);
fallthroughStylePatterns.push(
// TODO(mikesamuel): recognize non-latin letters and numerals in idents
[PR_LITERAL, /^@[a-z_$][a-z_$@0-9]*/i, null],
- [PR_TYPE, /^@?[A-Z]+[a-z][A-Za-z_$@0-9]*/, null],
+ [PR_TYPE, /^(?:[@_]?[A-Z]+[a-z][A-Za-z_$@0-9]*|\w+_t\b)/, null],
[PR_PLAIN, /^[a-z_$][a-z_$@0-9]*/i, null],
[PR_LITERAL,
new RegExp(
@@ -1039,7 +883,9 @@ window['_pr_isIE6'] = function () {
// with an optional modifier like UL for unsigned long
+ '[a-z]*', 'i'),
null, '0123456789'],
- [PR_PUNCTUATION, /^.[^\s\w\.$@\'\"\`\/\#]*/, null]);
+ // Don't treat escaped quotes in bash as starting strings. See issue 144.
+ [PR_PLAIN, /^\\[\s\S]?/, null],
+ [PR_PUNCTUATION, /^.[^\s\w\.$@\'\"\`\/\#\\]*/, null]);
return createSimpleLexer(shortcutStylePatterns, fallthroughStylePatterns);
}
@@ -1052,159 +898,264 @@ window['_pr_isIE6'] = function () {
'regexLiterals': true
});
- /** Breaks {@code job.source} around style boundaries in
- * {@code job.decorations} while re-interleaving {@code job.extractedTags},
- * and leaves the result in {@code job.prettyPrintedHtml}.
- * @param {Object} job like {
- * source: {string} source as plain text,
- * extractedTags: {Array.<number|string>} extractedTags chunks of raw
- * html preceded by their position in {@code job.source}
- * in order
- * decorations: {Array.<number|string} an array of style classes preceded
- * by the position at which they start in job.source in order
- * }
- * @private
- */
- function recombineTagsAndDecorations(job) {
- var sourceText = job.source;
- var extractedTags = job.extractedTags;
- var decorations = job.decorations;
-
- var html = [];
- // index past the last char in sourceText written to html
- var outputIdx = 0;
-
- var openDecoration = null;
- var currentDecoration = null;
- var tagPos = 0; // index into extractedTags
- var decPos = 0; // index into decorations
- var tabExpander = makeTabExpander(window['PR_TAB_WIDTH']);
-
- var adjacentSpaceRe = /([\r\n ]) /g;
- var startOrSpaceRe = /(^| ) /gm;
- var newlineRe = /\r\n?|\n/g;
- var trailingSpaceRe = /[ \r\n]$/;
- var lastWasSpace = true; // the last text chunk emitted ended with a space.
-
- // See bug 71 and http://stackoverflow.com/questions/136443/why-doesnt-ie7-
- var isIE678 = window['_pr_isIE6']();
- var lineBreakHtml = (
- isIE678
- ? (job.sourceNode.tagName === 'PRE'
- // Use line feeds instead of <br>s so that copying and pasting works
- // on IE.
- // Doing this on other browsers breaks lots of stuff since \r\n is
- // treated as two newlines on Firefox.
- ? (isIE678 === 6 ? '&#160;\r\n' :
- isIE678 === 7 ? '&#160;<br>\r' : '&#160;\r')
- // IE collapses multiple adjacent <br>s into 1 line break.
- // Prefix every newline with '&#160;' to prevent such behavior.
- // &nbsp; is the same as &#160; but works in XML as well as HTML.
- : '&#160;<br />')
- : '<br />');
-
- // Look for a class like linenums or linenums:<n> where <n> is the 1-indexed
- // number of the first line.
- var numberLines = job.sourceNode.className.match(/\blinenums\b(?::(\d+))?/);
- var lineBreaker;
- if (numberLines) {
- var lineBreaks = [];
- for (var i = 0; i < 10; ++i) {
- lineBreaks[i] = lineBreakHtml + '</li><li class="L' + i + '">';
- }
- var lineNum = numberLines[1] && numberLines[1].length
- ? numberLines[1] - 1 : 0; // Lines are 1-indexed
- html.push('<ol class="linenums"><li class="L', (lineNum) % 10, '"');
- if (lineNum) {
- html.push(' value="', lineNum + 1, '"');
+ /**
+ * Given a DOM subtree, wraps it in a list, and puts each line into its own
+ * list item.
+ *
+ * @param {Node} node modified in place. Its content is pulled into an
+ * HTMLOListElement, and each line is moved into a separate list item.
+ * This requires cloning elements, so the input might not have unique
+ * IDs after numbering.
+ */
+ function numberLines(node, opt_startLineNum) {
+ var nocode = /(?:^|\s)nocode(?:\s|$)/;
+ var lineBreak = /\r\n?|\n/;
+
+ var document = node.ownerDocument;
+
+ var whitespace;
+ if (node.currentStyle) {
+ whitespace = node.currentStyle.whiteSpace;
+ } else if (window.getComputedStyle) {
+ whitespace = document.defaultView.getComputedStyle(node, null)
+ .getPropertyValue('white-space');
+ }
+ // If it's preformatted, then we need to split lines on line breaks
+ // in addition to <BR>s.
+ var isPreformatted = whitespace && 'pre' === whitespace.substring(0, 3);
+
+ var li = document.createElement('LI');
+ while (node.firstChild) {
+ li.appendChild(node.firstChild);
+ }
+ // An array of lines. We split below, so this is initialized to one
+ // un-split line.
+ var listItems = [li];
+
+ function walk(node) {
+ switch (node.nodeType) {
+ case 1: // Element
+ if (nocode.test(node.className)) { break; }
+ if ('BR' === node.nodeName) {
+ breakAfter(node);
+ // Discard the <BR> since it is now flush against a </LI>.
+ if (node.parentNode) {
+ node.parentNode.removeChild(node);
+ }
+ } else {
+ for (var child = node.firstChild; child; child = child.nextSibling) {
+ walk(child);
+ }
+ }
+ break;
+ case 3: case 4: // Text
+ if (isPreformatted) {
+ var text = node.nodeValue;
+ var match = text.match(lineBreak);
+ if (match) {
+ var firstLine = text.substring(0, match.index);
+ node.nodeValue = firstLine;
+ var tail = text.substring(match.index + match[0].length);
+ if (tail) {
+ var parent = node.parentNode;
+ parent.insertBefore(
+ document.createTextNode(tail), node.nextSibling);
+ }
+ breakAfter(node);
+ if (!firstLine) {
+ // Don't leave blank text nodes in the DOM.
+ node.parentNode.removeChild(node);
+ }
+ }
+ }
+ break;
}
- html.push('>');
- lineBreaker = function () {
- var lb = lineBreaks[++lineNum % 10];
- // If a decoration is open, we need to close it before closing a list-item
- // and reopen it on the other side of the list item.
- return openDecoration
- ? ('</span>' + lb + '<span class="' + openDecoration + '">') : lb;
- };
- } else {
- lineBreaker = lineBreakHtml;
}
-
- // A helper function that is responsible for opening sections of decoration
- // and outputing properly escaped chunks of source
- function emitTextUpTo(sourceIdx) {
- if (sourceIdx > outputIdx) {
- if (openDecoration && openDecoration !== currentDecoration) {
- // Close the current decoration
- html.push('</span>');
- openDecoration = null;
- }
- if (!openDecoration && currentDecoration) {
- openDecoration = currentDecoration;
- html.push('<span class="', openDecoration, '">');
+
+ // Split a line after the given node.
+ function breakAfter(lineEndNode) {
+ // If there's nothing to the right, then we can skip ending the line
+ // here, and move root-wards since splitting just before an end-tag
+ // would require us to create a bunch of empty copies.
+ while (!lineEndNode.nextSibling) {
+ lineEndNode = lineEndNode.parentNode;
+ if (!lineEndNode) { return; }
+ }
+
+ function breakLeftOf(limit, copy) {
+ // Clone shallowly if this node needs to be on both sides of the break.
+ var rightSide = copy ? limit.cloneNode(false) : limit;
+ var parent = limit.parentNode;
+ if (parent) {
+ // We clone the parent chain.
+ // This helps us resurrect important styling elements that cross lines.
+ // E.g. in <i>Foo<br>Bar</i>
+ // should be rewritten to <li><i>Foo</i></li><li><i>Bar</i></li>.
+ var parentClone = breakLeftOf(parent, 1);
+ // Move the clone and everything to the right of the original
+ // onto the cloned parent.
+ var next = limit.nextSibling;
+ parentClone.appendChild(rightSide);
+ for (var sibling = next; sibling; sibling = next) {
+ next = sibling.nextSibling;
+ parentClone.appendChild(sibling);
+ }
}
- // This interacts badly with some wikis which introduces paragraph tags
- // into pre blocks for some strange reason.
- // It's necessary for IE though which seems to lose the preformattedness
- // of <pre> tags when their innerHTML is assigned.
- // http://stud3.tuwien.ac.at/~e0226430/innerHtmlQuirk.html
- // and it serves to undo the conversion of <br>s to newlines done in
- // chunkify.
- var htmlChunk = textToHtml(
- tabExpander(sourceText.substring(outputIdx, sourceIdx)))
- .replace(lastWasSpace
- ? startOrSpaceRe
- : adjacentSpaceRe, '$1&#160;');
- // Keep track of whether we need to escape space at the beginning of the
- // next chunk.
- lastWasSpace = trailingSpaceRe.test(htmlChunk);
- html.push(htmlChunk.replace(newlineRe, lineBreaker));
- outputIdx = sourceIdx;
+ return rightSide;
}
+
+ var copiedListItem = breakLeftOf(lineEndNode.nextSibling, 0);
+
+ // Walk the parent chain until we reach an unattached LI.
+ for (var parent;
+ // Check nodeType since IE invents document fragments.
+ (parent = copiedListItem.parentNode) && parent.nodeType === 1;) {
+ copiedListItem = parent;
+ }
+ // Put it on the list of lines for later processing.
+ listItems.push(copiedListItem);
+ }
+
+ // Split lines while there are lines left to split.
+ for (var i = 0; // Number of lines that have been split so far.
+ i < listItems.length; // length updated by breakAfter calls.
+ ++i) {
+ walk(listItems[i]);
}
+
+ // Make sure numeric indices show correctly.
+ if (opt_startLineNum === (opt_startLineNum|0)) {
+ listItems[0].setAttribute('value', opt_startLineNum);
+ }
+
+ var ol = document.createElement('OL');
+ ol.className = 'linenums';
+ var offset = Math.max(0, ((opt_startLineNum - 1 /* zero index */)) | 0) || 0;
+ for (var i = 0, n = listItems.length; i < n; ++i) {
+ li = listItems[i];
+ // Stick a class on the LIs so that stylesheets can
+ // color odd/even rows, or any other row pattern that
+ // is co-prime with 10.
+ li.className = 'L' + ((i + offset) % 10);
+ if (!li.firstChild) {
+ li.appendChild(document.createTextNode('\xA0'));
+ }
+ ol.appendChild(li);
+ }
+
+ node.appendChild(ol);
+ }
- while (true) {
- // Determine if we're going to consume a tag this time around. Otherwise
- // we consume a decoration or exit.
- var outputTag;
- if (tagPos < extractedTags.length) {
- if (decPos < decorations.length) {
- // Pick one giving preference to extractedTags since we shouldn't open
- // a new style that we're going to have to immediately close in order
- // to output a tag.
- outputTag = extractedTags[tagPos] <= decorations[decPos];
- } else {
- outputTag = true;
- }
+ /**
+ * Breaks {@code job.sourceCode} around style boundaries in
+ * {@code job.decorations} and modifies {@code job.sourceNode} in place.
+ * @param {Object} job like <pre>{
+ * sourceCode: {string} source as plain text,
+ * spans: {Array.<number|Node>} alternating span start indices into source
+ * and the text node or element (e.g. {@code <BR>}) corresponding to that
+ * span.
+ * decorations: {Array.<number|string} an array of style classes preceded
+ * by the position at which they start in job.sourceCode in order
+ * }</pre>
+ * @private
+ */
+ function recombineTagsAndDecorations(job) {
+ var isIE = /\bMSIE\b/.test(navigator.userAgent);
+ var newlineRe = /\n/g;
+
+ var source = job.sourceCode;
+ var sourceLength = source.length;
+ // Index into source after the last code-unit recombined.
+ var sourceIndex = 0;
+
+ var spans = job.spans;
+ var nSpans = spans.length;
+ // Index into spans after the last span which ends at or before sourceIndex.
+ var spanIndex = 0;
+
+ var decorations = job.decorations;
+ var nDecorations = decorations.length;
+ // Index into decorations after the last decoration which ends at or before
+ // sourceIndex.
+ var decorationIndex = 0;
+
+ // Remove all zero-length decorations.
+ decorations[nDecorations] = sourceLength;
+ var decPos, i;
+ for (i = decPos = 0; i < nDecorations;) {
+ if (decorations[i] !== decorations[i + 2]) {
+ decorations[decPos++] = decorations[i++];
+ decorations[decPos++] = decorations[i++];
} else {
- outputTag = false;
+ i += 2;
}
- // Consume either a decoration or a tag or exit.
- if (outputTag) {
- emitTextUpTo(extractedTags[tagPos]);
- if (openDecoration) {
- // Close the current decoration
- html.push('</span>');
- openDecoration = null;
- }
- html.push(extractedTags[tagPos + 1]);
- tagPos += 2;
- } else if (decPos < decorations.length) {
- emitTextUpTo(decorations[decPos]);
- currentDecoration = decorations[decPos + 1];
- decPos += 2;
- } else {
- break;
+ }
+ nDecorations = decPos;
+
+ // Simplify decorations.
+ for (i = decPos = 0; i < nDecorations;) {
+ var startPos = decorations[i];
+ // Conflate all adjacent decorations that use the same style.
+ var startDec = decorations[i + 1];
+ var end = i + 2;
+ while (end + 2 <= nDecorations && decorations[end + 1] === startDec) {
+ end += 2;
}
+ decorations[decPos++] = startPos;
+ decorations[decPos++] = startDec;
+ i = end;
}
- emitTextUpTo(sourceText.length);
- if (openDecoration) {
- html.push('</span>');
+
+ nDecorations = decorations.length = decPos;
+
+ var decoration = null;
+ while (spanIndex < nSpans) {
+ var spanStart = spans[spanIndex];
+ var spanEnd = spans[spanIndex + 2] || sourceLength;
+
+ var decStart = decorations[decorationIndex];
+ var decEnd = decorations[decorationIndex + 2] || sourceLength;
+
+ var end = Math.min(spanEnd, decEnd);
+
+ var textNode = spans[spanIndex + 1];
+ var styledText;
+ if (textNode.nodeType !== 1 // Don't muck with <BR>s or <LI>s
+ // Don't introduce spans around empty text nodes.
+ && (styledText = source.substring(sourceIndex, end))) {
+ // This may seem bizarre, and it is. Emitting LF on IE causes the
+ // code to display with spaces instead of line breaks.
+ // Emitting Windows standard issue linebreaks (CRLF) causes a blank
+ // space to appear at the beginning of every line but the first.
+ // Emitting an old Mac OS 9 line separator makes everything spiffy.
+ if (isIE) { styledText = styledText.replace(newlineRe, '\r'); }
+ textNode.nodeValue = styledText;
+ var document = textNode.ownerDocument;
+ var span = document.createElement('SPAN');
+ span.className = decorations[decorationIndex + 1];
+ var parentNode = textNode.parentNode;
+ parentNode.replaceChild(span, textNode);
+ span.appendChild(textNode);
+ if (sourceIndex < spanEnd) { // Split off a text node.
+ spans[spanIndex + 1] = textNode
+ // TODO: Possibly optimize by using '' if there's no flicker.
+ = document.createTextNode(source.substring(end, spanEnd));
+ parentNode.insertBefore(textNode, span.nextSibling);
+ }
+ }
+
+ sourceIndex = end;
+
+ if (sourceIndex >= spanEnd) {
+ spanIndex += 2;
+ }
+ if (sourceIndex >= decEnd) {
+ decorationIndex += 2;
+ }
}
- if (numberLines) { html.push('</li></ol>'); }
- job.prettyPrintedHtml = html.join('');
}
+
/** Maps language-specific file extensions to handlers. */
var langHandlerRegistry = {};
/** Register a language handler for the given file extensions.
@@ -1212,10 +1163,10 @@ window['_pr_isIE6'] = function () {
* of decorations. Takes a single argument job which describes the
* state of the computation. The single parameter has the form
* {@code {
- * source: {string} as plain text.
+ * sourceCode: {string} as plain text.
* decorations: {Array.<number|string>} an array of style classes
* preceded by the position at which they start in
- * job.source in order.
+ * job.sourceCode in order.
* The language handler should assigned this field.
* basePos: {int} the position of source in the larger source chunk.
* All positions in the output decorations array are relative
@@ -1228,7 +1179,7 @@ window['_pr_isIE6'] = function () {
var ext = fileExtensions[i];
if (!langHandlerRegistry.hasOwnProperty(ext)) {
langHandlerRegistry[ext] = handler;
- } else if ('console' in window) {
+ } else if (window['console']) {
console['warn']('cannot override language handler %s', ext);
}
}
@@ -1287,16 +1238,18 @@ window['_pr_isIE6'] = function () {
registerLangHandler(sourceDecorator({
'keywords': CPP_KEYWORDS,
'hashComments': true,
- 'cStyleComments': true
+ 'cStyleComments': true,
+ 'types': C_TYPES
}), ['c', 'cc', 'cpp', 'cxx', 'cyc', 'm']);
registerLangHandler(sourceDecorator({
- 'keywords': 'null true false'
+ 'keywords': 'null,true,false'
}), ['json']);
registerLangHandler(sourceDecorator({
'keywords': CSHARP_KEYWORDS,
'hashComments': true,
'cStyleComments': true,
- 'verbatimStrings': true
+ 'verbatimStrings': true,
+ 'types': C_TYPES
}), ['cs']);
registerLangHandler(sourceDecorator({
'keywords': JAVA_KEYWORDS,
@@ -1330,34 +1283,33 @@ window['_pr_isIE6'] = function () {
'cStyleComments': true,
'regexLiterals': true
}), ['js']);
- registerLangHandler(
- createSimpleLexer([], [[PR_STRING, /^[\s\S]+/]]), ['regex']);
+ registerLangHandler(sourceDecorator({
+ 'keywords': COFFEE_KEYWORDS,
+ 'hashComments': 3, // ### style block comments
+ 'cStyleComments': true,
+ 'multilineStrings': true,
+ 'tripleQuotedStrings': true,
+ 'regexLiterals': true
+ }), ['coffee']);
+ registerLangHandler(createSimpleLexer([], [[PR_STRING, /^[\s\S]+/]]), ['regex']);
function applyDecorator(job) {
- var sourceCodeHtml = job.sourceCodeHtml;
var opt_langExtension = job.langExtension;
- // Prepopulate output in case processing fails with an exception.
- job.prettyPrintedHtml = sourceCodeHtml;
-
try {
// Extract tags, and convert the source code to plain text.
- var sourceAndExtractedTags = extractTags(sourceCodeHtml);
+ var sourceAndSpans = extractSourceSpans(job.sourceNode);
/** Plain text. @type {string} */
- var source = sourceAndExtractedTags.source;
- job.source = source;
+ var source = sourceAndSpans.sourceCode;
+ job.sourceCode = source;
+ job.spans = sourceAndSpans.spans;
job.basePos = 0;
- /** Even entries are positions in source in ascending order. Odd entries
- * are tags that were extracted at that position.
- * @type {Array.<number|string>}
- */
- job.extractedTags = sourceAndExtractedTags.tags;
-
// Apply the appropriate language handler
langHandlerForExtension(opt_langExtension, source)(job);
- // Integrate the decorations and tags back into the source code to produce
- // a decorated html string which is left in job.prettyPrintedHtml.
+
+ // Integrate the decorations and tags back into the source code,
+ // modifying the sourceNode in place.
recombineTagsAndDecorations(job);
} catch (e) {
if ('console' in window) {
@@ -1366,13 +1318,30 @@ window['_pr_isIE6'] = function () {
}
}
- function prettyPrintOne(sourceCodeHtml, opt_langExtension) {
+ /**
+ * @param sourceCodeHtml {string} The HTML to pretty print.
+ * @param opt_langExtension {string} The language name to use.
+ * Typically, a filename extension like 'cpp' or 'java'.
+ * @param opt_numberLines {number|boolean} True to number lines,
+ * or the 1-indexed number of the first line in sourceCodeHtml.
+ */
+ function prettyPrintOne(sourceCodeHtml, opt_langExtension, opt_numberLines) {
+ var container = document.createElement('PRE');
+ // This could cause images to load and onload listeners to fire.
+ // E.g. <img onerror="alert(1337)" src="nosuchimage.png">.
+ // We assume that the inner HTML is from a trusted source.
+ container.innerHTML = sourceCodeHtml;
+ if (opt_numberLines) {
+ numberLines(container, opt_numberLines);
+ }
+
var job = {
- sourceCodeHtml: sourceCodeHtml,
- langExtension: opt_langExtension
+ langExtension: opt_langExtension,
+ numberLines: opt_numberLines,
+ sourceNode: container
};
applyDecorator(job);
- return job.prettyPrintedHtml;
+ return container.innerHTML;
}
function prettyPrint(opt_whenDone) {
@@ -1389,7 +1358,7 @@ window['_pr_isIE6'] = function () {
var clock = Date;
if (!clock['now']) {
- clock = { 'now': function () { return (new Date).getTime(); } };
+ clock = { 'now': function () { return +(new Date); } };
}
// The loop is broken into a series of continuations to make sure that we
@@ -1397,20 +1366,36 @@ window['_pr_isIE6'] = function () {
var k = 0;
var prettyPrintingJob;
+ var langExtensionRe = /\blang(?:uage)?-([\w.]+)(?!\S)/;
+ var prettyPrintRe = /\bprettyprint\b/;
+
function doWork() {
var endTime = (window['PR_SHOULD_USE_CONTINUATION'] ?
- clock.now() + 250 /* ms */ :
+ clock['now']() + 250 /* ms */ :
Infinity);
- for (; k < elements.length && clock.now() < endTime; k++) {
+ for (; k < elements.length && clock['now']() < endTime; k++) {
var cs = elements[k];
- if (cs.className && cs.className.indexOf('prettyprint') >= 0) {
+ var className = cs.className;
+ if (className.indexOf('prettyprint') >= 0) {
// If the classes includes a language extensions, use it.
// Language extensions can be specified like
// <pre class="prettyprint lang-cpp">
// the language extension "cpp" is used to find a language handler as
- // passed to PR_registerLangHandler.
- var langExtension = cs.className.match(/\blang-(\w+)\b/);
- if (langExtension) { langExtension = langExtension[1]; }
+ // passed to PR.registerLangHandler.
+ // HTML5 recommends that a language be specified using "language-"
+ // as the prefix instead. Google Code Prettify supports both.
+ // http://dev.w3.org/html5/spec-author-view/the-code-element.html
+ var langExtension = className.match(langExtensionRe);
+ // Support <pre class="prettyprint"><code class="language-c">
+ var wrapper;
+ if (!langExtension && (wrapper = childContentWrapper(cs))
+ && "CODE" === wrapper.tagName) {
+ langExtension = wrapper.className.match(langExtensionRe);
+ }
+
+ if (langExtension) {
+ langExtension = langExtension[1];
+ }
// make sure this is not nested in an already prettified element
var nested = false;
@@ -1423,19 +1408,21 @@ window['_pr_isIE6'] = function () {
}
}
if (!nested) {
- // fetch the content as a snippet of properly escaped HTML.
- // Firefox adds newlines at the end.
- var content = getInnerHtml(cs);
- content = content.replace(/(?:\r\n?|\n)$/, '');
+ // Look for a class like linenums or linenums:<n> where <n> is the
+ // 1-indexed number of the first line.
+ var lineNums = cs.className.match(/\blinenums\b(?::(\d+))?/);
+ lineNums = lineNums
+ ? lineNums[1] && lineNums[1].length ? +lineNums[1] : true
+ : false;
+ if (lineNums) { numberLines(cs, lineNums); }
// do the pretty printing
prettyPrintingJob = {
- sourceCodeHtml: content,
langExtension: langExtension,
- sourceNode: cs
+ sourceNode: cs,
+ numberLines: lineNums
};
applyDecorator(prettyPrintingJob);
- replaceWithPrettyPrintedHtml();
}
}
}
@@ -1447,47 +1434,29 @@ window['_pr_isIE6'] = function () {
}
}
- function replaceWithPrettyPrintedHtml() {
- var newContent = prettyPrintingJob.prettyPrintedHtml;
- if (!newContent) { return; }
- var cs = prettyPrintingJob.sourceNode;
-
- // push the prettified html back into the tag.
- if (!isRawContent(cs)) {
- // just replace the old html with the new
- cs.innerHTML = newContent;
- } else {
- // we need to change the tag to a <pre> since <xmp>s do not allow
- // embedded tags such as the span tags used to attach styles to
- // sections of source code.
- var pre = document.createElement('PRE');
- for (var i = 0; i < cs.attributes.length; ++i) {
- var a = cs.attributes[i];
- if (a.specified) {
- var aname = a.name.toLowerCase();
- if (aname === 'class') {
- pre.className = a.value; // For IE 6
- } else {
- pre.setAttribute(a.name, a.value);
- }
- }
- }
- pre.innerHTML = newContent;
-
- // remove the old
- cs.parentNode.replaceChild(pre, cs);
- cs = pre;
- }
- }
-
doWork();
}
- window['PR_normalizedHtml'] = normalizedHtml;
+ /**
+ * Find all the {@code <pre>} and {@code <code>} tags in the DOM with
+ * {@code class=prettyprint} and prettify them.
+ *
+ * @param {Function?} opt_whenDone if specified, called when the last entry
+ * has been finished.
+ */
window['prettyPrintOne'] = prettyPrintOne;
+ /**
+ * Pretty print a chunk of code.
+ *
+ * @param {string} sourceCodeHtml code as html
+ * @return {string} code as html, but prettier
+ */
window['prettyPrint'] = prettyPrint;
+ /**
+ * Contains functions for creating and registering new language handlers.
+ * @type {Object}
+ */
window['PR'] = {
- 'combinePrefixPatterns': combinePrefixPatterns,
'createSimpleLexer': createSimpleLexer,
'registerLangHandler': registerLangHandler,
'sourceDecorator': sourceDecorator,
diff --git a/media/prettify-20110601/styles/demo.html b/media/prettify-20110601/styles/demo.html
new file mode 100644
index 0000000..9c9acad
--- /dev/null
+++ b/media/prettify-20110601/styles/demo.html
@@ -0,0 +1,61 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html><head>
+<script src="../src/prettify.js"></script>
+<script src="../src/lang-css.js"></script>
+<style>
+body { margin: 0; padding: 0 }
+pre { margin: 0 }
+</style>
+</head>
+<script>
+// This page displays some code styled using a theme named in the
+// query part of the URL.
+var themeName = decodeURIComponent(document.location.search.replace(/^\?/, ''));
+
+// Call out to the parent so that it can resize the iframe once this
+// document's body is loaded.
+function adjustHeightInParent() {
+ if (parent !== window) {
+ try {
+ var div = document.body.getElementsByTagName('div')[0];
+ parent.adjustChildIframeSize(
+ themeName, div.offsetWidth, div.offsetHeight);
+ } catch (ex) {
+ // Can happen when this page is opened in its own tab.
+ }
+ }
+}
+
+// Load the necessary CSS
+(function () {
+ document.title = 'Theme ' + themeName;
+ // Load the stylesheet that we're demoing.
+ var link = document.createElement('link');
+ link.rel = 'stylesheet';
+ link.type = 'text/css';
+ link.href = themeName === 'default'
+ ? '../src/prettify.css' : themeName + '.css';
+ document.getElementsByTagName('head')[0].appendChild(link);
+})();
+</script>
+
+<body onload="prettyPrint(); adjustHeightInParent()">
+<div style="width: 40em; display: inline-block">
+<pre class="prettyprint lang-html linenums">
+&lt;script type="text/javascript"&gt;
+// Say hello world until the user starts questioning
+// the meaningfulness of their existence.
+function helloWorld(world) {
+ for (var i = 42; --i &gt;= 0;) {
+ alert('Hello ' + String(world));
+ }
+}
+&lt;/script&gt;
+&lt;style&gt;
+p { color: pink }
+b { color: blue }
+u { color: "umber" }
+&lt;/style&gt;
+</pre>
+</div>
+</body></html>
diff --git a/media/prettify-20110601/styles/desert.css b/media/prettify-20110601/styles/desert.css
new file mode 100644
index 0000000..f6ba40d
--- /dev/null
+++ b/media/prettify-20110601/styles/desert.css
@@ -0,0 +1,34 @@
+/* desert scheme ported from vim to google prettify */
+pre { display: block; background-color: #333 }
+pre .nocode { background-color: none; color: #000 }
+pre .str { color: #ffa0a0 } /* string - pink */
+pre .kwd { color: #f0e68c; font-weight: bold }
+pre .com { color: #87ceeb } /* comment - skyblue */
+pre .typ { color: #98fb98 } /* type - lightgreen */
+pre .lit { color: #cd5c5c } /* literal - darkred */
+pre .pun { color: #fff } /* punctuation */
+pre .pln { color: #fff } /* plaintext */
+pre .tag { color: #f0e68c; font-weight: bold } /* html/xml tag - lightyellow */
+pre .atn { color: #bdb76b; font-weight: bold } /* attribute name - khaki */
+pre .atv { color: #ffa0a0 } /* attribute value - pink */
+pre .dec { color: #98fb98 } /* decimal - lightgreen */
+
+/* Specify class=linenums on a pre to get line numbering */
+ol.linenums { margin-top: 0; margin-bottom: 0; color: #AEAEAE } /* IE indents via margin-left */
+li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8 { list-style-type: none }
+/* Alternate shading for lines */
+li.L1,li.L3,li.L5,li.L7,li.L9 { }
+
+@media print {
+ pre { background-color: none }
+ pre .str, code .str { color: #060 }
+ pre .kwd, code .kwd { color: #006; font-weight: bold }
+ pre .com, code .com { color: #600; font-style: italic }
+ pre .typ, code .typ { color: #404; font-weight: bold }
+ pre .lit, code .lit { color: #044 }
+ pre .pun, code .pun { color: #440 }
+ pre .pln, code .pln { color: #000 }
+ pre .tag, code .tag { color: #006; font-weight: bold }
+ pre .atn, code .atn { color: #404 }
+ pre .atv, code .atv { color: #060 }
+}
diff --git a/media/prettify-20110601/styles/index.html b/media/prettify-20110601/styles/index.html
new file mode 100644
index 0000000..4b35894
--- /dev/null
+++ b/media/prettify-20110601/styles/index.html
@@ -0,0 +1,85 @@
+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html><head>
+<title>Prettify Themes Gallery</title>
+<style type="text/css">
+iframe { width: 100%; border-style: none; margin: 0; padding: 0 }
+</style>
+<script>
+var allThemes = [
+ { name: 'default' },
+ { name: 'desert',
+ authorHtml: '<a href="http://code.google.com/u/@VhJeSlJYBhVMWgF7/">'
+ + 'techto&hellip;@<\/a>' },
+ { name: 'sunburst', authorHtml: 'David Leibovic' },
+];
+
+// Called by the demo.html frames loaded per theme to
+// size the iframes properly and to allow them to tile
+// the page nicely.
+function adjustChildIframeSize(themeName, width, height) {
+ if (typeof console != 'undefined') {
+ try {
+ console.log('adjusting ' + themeName + ' to ' + width + 'x' + height);
+ } catch (ex) {
+ // Don't bother logging log failure.
+ }
+ }
+
+ var container = document.getElementById(themeName).parentNode;
+ container.style.width = (+width + 16) + 'px';
+ container.style.display = 'inline-block';
+ var iframe = container.getElementsByTagName('iframe')[0];
+ iframe.style.height = (+height + 16) + 'px';
+}
+</script>
+</head>
+
+<body>
+<noscript>This page requires JavaScript</noscript>
+
+<h1>Gallery of themes for
+<a href="http://code.google.com/p/google-code-prettify/">code prettify</a></h1>
+<p>
+Click on a theme name for a link to the file in revision control.
+Print preview this page to see how the themes work on the printed page.
+</p>
+<script>(function () {
+ // Produce an iframe per theme.
+ // We pass the threme name to the iframe via its URI query, and
+ // it loads prettify and the theme CSS, and calls back to this page
+ // to resize the iframe.
+ for (var i = 0, n = allThemes.length; i < n; ++i) {
+ var theme = allThemes[i];
+ if (!theme) { continue; }
+ var iframe = document.createElement('iframe');
+ iframe.name = theme.name;
+ iframe.src = 'demo.html?' + encodeURIComponent(theme.name);
+ var header = document.createElement('h2');
+ header.id = theme.name;
+ var linkToThemeSrc = document.createElement('a');
+ linkToThemeSrc.href = (
+ 'http://code.google.com/p/google-code-prettify/source/browse/trunk/' +
+ (theme.name === 'default'
+ ? 'src/prettify.css'
+ : 'styles/' + encodeURIComponent(theme.name) + '.css'));
+ linkToThemeSrc.appendChild(document.createTextNode(
+ theme.name.replace(/\b[a-z]/g, // Capitalize first letter of each word
+ function (letter) { return letter.toUpperCase(); })));
+ header.appendChild(linkToThemeSrc);
+
+ var attribution;
+ if (theme.authorHtml) {
+ attribution = document.createElement('span');
+ attribution.className = 'attribution';
+ attribution.innerHTML = 'by ' + theme.authorHtml;
+ }
+
+ var div = document.createElement('div');
+ div.appendChild(header);
+ if (attribution) { div.appendChild(attribution); }
+ div.appendChild(iframe);
+ document.body.appendChild(div);
+ }
+})()</script>
+
+</body></html>
diff --git a/media/prettify-20110601/styles/sunburst.css b/media/prettify-20110601/styles/sunburst.css
new file mode 100644
index 0000000..011d33e
--- /dev/null
+++ b/media/prettify-20110601/styles/sunburst.css
@@ -0,0 +1,51 @@
+/* Pretty printing styles. Used with prettify.js. */
+/* Vim sunburst theme by David Leibovic */
+
+pre .str, code .str { color: #65B042; } /* string - green */
+pre .kwd, code .kwd { color: #E28964; } /* keyword - dark pink */
+pre .com, code .com { color: #AEAEAE; font-style: italic; } /* comment - gray */
+pre .typ, code .typ { color: #89bdff; } /* type - light blue */
+pre .lit, code .lit { color: #3387CC; } /* literal - blue */
+pre .pun, code .pun { color: #fff; } /* punctuation - white */
+pre .pln, code .pln { color: #fff; } /* plaintext - white */
+pre .tag, code .tag { color: #89bdff; } /* html/xml tag - light blue */
+pre .atn, code .atn { color: #bdb76b; } /* html/xml attribute name - khaki */
+pre .atv, code .atv { color: #65B042; } /* html/xml attribute value - green */
+pre .dec, code .dec { color: #3387CC; } /* decimal - blue */
+
+pre.prettyprint, code.prettyprint {
+ background-color: #000;
+ -moz-border-radius: 8px;
+ -webkit-border-radius: 8px;
+ -o-border-radius: 8px;
+ -ms-border-radius: 8px;
+ -khtml-border-radius: 8px;
+ border-radius: 8px;
+}
+
+pre.prettyprint {
+ width: 95%;
+ margin: 1em auto;
+ padding: 1em;
+ white-space: pre-wrap;
+}
+
+
+/* Specify class=linenums on a pre to get line numbering */
+ol.linenums { margin-top: 0; margin-bottom: 0; color: #AEAEAE; } /* IE indents via margin-left */
+li.L0,li.L1,li.L2,li.L3,li.L5,li.L6,li.L7,li.L8 { list-style-type: none }
+/* Alternate shading for lines */
+li.L1,li.L3,li.L5,li.L7,li.L9 { }
+
+@media print {
+ pre .str, code .str { color: #060; }
+ pre .kwd, code .kwd { color: #006; font-weight: bold; }
+ pre .com, code .com { color: #600; font-style: italic; }
+ pre .typ, code .typ { color: #404; font-weight: bold; }
+ pre .lit, code .lit { color: #044; }
+ pre .pun, code .pun { color: #440; }
+ pre .pln, code .pln { color: #000; }
+ pre .tag, code .tag { color: #006; font-weight: bold; }
+ pre .atn, code .atn { color: #404; }
+ pre .atv, code .atv { color: #060; }
+}
diff --git a/media/prettify-20110601/tests/ie-newline-copy-paste.html b/media/prettify-20110601/tests/ie-newline-copy-paste.html
new file mode 100644
index 0000000..40c9adc
--- /dev/null
+++ b/media/prettify-20110601/tests/ie-newline-copy-paste.html
@@ -0,0 +1,144 @@
+<title>IE Newline Copy/Paste Info Gathering</title>
+
+<body>
+<p>
+I'm trying to squash, <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=20">once</a> and <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=104">for</a> <a href="http://code.google.com/p/google-code-prettify/issues/detail?id=128">all</a>, the problems with newlines in
+<tt>&lt;PRE&gt;</tt>s in IE. I can't run 3 versions of IE, so I'd
+really appreciate any help from people who have IE open and running.
+</p>
+
+<p>
+Please copy from START through END below and paste it into the
+textarea below.
+Then hit Ctrl-A, Ctrl-C to copy the textarea contents, and paste that
+into an email.
+Please also copy and paste the RESULTS section below and include it in
+the email response as well and send it
+to <a href="mailto:mikesamuel@gmail.com">me</a> or respond to the
+discussion list.
+</p>
+
+<p>
+In case you're interested, there are two problems: choosing a way to
+split lines that doesn't introduce too few or extra newlines, and a
+way to make sure that the resulting code can be copy-pasted into a
+plain text editors such as the textarea below. This is my attempt to
+gather information on both issues by IE version.
+</p>
+
+cheers.
+</body>
+
+<script>
+function makeCodeJoiningOn(text, htmlNewline, start, end) {
+ start = start || '';
+ end = end || '';
+ var code = document.createElement('PRE');
+ code.innerHTML = start + ['before', '[' + text + ']', 'after'].join(htmlNewline) + end;
+ code.id = text.replace('+', 'plus').replace(/[^\w\-_]/g, '_');
+ document.body.appendChild(code);
+}
+</script>
+
+<h2>START</h2>
+
+<script>makeCodeJoiningOn('CR', '&#160;\r');</script>
+
+<script>makeCodeJoiningOn('CRLF', '&#160;\r\n');</script>
+
+<script>makeCodeJoiningOn('LFCR', '&#160;\n \r');</script>
+
+<script>makeCodeJoiningOn('LF', '&#160;\n');</script>
+
+<script>makeCodeJoiningOn('VTAB', '&#160;\u000b');</script>
+
+<script>makeCodeJoiningOn('x2028', '&#160;\u2028');</script>
+
+<script>makeCodeJoiningOn('x2029', '&#160;\u2029');</script>
+
+<script>makeCodeJoiningOn('BR', '&#160;<br>');</script>
+
+<script>makeCodeJoiningOn('CR+BR', '&#160;\r<br>');</script>
+
+<script>makeCodeJoiningOn('CRLF+BR', '&#160;\r\n<br>');</script>
+
+<script>makeCodeJoiningOn('LFCR+BR', '&#160;\n\r<br>');</script>
+
+<script>makeCodeJoiningOn('LF+BR', '&#160;\n<br>');</script>
+
+<script>makeCodeJoiningOn('VTAB+BR', '&#160;\u000b<br>');</script>
+
+<script>makeCodeJoiningOn('x2028+BR', '&#160;\u2028<br>');</script>
+
+<script>makeCodeJoiningOn('x2029+BR', '&#160;\u2029<br>');</script>
+
+<script>makeCodeJoiningOn('BR+CR', '&#160;<br>\r');</script>
+
+<script>makeCodeJoiningOn('BR+CRLF', '&#160;<br>\r\n');</script>
+
+<script>makeCodeJoiningOn('BR+LFCR', '&#160;<br>\n\r');</script>
+
+<script>makeCodeJoiningOn('BR+LF', '&#160;<br>\n');</script>
+
+<script>makeCodeJoiningOn('BR+LF', '&#160;<br>\n');</script>
+
+<script>makeCodeJoiningOn('BR+VTAB', '&#160;<br>\u000b');</script>
+
+<script>makeCodeJoiningOn('BR+x2028', '&#160;<br>\u2028');</script>
+
+<script>makeCodeJoiningOn('BR+x2029', '&#160;<br>\u2029');</script>
+
+<script>makeCodeJoiningOn('divs', '</div><div>', '<div>', '<\/div>');</script>
+
+<script>makeCodeJoiningOn('ul', '<li>', '<ul style=list-style:none;padding:0;margin:0><li>', '<\/ul>');</script>
+
+<pre id=notgen-cr>before
+[Not generated via innerHTML CR]
+after</pre>
+
+<pre id=notgen-br>before<br>[Not generated via innerHTML BR]<br>after</pre>
+
+<pre id=notgen-brcr>before<br>
+[Not generated via innerHTML CR + BR]<br>
+after</pre>
+
+<pre id=notgen-crbr>before
+<br>[Not generated via innerHTML BR + CR]
+<br>after</pre>
+
+<h2>END</h2>
+
+<pre id=threelines>one
+two
+three</pre>
+
+<h2>RESULTS</h2>
+<script>(function () {
+ var threelines = document.getElementById('threelines');
+ var codeElements = document.getElementsByTagName('PRE');
+ var threelinesHeight = threelines.offsetHeight;
+
+ var ok = [];
+ var bad = [];
+ for (var i = 0, n = codeElements.length; i < n; ++i) {
+ var codeElement = codeElements[i];
+ if (codeElement !== threelines) {
+ var codeElementHeight = codeElement.offsetHeight;
+ (Math.abs(threelinesHeight - codeElementHeight) < 3
+ ? ok : bad).push(codeElement.id + ':' + codeElementHeight);
+ }
+ }
+
+ function emit(text) {
+ var p = document.createElement('P');
+ p.appendChild(document.createTextNode(text));
+ document.body.appendChild(p);
+ }
+
+ emit(navigator.userAgent);
+ emit('Ok: ' + ok);
+ emit('Bad: ' + bad);
+})();</script>
+
+<h2>TEXTAREA</h2>
+<textarea style="font-size: 50%" cols=40 rows=50></textarea>
diff --git a/media/prettify-20110601/tests/large_input_test.html b/media/prettify-20110601/tests/large_input_test.html
new file mode 100644
index 0000000..7e40b89
--- /dev/null
+++ b/media/prettify-20110601/tests/large_input_test.html
@@ -0,0 +1,122 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>Tests of Prettifier w/ large data files</title>
+<script src="../src/prettify.js" type="text/javascript"
+ onerror="alert('Error: failed to load ' + this.src)"></script>
+<link rel="stylesheet" type="text/css" href="../src/prettify.css" />
+<link rel="stylesheet" type="text/css" href="test_styles.css" />
+</head>
+
+<body bgcolor="white">
+<div id="timing"></div>
+<div id="errorReport" style="white-space: pre"></div>
+
+<!--
+ - Generate inputs of various sizes so that we can try fitting a
+ - curve to the run times.
+ -->
+<script type="text/javascript">
+if (!Date.now) {
+ Date.now = function () { return (new Date).getTime(); };
+}
+
+if (typeof console === 'undefined') {
+ console = {
+ log: (function () {
+ var messages = [];
+ var pending = false;
+ function showMessages() {
+ pending = false;
+ if (messages.length) {
+ var text = messages.join('\n');
+ var pre = document.createElement('PRE');
+ pre.appendChild(document.createTextNode(text));
+ document.body.appendChild(pre);
+ messages = [];
+ }
+ }
+
+ return function (msg) {
+ if (!pending) {
+ setTimeout(showMessages, 0);
+ pending = true;
+ }
+ messages.push(msg);
+ };
+ })()
+ };
+}
+
+(function () {
+ var tasks = [];
+ var jsonTimes = [];
+ var xmlTimes = [];
+
+ var listItem = (
+ '&lt;li class="friendly" style="blink: like-its-going-out-of-style"&gt;'
+ + '&lt;b&gt;Howdy&lt;/b&gt; Neighbor&lt;/li&gt;');
+ var jsonItem = (
+ '{ "friendly": true, "blinking": "hell-yes", "greeting": "Howdy!" }');
+ function makeTargets(lang, item, sep, preText, postText, timesList) {
+ var buffer = [];
+ for (var i = 512; --i >= 0;) { buffer.push(item); }
+ var count = 512;
+ for (var i = 6; --i >= 0;) {
+ var src = buffer.join(sep);
+
+ tasks.push((function (n, toPrettify) {
+ return function () {
+ console.log('starting ' + lang + ' ' + n);
+ var t0 = Date.now();
+ var result = prettyPrintOne(toPrettify, lang);
+ var t1 = Date.now();
+ console.log('finishing ' + lang + ' ' + n);
+ if (result === toPrettify) {
+ console.error('Failed to prettify ' + lang + ' ' + n);
+ } else {
+ timesList.push([n, t1 - t0, toPrettify.length]);
+ }
+ };
+ })(count, preText + src + postText));
+
+ buffer = [src, src];
+ count *= 2;
+ }
+ }
+
+ makeTargets('xml', listItem, '\n', '<ul>', '<\/ul>', xmlTimes);
+ makeTargets('json', jsonItem, ', ', '[', ']', jsonTimes);
+
+ function emitBenchmarkTable(title, times) {
+ var html = [
+ '<h2>', title, '<h2>',
+ '<table class=="benchmark"><tr><th>Count<th>Length<th>Time<th>Items Per Second'];
+ for (var i = 0; i < times.length; ++i) {
+ var time = times[i];
+ var count = time[0], deltaMs = time[1], length = time[2];
+ html.push('<tr><td>', count, '<td>', length, '<td>', deltaMs,
+ '<td>', (count * 1000 / deltaMs).toFixed(1));
+ }
+ html.push('</table>');
+
+ var div = document.createElement('DIV');
+ div.innerHTML = html.join('');
+ document.body.appendChild(div);
+ }
+
+ tasks.push(
+ function () { emitBenchmarkTable('XML', xmlTimes); },
+ function () { emitBenchmarkTable('JSON', jsonTimes); });
+
+ function doOne() {
+ var task = tasks.shift();
+ task();
+ if (tasks.length) { setTimeout(doOne, 250); }
+ }
+ setTimeout(doOne, 250);
+})();
+</script>
+
+</body>
+</html>
diff --git a/media/prettify-20110601/tests/prettify_test.html b/media/prettify-20110601/tests/prettify_test.html
new file mode 100644
index 0000000..d784687
--- /dev/null
+++ b/media/prettify-20110601/tests/prettify_test.html
@@ -0,0 +1,2921 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>Code Prettifier</title>
+<script>(function () {
+ var sourceBaseUrl = /[&?]distrib/.test(location.search)
+ ? "../distrib/google-code-prettify/" : "../src/";
+ var sources = [
+ "prettify.js",
+ "lang-css.js",
+ "lang-go.js",
+ "lang-hs.js",
+ "lang-lisp.js",
+ "lang-lua.js",
+ "lang-ml.js",
+ "lang-proto.js",
+ "lang-scala.js",
+ "lang-sql.js",
+ "lang-wiki.js",
+ "lang-vhdl.js",
+ "lang-vb.js",
+ "lang-yaml.js",
+ ];
+ var styles = [
+ "prettify.css"
+ ];
+ if (window.console) {
+ console.log("sourceBaseUrl=" + sourceBaseUrl);
+ }
+ for (var i = 0; i < sources.length; ++i) {
+ document.write(
+ "<script src=\"" + sourceBaseUrl + sources[i] + "\"><\/script>");
+ }
+ for (var i = 0; i < styles.length; ++i) {
+ document.write(
+ "<link rel=\"stylesheet\" href=\"" + sourceBaseUrl + styles[i] + "\">");
+ }
+})();
+</script>
+
+<script src="test_base.js" type="text/javascript"
+ onerror="alert('Error: failed to load ' + this.src)"></script>
+<link rel="stylesheet" type="text/css" href="test_styles.css" />
+</head>
+
+<body onload="go(goldens)" bgcolor="white">
+<div id="timing"></div>
+<div id="errorReport" style="white-space: pre"></div>
+
+<h1>Bash</h1>
+<pre class="prettyprint" id="bash">#!/bin/bash
+
+# Fibonacci numbers
+# Writes an infinite series to stdout, one entry per line
+function fib() {
+ local a=1
+ local b=1
+ while true ; do
+ echo $a
+ local tmp=$a
+ a=$(( $a + $b ))
+ b=$tmp
+ done
+}
+
+# output the 10th element of the series and halt
+fib | head -10 | tail -1
+</pre>
+
+<h1>Bash w/ language specified</h1>
+<pre class="prettyprint lang-sh linenums" id="bash_lang">#!/bin/bash
+
+# Fibonacci numbers
+# Writes an infinite series to stdout, one entry per line
+function fib() {
+ local a=1
+ local b=1
+ while true ; do
+ echo $a
+ local tmp=$a
+ a=$(( $a + $b ))
+ b=$tmp
+ done
+}
+
+# output the 10th element of the series and halt
+fib | /usr/bin/*head -10 | tail -1
+</pre>
+
+<h1>C</h1>
+
+<pre class="prettyprint" id="C">
+#include &lt;stdio.h&gt;
+
+/* the n-th fibonacci number.
+ */
+unsigned int fib(unsigned int n) {
+ unsigned int a = 1, b = 1;
+ unsigned int tmp;
+ while (--n >= 0) {
+ tmp = a;
+ a += b;
+ b = tmp;
+ }
+ return a;
+}
+
+main() {
+ printf("%u", fib(10));
+}
+</pre>
+
+<h1>C w/ language specified</h1>
+
+<pre class="prettyprint lang-c" id="C_lang">
+#include &lt;stdio.h&gt;
+
+/* the n<sup>th</sup> fibonacci number. */
+uint32 fib(unsigned int n) {
+ uint32 a = 1, b = 1;
+ uint32 tmp;
+ while (--n >= 0) {
+ tmp = a;
+ a += b;
+ b = tmp;
+ }
+ return a;
+}
+
+void main() {
+ size_t size = sizeof(wchar_t);
+ ASSERT_EQ(size, 1);
+ printf("%u", fib(10));
+}
+
+#define ZERO 0 /* a
+ multiline comment */
+</pre>
+<h1>C++</h1>
+<pre class="prettyprint" id="Cpp">
+#include &lt;iostream&gt;
+
+using namespace std;
+
+//! fibonacci numbers with gratuitous use of templates.
+//! \param n an index into the fibonacci series
+//! \param fib0 element 0 of the series
+//! \return the nth element of the fibonacci series
+template &lt;class T>
+T fib(unsigned int n, const T&amp; fib0) {
+ T a(fib0), b(fib0);
+ for (; n; --n) {
+ T tmp(a);
+ a += b;
+ b = tmp;
+ }
+ return a;
+}
+
+int main(int argc, char **argv) {
+ cout &lt;&lt; fib(10, 1U);
+}
+</pre>
+
+<h1>C++ w/ language specified</h1>
+<pre class="prettyprint lang-cc" id="Cpp_lang">
+#include &lt;iostream&gt;
+
+using namespace std;
+
+//! fibonacci numbers with gratuitous use of templates.
+//! \param n an index into the fibonacci series
+//! \param fib0 element 0 of the series
+//! \return the nth element of the fibonacci series
+template &lt;class T>
+T fib(int n, const T&amp; fib0) {
+ T a(fib0), b(fib0);
+ while (--n >= 0) {
+ T tmp(a);
+ a += b;
+ b = tmp;
+ }
+ return a;
+}
+
+int main(int argc, char **argv) {
+ cout &lt;&lt; fib(10, 1U);
+}
+</pre>
+
+<h1>Java</h1>
+<pre class="prettyprint" id="java">
+package foo;
+
+import java.util.Iterator;
+
+/**
+ * the fibonacci series implemented as an Iterable.
+ */
+public final class Fibonacci implements Iterable&lt;Integer> {
+ /** the next and previous members of the series. */
+ private int a = 1, b = 1;
+
+ @Override
+ public Iterator&lt;Integer> iterator() {
+ return new Iterator&lt;Integer>() {
+ /** the series is infinite. */
+ public boolean hasNext() { return true; }
+ public Integer next() {
+ int tmp = a;
+ a += b;
+ b = tmp;
+ return a;
+ }
+ public void remove() { throw new UnsupportedOperationException(); }
+ };
+ }
+
+ /**
+ * the n&lt;sup>th&lt;/sup> element of the given series.
+ * @throws NoSuchElementException if there are less than n elements in the
+ * given Iterable's {@link Iterable#iterator iterator}.
+ */
+ public static &lt;T>
+ T nth(int n, Iterable&lt;T> iterable) {
+ Iterator&lt;? extends T> it = iterable.iterator();
+ while (--n > 0) {
+ it.next();
+ }
+ return it.next();
+ }
+
+ public static void main(String[] args) {
+ System.out.print(nth(10, new Fibonacci()));
+ }
+}
+</pre>
+
+<h1>Java w/ language specified<small>(first line shown is line 12)</small></h1>
+<pre class="prettyprint lang-java linenums:12" id="java_lang">
+package foo;
+
+import java.util.Iterator;
+
+/**
+ * the fibonacci series implemented as an Iterable.
+ */
+public final class Fibonacci implements Iterable&lt;Integer> {
+ /** the next and previous members of the series. */
+ private int a = 1, b = 1;
+
+ @Override
+ public Iterator&lt;Integer> iterator() {
+ return new Iterator&lt;Integer>() {
+ /** the series is infinite. */
+ public boolean hasNext() { return true; }
+ public Integer next() {
+ int tmp = a;
+ a += b;
+ b = tmp;
+ return a;
+ }
+ public void remove() { throw new UnsupportedOperationException(); }
+ };
+ }
+
+ /**
+ * the n&lt;sup>th&lt;/sup> element of the given series.
+ * @throws NoSuchElementException if there are less than n elements in the
+ * given Iterable's {@link Iterable#iterator iterator}.
+ */
+ public static &lt;T>
+ T nth(int n, Iterable&lt;T> iterable) {
+ Iterator&lt;? extends T> in = iterable.iterator();
+ while (--n > 0) {
+ in.next();
+ }
+ return in.next();
+ }
+
+ public static void main(String[] args) {
+ System.out.print(nth(10, new Fibonacci()));
+ }
+}
+
+# not a java comment
+# not keywords: static_cast and namespace
+</pre>
+
+<h1>Javascript</h1>
+<pre class="prettyprint" id="javascript">
+/**
+ * nth element in the fibonacci series.
+ * @param n >= 0
+ * @return the nth element, >= 0.
+ */
+function fib(n) {
+ var a = 1, b = 1;
+ var tmp;
+ while (--n >= 0) {
+ tmp = a;
+ a += b;
+ b = tmp;
+ }
+ return a;
+}
+
+document.write(fib(10));
+</pre>
+
+<h1>Issue 12 - Javascript Regular Expressions</h1>
+<pre class="prettyprint" id="issue12">
+/foo/; // a slash starting a line treated as a regexp beginning
+"foo".match(/fo+$/);
+// this line comment not treated as a regular expressions
+"foo /bar/".test(/"baz"/); // test string and regexp boundaries
+var division = /\b\d+\/\d+/g; // test char sets and escaping of specials
+var allSpecials = /([^\(\)\[\]\{\}\-\?\+\*\.\^\$\/]+)\\/;
+var slashInCharset = /[^/]/g, notCloseSq = /[^\]]/;
+
+// test that slash used in numeric context treated as an operator
+1 / 2;
+1. / x;
+x / y;
+(x) / y;
+1 /* foo */ / 2;
+1 /* foo *// 2;
+1/2;
+1./x;
+x/y;
+(x)/y;
+
+// test split over two lines. line comment should not fool it
+1//
+/2;
+
+x++/y;
+x--/y;
+x[y] / z;
+f() / n;
+
+// test that slash after non postfix operator is start of regexp
+log('matches = ' + /foo/.test(foo));
+
+// test keyword preceders
+return /a regexp/;
+division = notreturn / not_a_regexp / 2; // keyword suffix does not match
+
+// & not used as prefix operator in javascript but this should still work
+&/foo/;
+
+extends = /extends/;
+</pre>
+
+<h1>Issue 12 - Javascript Regular Expressions w/ language specified</h1>
+<pre class="prettyprint lang-js" id="issue12_lang">
+/foo/; // a slash starting a line treated as a regexp beginning
+"foo".match(/fo+$/);
+// this line comment not treated as a regular expressions
+"foo /bar/".test(/"baz"/); // test string and regexp boundaries
+var division = /\b\d+\/\d+/g; // test char sets and escaping of specials
+var allSpecials = /([^\(\)\[\]\{\}\-\?\+\*\.\^\$\/]+)\\/;
+var slashInCharset = /[^/]/g, notCloseSq = /[^\]]/;
+
+// test that slash used in numeric context treated as an operator
+1 / 2;
+1. / x;
+x / y;
+(x) / y;
+1 /* foo */ / 2;
+1 /* foo *// 2;
+1/2;
+1./x;
+x/y;
+(x)/y;
+
+// test split over two lines. line comment should not fool it
+1//
+/2;
+
+x++/y;
+x--/y;
+x[y] / z;
+f() / n;
+
+// test that slash after non postfix operator is start of regexp
+log('matches = ' + /foo/.test(foo));
+
+// test keyword preceders
+return /a regexp/;
+division = notreturn / not_a_regexp / 2; // keyword suffix does not match
+
+// & not used as prefix operator in javascript but this should still work
+&/foo/;
+
+extends = /extends/;
+</pre>
+
+<h1>Coffee</h1>
+<pre class="prettyprint lang-coffee" id="coffee">
+class Animal
+ constructor: (@name) ->
+ move: (meters, loc) ->
+ alert @name + " moved " + meters + "m."
+ travel: (path...) ->
+ for place in path
+ @move place.distance, place.location
+
+class Horse extends Animal
+ ###
+ @param name Horse name
+ @param jumper Jumping ability
+ ###
+ constructor: (name, jumper) ->
+ super name
+ @capable = jumper
+ step: ->
+ alert '''
+ Step,
+ step...
+ '''
+ jump: ->
+ @capable
+ move: (meters, where) ->
+ switch where
+ when "ground"
+ @step()
+ super meters
+ when "hurdle"
+ super meters if @jump()
+
+# Create horse
+tom = new Horse "Tommy", yes
+
+street =
+ location: "ground"
+ distance: 12
+car =
+ location: "hurdle"
+ distance: 2
+
+###
+Tell him to travel:
+1. through the street
+2. over the car
+###
+tom.travel street, car
+</pre>
+
+<h1>Perl</h1>
+<pre class="prettyprint" id="perl">
+#!/usr/bin/perl
+
+use strict;
+use integer;
+
+# the nth element of the fibonacci series
+# param n - an int >= 0
+# return an int >= 0
+sub fib($) {
+ my $n = shift, $a = 1, $b = 1;
+ ($a, $b) = ($a + $b, $a) until (--$n < 0);
+ return $a;
+}
+
+print fib(10);
+</pre>
+
+<h1>Python</h1>
+<pre class="prettyprint" id="python">
+#!/usr/bin/python2.4
+
+def fib():
+ '''
+ a generator that produces the elements of the fibonacci series
+ '''
+
+ a = 1
+ b = 1
+ while True:
+ a, b = a + b, a
+ yield a
+
+def nth(series, n):
+ '''
+ returns the nth element of a series,
+ consuming the earlier elements of the series
+ '''
+
+ for x in series:
+ n = n - 1
+ if n <= 0: return x
+
+print nth(fib(), 10)
+</pre>
+
+<h1>Python w/ language specified</h1>
+<pre class="prettyprint lang-py" id="python_lang">
+#!/usr/bin/python2.4
+
+def fib():
+ '''
+ a generator that produces the fibonacci series's elements
+ '''
+
+ a = 1
+ b = 1
+ while True:
+ a, b = a + b, a
+ yield a
+
+def nth(series, n):
+ '''
+ returns the nth element of a series,
+ consuming the series' earlier elements.
+ '''
+
+ for x in series:
+ n -= 1
+ if n <= 0: return x
+
+print nth(fib(), 10)
+
+/* not a comment and not keywords: null char true */
+</pre>
+
+<h1>SQL w/ language specified</h1>
+<pre class="prettyprint lang-sql" id="sql_lang">
+/* A multi-line
+ * comment */
+'Another string /* Isn\'t a comment',
+"A string */"
+-- A line comment
+SELECT * FROM users WHERE id IN (1, 2.0, +30e-1);
+-- keywords are case-insensitive.
+-- Note: user-table is a single identifier, not a pair of keywords
+select * from user-table where id in (x, y, z);
+</pre>
+
+<h1>XML</h1>
+<pre class="prettyprint" id="xml">
+&lt;!DOCTYPE series PUBLIC "fibonacci numbers"&gt;
+
+&lt;series.root base="1" step="s(n-2) + s(n-1)">
+ &lt;element i="0"&gt;1&lt;/element&gt;
+ &lt;element i="1"&gt;1&lt;/element&gt;
+ &lt;element i="2"&gt;2&lt;/element&gt;
+ &lt;element i="3"&gt;3&lt;/element&gt;
+ &lt;element i="4"&gt;5&lt;/element&gt;
+ &lt;element i="5"&gt;8&lt;/element&gt;
+ ...
+&lt;/series.root&gt;
+</pre>
+
+<h1>HTML</h1>
+<pre class="prettyprint" id="html">
+&lt;html&gt;
+ &lt;head>
+ &lt;title&gt;Fibonacci number&lt;/title&gt;
+ &lt;style&gt;&lt;!-- BODY { text-decoration: blink } --&gt;&lt;/style&gt;
+ &lt;script src="foo.js"&gt;&lt;/script&gt;
+ &lt;script src="bar.js"&gt;&lt;/script&gt;
+ &lt;/head&gt;
+ &lt;body>
+ &lt;noscript&gt;
+ &lt;dl&gt;
+ &lt;dt&gt;Fibonacci numbers&lt;/dt&gt;
+ &lt;dd&gt;1&lt;/dd&gt;
+ &lt;dd&gt;1&lt;/dd&gt;
+ &lt;dd&gt;2&lt;/dd&gt;
+ &lt;dd&gt;3&lt;/dd&gt;
+ &lt;dd&gt;5&lt;/dd&gt;
+ &lt;dd&gt;8&lt;/dd&gt;
+ &amp;hellip;
+ &lt;/dl&gt;
+ &lt;/noscript&gt;
+
+ &lt;script type="text/javascript">&lt;!--
+function fib(n) {
+ var a = 1, b = 1;
+ var tmp;
+ while (--n >= 0) {
+ tmp = a;
+ a += b;
+ b = tmp;
+ }
+ return a;
+}
+
+document.writeln(fib(10));
+// --&gt;
+ &lt;/script>
+ &lt;/body&gt;
+&lt;/html&gt;
+</pre>
+
+<h1>HTML w/ language specified</h1>
+<pre class="prettyprint lang-html" id="html_lang">
+Fibonacci Numbers
+
+&lt;noscript&gt;
+ &lt;dl style="list-style: disc"&gt;
+ &lt;dt&gt;Fibonacci numbers&lt;/dt&gt;
+ &lt;dd&gt;1&lt;/dd&gt;
+ &lt;dd&gt;1&lt;/dd&gt;
+ &lt;dd&gt;2&lt;/dd&gt;
+ &lt;dd&gt;3&lt;/dd&gt;
+ &lt;dd&gt;5&lt;/dd&gt;
+ &lt;dd&gt;8&lt;/dd&gt;
+ &amp;hellip;
+ &lt;/dl&gt;
+&lt;/noscript&gt;
+
+&lt;script type="text/javascript">&lt;!--
+function fib(n) {
+ var a = 1, b = 1;
+ var tmp;
+ while (--n >= 0) {
+ tmp = a;
+ a += b;
+ b = tmp;
+ }
+ return a;
+}
+
+document.writeln(fib(10));
+// --&gt;
+&lt;/script>
+</pre>
+
+
+<h1>HTML using XMP</h1>
+<xmp class="prettyprint" id="htmlXmp"
+><html>
+ <head>
+ <title>Fibonacci number</title>
+ </head>
+ <body>
+ <noscript>
+ <dl>
+ <dt>Fibonacci numbers</dt>
+ <dd>1</dd>
+ <dd>1</dd>
+ <dd>2</dd>
+ <dd>3</dd>
+ <dd>5</dd>
+ <dd>8</dd>
+ &hellip;
+ </dl>
+ </noscript>
+
+ <script type="text/javascript"><!--
+function fib(n) {
+ var a = 1, b = 1;
+ var tmp;
+ while (--n >= 0) {
+ tmp = a;
+ a += b;
+ b = tmp;
+ }
+ return a;
+}
+
+document.writeln(fib(10));
+// -->
+ </script>
+ </body>
+</html>
+</xmp>
+
+<h1>XHTML</h1>
+<pre class="prettyprint" id="xhtml"
+>&lt;xhtml&gt;
+ &lt;head&gt;
+ &lt;title&gt;Fibonacci number&lt;/title&gt;
+ &lt;/head&gt;
+ &lt;body onload="alert(fib(10))">
+ &lt;script type="text/javascript"&gt;&lt;![CDATA[
+function fib(n) {
+ var a = 1, b = 1;
+ var tmp;
+ while (--n &gt;= 0) {
+ tmp = a;
+ a += b;
+ b = tmp;
+ }
+ return a;
+}
+]]&gt;
+ &lt;/script&gt;
+ &lt;/body&gt;
+&lt;/xhtml&gt;
+</pre>
+
+<h1>PHP</h1>
+<pre class="prettyprint" id="PHP">
+&lt;html>
+ &lt;head>
+ &lt;title>&lt;?= 'Fibonacci numbers' ?>&lt;/title>
+
+ &lt;?php
+ // PHP has a plethora of comment types
+ /* What is a
+ "plethora"? */
+ function fib($n) {
+ # I don't know.
+ $a = 1;
+ $b = 1;
+ while (--$n >= 0) {
+ echo "$a\n";
+ $tmp = $a;
+ $a += $b;
+ $b = $tmp;
+ }
+ }
+ ?>
+ &lt;/head>
+ &lt;body>
+ &lt;?= fib(10) ?>
+ &lt;/body>
+&lt;/html>
+</pre>
+
+<h1>XSL (Issue 19)</h1>
+<pre class="prettyprint" id="xsl">
+&lt;!-- Test elements and attributes with namespaces --&gt;
+
+&lt;xsl:stylesheet xml:lang="en"&gt;
+ &lt;xsl:template match="."&gt;
+ &lt;xsl:text&gt;Hello World&lt;/xsl:text&gt;
+ &lt;/xsl:template&gt;
+&lt;/xsl:stylesheet&gt;
+</pre>
+
+<h1>Whitespace</h1>
+<pre class=prettyprint id="whitespace"></pre>
+
+<h1>Misc</h1>
+<pre class=prettyprint id="misc1">// ends with line comment token
+//</pre>
+
+<h1>User submitted testcase for Bug 4</h1>
+<p>
+Javascript Snippets wrapped in HTML SCRIPT tags hides/destroys inner content
+</p>
+<pre class=prettyprint id="issue4">
+&lt;script type="text/javascript"&gt;
+ var savedTarget=null; // The target layer (effectively vidPane)
+ var orgCursor=null; // The original mouse style so we can restore it
+ var dragOK=false; // True if we're allowed to move the element under mouse
+ var dragXoffset=0; // How much we've moved the element on the horozontal
+ var dragYoffset=0; // How much we've moved the element on the verticle
+ vidPaneID = document.getElementById('vidPane'); // Our movable layer
+ vidPaneID.style.top='75px'; // Starting location horozontal
+ vidPaneID.style.left='75px'; // Starting location verticle
+&lt;script&gt;
+</pre>
+<p>The fact that the script tag was not closed properly was causing
+PR_splitSourceNodes to end without emitting the script contents.</p>
+
+<h1>Bug 8 - tabs mangled</h1>
+<p>If tabs are used to indent code inside &lt;pre> IE6 and 7 won't honor them
+after the script runs.
+
+Code indented with tabs will be shown aligned to the left margin instead of
+the proper indenting shown in Firefox.
+
+I'm using Revision 20 of prettify.js, IE 6.0.29.00 in English and IE
+7.0.5730.11 in Spanish.
+</p>
+<pre class=prettyprint id="issue8">
+<b>one</b>&#9;<b>Two</b>&#9;<b>three</b>&#9;Four&#9;<b>five</b>&#9;|
+Six&#9;<b>seven</b>&#9;Eight&#9;nine&#9;Ten&#9;|
+<b>eleven</b>&#9;Twelve&#9;<b>thirteen</b>&#9;Fourteen&#9;fifteen&#9;|
+</pre>
+
+<h1>Bug 14a - does not recognize <code>&lt;br&gt;</code> as newline</h1>
+<pre class="prettyprint" id="issue14a"
+>//comment<br />int main(int argc, char **argv)
+{}</pre>
+
+<h1>Bug 14b - comments not ignored</h1>
+<pre class="prettyprint" id="issue14b"
+>&lt;!-- There's an <!-- BOO!! --><acronym title="tag soup">HTML</acronym> comment in my comment --&gt;
+&lt;p&gt;And another one inside the end tag&lt;/p<!-- GOTCHA!! -->&gt;
+</pre>
+
+<h1>Bug 20 - missing blank lines</h1>
+<pre class="prettyprint" id="issue20"
+>&lt;html&gt;
+
+&lt;head&gt;</pre>
+
+<h1>Bug 21 - code doesn't copy and paste well in IE</h1>
+<pre class="prettyprint" id="issue21"
+>&lt;html&gt;
+ &lt;head&gt;
+ &lt;title&gt;Test&lt;/title&gt;
+ &lt;/head&gt;
+&lt;/html&gt;</pre>
+<p>To test this bug, disable overriding of _pr_isIE6 in test_base.js
+by putting #testcopypaste on the end of the URL and reloading the
+page, then copy and paste the above into Notepad.</p>
+
+<h1>Bug 22 - Line numbers and other non-code spans in code</h1>
+<pre class="prettyprint" id="issue22"
+><span class=nocode>01: </span>// This is a line of code
+<span class=nocode>02: </span>/* Multiline comments can
+<span class=nocode>03: </span> * span over and around
+<span class=nocode>04: </span> * line markers
+<span class="nocode annot">And can even be interrupted</span>
+<span class="nocode annot">by inline code annotations</span>
+<span class=nocode>05: </span> */
+<span class=nocode>06: </span>class MyClass extends Foo {
+<span class=nocode>07: </span> public static void main(String... argv) {
+<span class=nocode>08: </span> System.out.print("Hello World");
+<span class=nocode>09: </span> }
+<span class=nocode>10: </span>}</pre>
+
+<h1>Bug 24 - Lua Syntax Highlighting</h1>
+<pre class="prettyprint lang-lua" id="issue24">
+os=require("os")
+math=require("math")
+
+-- Examples from the language reference
+ a = 'alo\n123"'
+ a = "alo\n123\&quot;"
+ a = '\97lo\10\04923"'
+ a = [[alo
+ 123&quot;]]
+ a = [==[
+ alo
+ 123&quot;]==]
+
+3 3.0 3.1416 314.16e-2 0.31416E1 0xff 0x56
+
+-- Some comments that demonstrate long brackets
+double_quoted = "Not a long bracket [=["
+--[=[ quoting out
+ [[ foo ]]
+ [==[does not end comment either]==]
+]=]
+past_end_of_comment
+--]=]
+
+-- Example code courtesy Joseph Harmbruster
+#
+do
+ local function ssgeneral(t, n, before)
+ for _, h in ipairs(incs) do
+ for i = h + 1, n do
+ local v = t[i]
+ for j = i - h, 1, -h do
+ local testval = t[j]
+ if not before(v, testval) then break end
+ t[i] = testval; i = j
+ end
+ t[i] = v
+ end
+ end
+ return t
+ end
+
+ function shellsort(t, before, n)
+ n = n or #t
+ if not before or before == "<" then return ssup(t, n)
+ elseif before == ">" then return ssdown(t, n)
+ else return ssgeneral(t, n, before)
+ end
+ end
+ return shellsort
+end</pre>
+
+<h1>Bug 27 - VBScript w/ language specified</h1>
+<pre class="prettyprint lang-vb" id="issue27">
+Imports System
+
+Class [class]
+ Shared Sub [shared](ByVal [boolean] As Boolean)
+ If [boolean] Then
+ Console.WriteLine("true")
+ Else
+ Console.WriteLine("false")
+ End If
+ End Sub
+End Class
+
+Module [module]
+ Sub Main()
+ [class].[shared](True)
+
+ ' This prints out: &quot;.
+ Console.WriteLine("""")
+
+ ' This prints out: a&quot;b.
+ Console.WriteLine("a""b")
+
+ ' This prints out: a.
+ Console.WriteLine("a"c)
+
+ ' This prints out: &quot;.
+ Console.WriteLine(""""c)
+ End Sub
+End Module
+
+Dim d As Date
+d = # 8/23/1970 3:45:39AM #
+d = # 8/23/1970 #
+d = # 3:45:39AM #
+d = # 3:45:39 #
+d = # 13:45:39 #
+d = # 13:45:39PM #
+
+Dim n As Float
+n = (0.0, .99F, 1.0E-2D, 1.0E+3D, .5E4, 1E3R, 4D)
+
+Dim i As Integer
+i = (0, 123, 45L, &amp;HA0I, &amp;O177S)
+</pre>
+
+<h1>Bug 30 - Haskell w/ language specified</h1>
+<pre class="prettyprint lang-hs" id="issue30">
+-- A comment
+Not(--"a comment&quot;)
+Also.not(--(A.comment))
+
+module Foo(bar) where
+import Blah
+import BlahBlah(blah)
+import Monads(Exception(..), FIO(..),unFIO,handle,runFIO,fixFIO,fio,
+ write,writeln,HasNext(..),HasOutput(..))
+
+{- nested comments
+ - don't work {-yet-} -}
+instance Thingy Foo where
+ a = b
+
+data Foo :: (* -> * -> *) -&gt; * > * -> * where
+ Nil :: Foo a b c
+ Cons :: a b c -> Foo abc -> Foo a b c
+
+str = &quot;Foo\\Bar"
+char = 'x'
+Not.A.Char = 'too long' -- Don't barf. Show that 't is a lexical error.
+
+(ident, ident', Fo''o.b'ar)
+
+(0, 12, 0x45, 0xA7, 0o177, 0O377, 0.1, 1.0, 1e3, 0.5E-3, 1.0E+45)
+</pre>
+
+<h1>Bug 33 - OCaml and F#</h1>
+<pre class="prettyprint lang-ml" id="issue33">
+(*
+ * Print the 10th fibonacci number
+ *)
+
+//// A line comment
+"A string";;
+(0, 125, 0xa0, -1.0, 1e6, 1.2e-3);; // number literals
+
+#if fibby
+ let
+ rec fib = function (0, a, _) -> a
+ | (n, a, b) -> fib(n - 1, a + b, a)
+ in
+ print_int(fib(10, 1, 1));;
+#endif
+
+let zed = 'z'
+
+let f' x' = x' + 1
+</pre>
+<p>Still TODO: handle nested <code>(* (* comments *) *)</code> properly.</p>
+
+<h1>Bug 42 - Lisp Syntax Highlighting</h1>
+<pre class="prettyprint lang-el" id="issue42"
+>; -*- mode: lisp -*-
+
+(defun back-six-lines () (interactive) (forward-line -6))
+(defun forward-six-lines () (interactive) (forward-line 6))
+
+(global-set-key "\M-l" 'goto-line)
+(global-set-key "\C-z" 'advertised-undo)
+(global-set-key [C-insert] 'clipboard-kill-ring-save)
+(global-set-key [S-insert] 'clipboard-yank)
+(global-set-key [C-up] 'back-six-lines)
+(global-set-key [C-down] 'forward-six-lines)
+
+(setq visible-bell t)
+(setq user-mail-address "foo@bar.com")
+(setq default-major-mode 'text-mode)
+
+(setenv "TERM" "emacs")
+(c-set-offset 'case-label 2)
+(setq c-basic-offset 2)
+(setq perl-indent-level 0x2)
+(setq delete-key-deletes-forward t)
+(setq indent-tabs-mode nil)
+
+;; Text mode
+(add-hook 'text-mode-hook
+ '(lambda ()
+ (turn-on-auto-fill)
+ )
+)
+
+;; Fundamental mode
+(add-hook 'fundamental-mode-hook
+ '(lambda ()
+ (turn-on-auto-fill)
+ )
+)
+
+;; Define and cond are keywords in scheme
+(define (sqt x) (sqrt-iter 1.0 2.0 x))
+</pre>
+
+<h1>Bug 45 - Square brackets in strings</h1>
+<pre class="prettyprint" id="issue45">
+throw new RuntimeException("Element [" + element.getName() +
+ "] missing attribute.");
+variable++;
+</pre>
+
+<h1>Protocol Buffers</h1>
+<pre class="prettyprint lang-proto" id="proto"
+>message SearchRequest {
+ required string query = 1;
+ optional int32 page_number = 2;
+ optional int32 result_per_page = 3 [default = 10];
+ enum Corpus {
+ UNIVERSAL = 0;
+ WEB = 1;
+ IMAGES = 2;
+ LOCAL = 3;
+ NEWS = 4;
+ PRODUCTS = 5;
+ VIDEO = 6;
+ }
+ optional Corpus corpus = 4 [default = UNIVERSAL];
+}</pre>
+
+<h1>Wiki syntax w/ language specified</h1>
+<pre class="prettyprint lang-wiki" id="wiki">
+#summary hello world
+#labels HelloWorld WikiWord Hiya
+
+[http://www.google.com/?q=WikiSyntax+site:code.google.com WikiSyntax]
+
+Lorem Ipsum `while (1) print("blah blah");`
+
+ * Bullet
+ * Points
+ * NestedBullet
+
+==DroningOnAndOn==
+{{{
+ // Some EmbeddedSourceCode
+ void main() {
+ Print('hello world');
+ }
+}}}
+
+{{{
+ &lt;!-- Embedded XML --&gt;
+ &lt;foo bar="baz"&gt;&lt;boo /&gt;&lt;foo&gt;
+}}}
+</pre>
+
+<h1>CSS w/ language specified</h1>
+<pre class="prettyprint lang-css" id="css">
+&lt;!--
+@charset('UTF-8');
+
+/** A url that is not quoted. */
+@import(url(/more-styles.css));
+
+HTML { content-before: 'hello\20'; content-after: 'w\6f rld';
+ -moz-spiff: inherit !important }
+
+/* Test units on numbers. */
+BODY { margin-bottom: 4px; margin-left: 3in; margin-bottom: 0; margin-top: 5% }
+
+/** Test number literals and quoted values. */
+TABLE.foo TR.bar A#visited { color: #001123; font-family: "monospace" }
+/** bolder is not a name, so should be plain. !IMPORTANT is a keyword
+ * regardless of case.
+ */
+blink { text-decoration: BLINK !IMPORTANT; font-weight: bolder }
+--&gt;
+</pre>
+
+<h1>Issue 79 CSS highlighting</h1>
+<pre class=prettyprint>
+&lt;style type='text/css'>
+/* desert scheme ported from vim to google prettify */
+code.prettyprint { display: block; padding: 2px; border: 1px solid #888;
+background-color: #333; }
+.str { color: #ffa0a0; } /* string - pink */
+.kwd { color: #f0e68c; font-weight: bold; }
+.com { color: #87ceeb; } /* comment - skyblue */
+.typ { color: #98fb98; } /* type - lightgreen */
+.lit { color: #cd5c5c; } /* literal - darkred */
+.pun { color: #fff; } /* punctuation */
+.pln { color: #fff; } /* plaintext */
+.tag { color: #f0e68c; font-weight: bold; } /* html/xml tag - lightyellow*/
+.atn { color: #bdb76b; font-weight: bold; } /* attribute name - khaki*/
+.atv { color: #ffa0a0; } /* attribute value - pink */
+.dec { color: #98fb98; } /* decimal - lightgreen */
+&lt;/style>
+</pre>
+
+<h1>Issue 84 NBSPs</h1>
+<pre class="prettyprint lang-java" id="issue84">super("&amp;nbsp;");</pre>
+
+<h1>Issue 86</h1>
+<p><code class="prettyprint" id="issue86_0">#One
+Two words</code></p>
+<p><code class="prettyprint known_ie6_failure" id="issue86_1" style="white-space: pre">#One
+Two lines</code></p>
+<pre class="prettyprint" id="issue86_2">#One
+Two lines</pre>
+<pre><code class="prettyprint known_ie6_failure" id="issue86_3">#One
+Two lines</code></pre>
+<xmp class="prettyprint" id="issue86_4">#One
+Two lines</xmp>
+<p><code class="prettyprint" id="issue86_5">#One<br>
+Two lines</code></p>
+
+<h1>Issue 92 -- capital letters in tag names</h1>
+<pre class="prettyprint" id="issue92">
+&lt;?xml version="1.0" encoding="UTF-8"?&gt;
+&lt;kml xmlns="http://www.opengis.net/kml/2.2"&gt;
+ &lt;Placemark&gt;
+ &lt;name&gt;Simple placemark&lt;/name&gt;
+ &lt;description Lang="en"&gt;Attached to the ground. Intelligently places itself
+ at the height of the underlying terrain.&lt;/description&gt;
+ &lt;Point&gt;
+ &lt;coordinates&gt;-122.0822035425683,37.42228990140251,0&lt;/coordinates&gt;
+ &lt;/Point&gt;
+ &lt;/Placemark&gt;
+&lt;/kml&gt;
+</pre>
+
+<h1>Issue 93 -- C# verbatim strings</h1>
+<pre class="prettyprint lang-cs" id="issue93">
+// The normal string syntax
+string a = "C:\\";
+// is equivalent to a verbatim string
+string b = @"C:\";
+</pre>
+
+<h1>VHDL mode</h1>
+<pre class="prettyprint lang-vhdl" id="vhdl">
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.numeric_std.all;
+
+-- A line comment
+entity foo_entity is
+
+ generic (-- comment after punc
+ a : natural := 42;
+ x : real := 16#ab.cd#-3
+ );
+ port (
+ clk_i : in std_logic;
+ b_i : in natural range 0 to 100;
+ c_o : out std_logic_vector(5 downto 0);
+ \a "name"\ : out integer -- extended identifier
+ );
+
+end entity foo_entity;
+
+architecture foo_architecture of foo_entity is
+ signal bar_s : std_logic_vector(2 downto 0);
+begin
+
+ bar_s &lt;= b"101";
+
+ dummy_p : process (clk_i)
+ begin
+ if b_i = 1 then
+ c_o &lt;= (others => '0');
+ elsif rising_edge(clk_i) then
+ c_o &lt;= "1011" &amp; bar_s(1 downto 0);
+ end if;
+ end process dummy_p;
+
+end architecture foo_architecture;
+</pre>
+
+<h1>YAML mode</h1>
+<pre class="prettyprint lang-yaml" id="yaml1">
+application: mirah-lang
+version: 1
+
+# Here's a comment
+handlers:
+ - url: /red/*
+ servlet: mysite.server.TeamServlet
+ init_params:
+ teamColor: red
+ bgColor: "#CC0000"
+ name: redteam
+ - url: /blue/*
+ servlet: mysite.server.TeamServlet
+ init_params:
+ teamColor: blue
+ bgColor: "#0000CC"
+ name: blueteam
+ - url: /register/*
+ jsp: /register/start.jsp
+ - url: *.special
+ filter: mysite.server.LogFilterImpl
+ init_params:
+ logType: special
+ </pre>
+<pre class="prettyprint lang-yaml" id="yaml2">
+%YAML 1.1
+---
+!!map {
+ ? !!str ""
+ : !!str "value",
+ ? !!str "explicit key"
+ : !!str "value",
+ ? !!str "simple key"
+ : !!str "value",
+ ? !!seq [
+ !!str "collection",
+ !!str "simple",
+ !!str "key"
+ ]
+ : !!str "value"
+}</pre>
+
+<h1>Scala mode</h1>
+<pre class="prettyprint lang-scala" id="scala">
+/* comment 1 */
+/*
+comment 2
+*/
+/* comment / * comment 3 **/
+// strings
+"Hello, World!", "\n",
+`an-identifier`, `\n`,
+'A', '\n',
+'aSymbol,
+"""Hello,
+World""", """Hello,\nWorld""",
+"""Hello, "World"!""",
+"""Hello, \"World\""""
+
+// Numbers
+0
+0123
+0xa0
+0XA0L
+123
+123.45
+1.50F
+0.50
+.50
+123e-1
+123.45e+1
+1.50e2
+0.50e-6
+.50e+42f
+
+// Values
+false, true, null, this;
+
+// Keywords
+class MyClass;
+import foo.bar;
+package baz;
+
+// From scala-lang.org/node/242
+def act() {
+ var pongCount = 0
+ loop {
+ react {
+ case Ping =>
+ if (pongCount % 1000 == 0)
+ Console.println("Pong: ping "+pongCount)
+ sender ! Pong
+ pongCount = pongCount + 1
+ case Stop =>
+ Console.println("Pong: stop")
+ exit()
+ }
+ }
+}
+</pre>
+
+<h1>Go mode</h1>
+<pre class="prettyprint lang-go" id="go">
+package main /* Package of which this program is part. */
+
+import fmt "fmt" // Package implementing formatted I/O.
+
+
+func main() {
+ fmt.Printf("Hello, world; or &#x039a;&#x03b1;&#x03bb;&#x03b7;&#x03bc;&#x03ad;&#x03c1;&#x03b1; &#x03ba;&#x03cc;&#x03c3;&#x03bc;&#x03b5;; or &#x3053;&#x3093;&#x306b;&#x3061;&#x306f; &#x4e16;&#x754c;\n") // Semicolon inserted here
+}
+
+/* " */ &quot;foo /* " /*/ */
+/* ` */ `foo /* ` /*/ */
+</pre>
+
+Test IE by copy/pasting content here.
+<textarea cols="80" rows="40"></textarea>
+</body>
+
+<script type="text/javascript">
+/**
+ * maps ids of rewritten code to the expected output.
+ * For brevity, <span class="foo"> has been changed to `FOO and </span>
+ * has been changed to `END.
+ */
+var goldens = {
+ bash: (
+ '`COM#!/bin/bash`END`PLN\n' +
+ '\n' +
+ '`END`COM# Fibonacci numbers`END`PLN\n' +
+ '`END`COM# Writes an infinite series to stdout, one entry per line`END' +
+ '`PLN\n' +
+ '`END`KWDfunction`END`PLN fib`END`PUN()`END`PLN `END`PUN{`END`PLN\n' +
+ ' `END`KWDlocal`END`PLN a`END`PUN=`END`LIT1`END`PLN\n' +
+ ' `END`KWDlocal`END`PLN b`END`PUN=`END`LIT1`END`PLN\n' +
+ ' `END`KWDwhile`END`PLN `END`KWDtrue`END`PLN `END`PUN;`END' +
+ '`PLN `END`KWDdo`END`PLN\n' +
+ ' echo $a\n' +
+ ' `END`KWDlocal`END`PLN tmp`END`PUN=`END`PLN$a\n' +
+ ' a`END`PUN=`END`PLN$`END`PUN((`END`PLN $a `END`PUN+`END' +
+ '`PLN $b `END`PUN))`END`PLN\n' +
+ ' b`END`PUN=`END`PLN$tmp\n' +
+ ' `END`KWDdone`END`PLN\n' +
+ '`END`PUN}`END`PLN\n' +
+ '\n' +
+ '`END`COM# output the 10th element of the series and halt`END`PLN\n' +
+ 'fib `END`PUN|`END`PLN head `END`PUN-`END`LIT10`END`PLN `END`PUN|`END' +
+ '`PLN tail `END`PUN-`END`LIT1`END'),
+ bash_lang: (
+ '<ol class="linenums">`#`COM#!/bin/bash`END' +
+ '`#1`PLN&nbsp;`END' +
+ '`#2`COM# Fibonacci numbers`END' +
+ '`#3`COM# Writes an infinite series to stdout, one entry per line`END' +
+ '`#4`KWDfunction`END`PLN fib`END`PUN()`END`PLN `END`PUN{`END' +
+ '`#5`PLN `END`KWDlocal`END`PLN a`END`PUN=`END`LIT1`END' +
+ '`#6`PLN `END`KWDlocal`END`PLN b`END`PUN=`END`LIT1`END' +
+ '`#7`PLN `END`KWDwhile`END`PLN true `END`PUN;`END' +
+ '`PLN `END`KWDdo`END' +
+ '`#8`PLN echo $a`END' +
+ '`#9`PLN `END`KWDlocal`END`PLN tmp`END`PUN=`END`PLN$a`END' +
+ '`#0`PLN a`END`PUN=`END`PLN$`END`PUN((`END`PLN $a `END`PUN+`END' +
+ '`PLN $b `END`PUN))`END' +
+ '`#1`PLN b`END`PUN=`END`PLN$tmp`END' +
+ '`#2`PLN `END`KWDdone`END' +
+ '`#3`PUN}`END' +
+ '`#4`PLN&nbsp;`END' +
+ '`#5`COM# output the 10th element of the series and halt`END' +
+ '`#6`PLNfib `END`PUN|`END`PLN `END`PUN/`END`PLNusr`END`PUN/`END`PLNbin`END' +
+ '`PUN/*`END`PLNhead `END`PUN-`END`LIT10`END`PLN `END`PUN|`END' +
+ '`PLN tail `END`PUN-`END`LIT1`END</li></ol>'),
+ C: (
+ '`COM#include`END`PLN `END`STR&lt;stdio.h&gt;`END`PLN\n' +
+ '\n' +
+ '`END`COM/* the n-th fibonacci number.\n' +
+ ' *\/`END`PLN\n' +
+ '`END`KWDunsigned`END`PLN `END`KWDint`END`PLN fib`END`PUN(`END' +
+ '`KWDunsigned`END`PLN `END`KWDint`END`PLN n`END`PUN)`END`PLN `END' +
+ '`PUN{`END`PLN\n' +
+ ' `END`KWDunsigned`END`PLN `END`KWDint`END`PLN a `END`PUN=`END' +
+ '`PLN `END`LIT1`END`PUN,`END`PLN b `END`PUN=`END`PLN `END`LIT1`END' +
+ '`PUN;`END`PLN\n' +
+ ' `END`KWDunsigned`END`PLN `END`KWDint`END`PLN tmp`END`PUN;`END' +
+ '`PLN\n' +
+ ' `END`KWDwhile`END`PLN `END`PUN(--`END`PLNn `END`PUN&gt;=`END' +
+ '`PLN `END`LIT0`END`PUN)`END`PLN `END`PUN{`END`PLN\n' +
+ ' tmp `END`PUN=`END`PLN a`END`PUN;`END`PLN\n' +
+ ' a `END`PUN+=`END`PLN b`END`PUN;`END`PLN\n' +
+ ' b `END`PUN=`END`PLN tmp`END`PUN;`END`PLN\n' +
+ ' `END`PUN}`END`PLN\n' +
+ ' `END`KWDreturn`END`PLN a`END`PUN;`END`PLN\n' +
+ '`END`PUN}`END`PLN\n' +
+ '\n' +
+ 'main`END`PUN()`END`PLN `END`PUN{`END`PLN\n' +
+ ' printf`END`PUN(`END`STR"%u"`END`PUN,`END`PLN fib`END`PUN(`END' +
+ '`LIT10`END`PUN));`END`PLN\n' +
+ '`END`PUN}`END'),
+ C_lang: (
+ '`COM#include`END`PLN `END`STR&lt;stdio.h&gt;`END`PLN\n' +
+ '\n' +
+ '`END`COM/* the n`END<sup>`COMth`END<\/sup>`COM fibonacci number. *\/`END`PLN\n' +
+ '`END`TYPuint32`END`PLN fib`END`PUN(`END' +
+ '`KWDunsigned`END`PLN `END`TYPint`END`PLN n`END`PUN)`END`PLN `END' +
+ '`PUN{`END`PLN\n' +
+ ' `END`TYPuint32`END`PLN a `END`PUN=`END`PLN `END`LIT1`END`PUN,`END' +
+ '`PLN b `END`PUN=`END`PLN `END`LIT1`END`PUN;`END`PLN\n' +
+ ' `END`TYPuint32`END`PLN tmp`END`PUN;`END`PLN\n' +
+ ' `END`KWDwhile`END`PLN `END`PUN(--`END`PLNn `END`PUN&gt;=`END' +
+ '`PLN `END`LIT0`END`PUN)`END`PLN `END`PUN{`END`PLN\n' +
+ ' tmp `END`PUN=`END`PLN a`END`PUN;`END`PLN\n' +
+ ' a `END`PUN+=`END`PLN b`END`PUN;`END`PLN\n' +
+ ' b `END`PUN=`END`PLN tmp`END`PUN;`END`PLN\n' +
+ ' `END`PUN}`END`PLN\n' +
+ ' `END`KWDreturn`END`PLN a`END`PUN;`END`PLN\n' +
+ '`END`PUN}`END`PLN\n' +
+ '\n' +
+ '`END`KWDvoid`END`PLN main`END`PUN()`END`PLN `END`PUN{`END`PLN\n' +
+ ' `END`TYPsize_t`END`PLN size `END`PUN=`END`PLN `END`KWDsizeof`END' +
+ '`PUN(`END`TYPwchar_t`END`PUN);`END`PLN\n' +
+ ' ASSERT_EQ`END`PUN(`END`PLNsize`END`PUN,`END`PLN `END`LIT1`END' +
+ '`PUN);`END`PLN\n' +
+ ' printf`END`PUN(`END`STR"%u"`END`PUN,`END`PLN fib`END`PUN(`END' +
+ '`LIT10`END`PUN));`END`PLN\n' +
+ '`END`PUN}`END`PLN\n' +
+ '\n' +
+ '`END`COM#define`END`PLN ZERO `END`LIT0`END`PLN `END`COM/* a\n' +
+ ' multiline comment *\/`END'),
+ Cpp: (
+ '`COM#include`END`PLN `END`STR&lt;iostream&gt;`END`PLN\n' +
+ '\n' +
+ '`END`KWDusing`END`PLN `END`KWDnamespace`END`PLN std`END`PUN;`END' +
+ '`PLN\n' +
+ '\n' +
+ '`END`COM//! fibonacci numbers with gratuitous use of templates.`END' +
+ '`PLN\n' +
+ '`END`COM//! \\param n an index into the fibonacci series`END`PLN\n' +
+ '`END`COM//! \\param fib0 element 0 of the series`END`PLN\n' +
+ '`END`COM//! \\return the nth element of the fibonacci series`END' +
+ '`PLN\n' +
+ '`END`KWDtemplate`END`PLN `END`PUN&lt;`END`KWDclass`END`PLN T`END' +
+ '`PUN&gt;`END`PLN\n' +
+ 'T fib`END`PUN(`END`KWDunsigned`END`PLN `END`KWDint`END`PLN n`END' +
+ '`PUN,`END`PLN `END`KWDconst`END`PLN T`END`PUN&amp;`END`PLN fib0' +
+ '`END`PUN)`END`PLN `END`PUN{`END`PLN\n' +
+ ' T a`END`PUN(`END`PLNfib0`END`PUN),`END`PLN b`END`PUN(`END' +
+ '`PLNfib0`END`PUN);`END`PLN\n' +
+ ' `END`KWDfor`END`PLN `END`PUN(;`END`PLN n`END`PUN;`END' +
+ '`PLN `END`PUN--`END`PLNn`END`PUN)`END`PLN `END`PUN{`END`PLN\n' +
+ ' T tmp`END`PUN(`END`PLNa`END`PUN);`END`PLN\n' +
+ ' a `END`PUN+=`END`PLN b`END`PUN;`END`PLN\n' +
+ ' b `END`PUN=`END`PLN tmp`END`PUN;`END`PLN\n' +
+ ' `END`PUN}`END`PLN\n' +
+ ' `END`KWDreturn`END`PLN a`END`PUN;`END`PLN\n' +
+ '`END`PUN}`END`PLN\n' +
+ '\n' +
+ '`END`KWDint`END`PLN main`END`PUN(`END`KWDint`END`PLN argc`END' +
+ '`PUN,`END`PLN `END`KWDchar`END`PLN `END`PUN**`END`PLNargv`END' +
+ '`PUN)`END`PLN `END`PUN{`END`PLN\n' +
+ ' cout `END`PUN&lt;&lt;`END`PLN fib`END`PUN(`END`LIT10`END' +
+ '`PUN,`END`PLN `END`LIT1U`END`PUN);`END`PLN\n' +
+ '`END`PUN}`END'),
+
+ Cpp_lang: (
+ '`COM#include`END`PLN `END`STR&lt;iostream&gt;`END`PLN\n' +
+ '\n' +
+ '`END`KWDusing`END`PLN `END`KWDnamespace`END`PLN std`END`PUN;`END' +
+ '`PLN\n' +
+ '\n' +
+ '`END`COM//! fibonacci numbers with gratuitous use of templates.`END' +
+ '`PLN\n' +
+ '`END`COM//! \\param n an index into the fibonacci series`END`PLN\n' +
+ '`END`COM//! \\param fib0 element 0 of the series`END`PLN\n' +
+ '`END`COM//! \\return the nth element of the fibonacci series`END' +
+ '`PLN\n' +
+ '`END`KWDtemplate`END`PLN `END`PUN&lt;`END`KWDclass`END`PLN T`END' +
+ '`PUN&gt;`END`PLN\n' +
+ 'T fib`END`PUN(`END`TYPint`END`PLN n`END' +
+ '`PUN,`END`PLN `END`KWDconst`END`PLN T`END`PUN&amp;`END`PLN fib0' +
+ '`END`PUN)`END`PLN `END`PUN{`END`PLN\n' +
+ ' T a`END`PUN(`END`PLNfib0`END`PUN),`END`PLN b`END`PUN(`END' +
+ '`PLNfib0`END`PUN);`END`PLN\n' +
+ ' `END`KWDwhile`END`PLN `END`PUN(--`END`PLNn `END`PUN&gt;=`END' +
+ '`PLN `END`LIT0`END`PUN)`END`PLN `END`PUN{`END`PLN\n' +
+ ' T tmp`END`PUN(`END`PLNa`END`PUN);`END`PLN\n' +
+ ' a `END`PUN+=`END`PLN b`END`PUN;`END`PLN\n' +
+ ' b `END`PUN=`END`PLN tmp`END`PUN;`END`PLN\n' +
+ ' `END`PUN}`END`PLN\n' +
+ ' `END`KWDreturn`END`PLN a`END`PUN;`END`PLN\n' +
+ '`END`PUN}`END`PLN\n' +
+ '\n' +
+ '`END`TYPint`END`PLN main`END`PUN(`END`TYPint`END`PLN argc`END' +
+ '`PUN,`END`PLN `END`KWDchar`END`PLN `END`PUN**`END`PLNargv`END' +
+ '`PUN)`END`PLN `END`PUN{`END`PLN\n' +
+ ' cout `END`PUN&lt;&lt;`END`PLN fib`END`PUN(`END`LIT10`END' +
+ '`PUN,`END`PLN `END`LIT1U`END`PUN);`END`PLN\n' +
+ '`END`PUN}`END'),
+
+ java: (
+ '`KWDpackage`END`PLN foo`END`PUN;`END`PLN\n' +
+ '\n' +
+ '`END`KWDimport`END`PLN java`END`PUN.`END`PLNutil`END`PUN.`END' +
+ '`TYPIterator`END`PUN;`END`PLN\n' +
+ '\n' +
+ '`END`COM/**\n' +
+ ' * the fibonacci series implemented as an Iterable.\n' +
+ ' *\/`END`PLN\n' +
+ '`END`KWDpublic`END`PLN `END`KWDfinal`END`PLN `END`KWDclass`END' +
+ '`PLN `END`TYPFibonacci`END`PLN `END`KWDimplements`END`PLN `END' +
+ '`TYPIterable`END`PUN&lt;`END`TYPInteger`END`PUN&gt;`END`PLN `END`' +
+ 'PUN{`END`PLN\n' +
+ ' `END' +
+ '`COM/** the next and previous members of the series. *\/`END' +
+ '`PLN\n' +
+ ' `END`KWDprivate`END`PLN `END`KWDint`END`PLN a `END`PUN=`END' +
+ '`PLN `END`LIT1`END`PUN,`END`PLN b `END`PUN=`END`PLN `END`LIT1`END' +
+ '`PUN;`END`PLN\n' +
+ '\n' +
+ ' `END`LIT@Override`END`PLN\n' +
+ ' `END`KWDpublic`END`PLN `END`TYPIterator`END`PUN&lt;`END' +
+ '`TYPInteger`END`PUN&gt;`END`PLN iterator`END`PUN()`END`PLN `END' +
+ '`PUN{`END`PLN\n' +
+ ' `END`KWDreturn`END`PLN `END`KWDnew`END`PLN `END' +
+ '`TYPIterator`END`PUN&lt;`END`TYPInteger`END`PUN&gt;()`END`PLN `END' +
+ '`PUN{`END`PLN\n' +
+ ' `END`COM/** the series is infinite. *\/`END' +
+ '`PLN\n' +
+ ' `END`KWDpublic`END`PLN `END`KWDboolean`END' +
+ '`PLN hasNext`END`PUN()`END`PLN `END`PUN{`END`PLN `END' +
+ '`KWDreturn`END`PLN `END`KWDtrue`END`PUN;`END`PLN `END`PUN}`END' +
+ '`PLN\n' +
+ ' `END`KWDpublic`END`PLN `END`TYPInteger`END' +
+ '`PLN `END`KWDnext`END`PUN()`END`PLN `END`PUN{`END`PLN\n' +
+ ' `END`KWDint`END`PLN tmp `END`PUN=`END' +
+ '`PLN a`END`PUN;`END`PLN\n' +
+ ' a `END`PUN+=`END`PLN b`END`PUN;`END' +
+ '`PLN\n' +
+ ' b `END`PUN=`END`PLN tmp`END`PUN;`END' +
+ '`PLN\n' +
+ ' `END`KWDreturn`END`PLN a`END`PUN;`END' +
+ '`PLN\n' +
+ ' `END`PUN}`END`PLN\n' +
+ ' `END`KWDpublic`END`PLN `END`KWDvoid`END' +
+ '`PLN remove`END`PUN()`END`PLN `END`PUN{`END`PLN `END`KWDthrow`END' +
+ '`PLN `END`KWDnew`END`PLN `END' +
+ '`TYPUnsupportedOperationException`END`PUN();`END`PLN `END' +
+ '`PUN}`END`PLN\n' +
+ ' `END`PUN};`END`PLN\n' +
+ ' `END`PUN}`END`PLN\n' +
+ '\n' +
+ ' `END`COM/**\n' +
+ ' * the n&lt;sup&gt;th&lt;/sup&gt; element of the given ' +
+ 'series.\n' +
+ ' * @throws NoSuchElementException if there are less than ' +
+ 'n elements in the\n' +
+ ' * given Iterable\'s {@link Iterable#iterator ' +
+ 'iterator}.\n' +
+ ' *\/`END`PLN\n' +
+ ' `END`KWDpublic`END`PLN `END`KWDstatic`END`PLN `END' +
+ '`PUN&lt;`END`PLNT`END`PUN&gt;`END`PLN\n' +
+ ' T nth`END`PUN(`END`KWDint`END`PLN n`END`PUN,`END`PLN `END' +
+ '`TYPIterable`END`PUN&lt;`END`PLNT`END`PUN&gt;`END' +
+ '`PLN iterable`END`PUN)`END`PLN `END`PUN{`END`PLN\n' +
+ ' `END`TYPIterator`END`PUN&lt;?`END`PLN `END' +
+ '`KWDextends`END`PLN T`END`PUN&gt;`END`PLN it `END`PUN=`END' +
+ '`PLN iterable`END`PUN.`END`PLNiterator`END`PUN();`END`PLN\n' +
+ ' `END`KWDwhile`END`PLN `END`PUN(--`END`PLNn `END' +
+ '`PUN&gt;`END`PLN `END`LIT0`END`PUN)`END`PLN `END`PUN{`END`PLN\n' +
+ ' it`END`PUN.`END`KWDnext`END`PUN();`END`PLN\n' +
+ ' `END`PUN}`END`PLN\n' +
+ ' `END`KWDreturn`END`PLN it`END`PUN.`END`KWDnext`END' +
+ '`PUN();`END`PLN\n' +
+ ' `END`PUN}`END`PLN\n' +
+ '\n' +
+ ' `END`KWDpublic`END`PLN `END`KWDstatic`END`PLN `END`KWDvoid`END' +
+ '`PLN main`END`PUN(`END`TYPString`END`PUN[]`END`PLN args`END' +
+ '`PUN)`END`PLN `END`PUN{`END`PLN\n' +
+ ' `END`TYPSystem`END`PUN.`END`KWDout`END`PUN.`END' +
+ '`KWDprint`END`PUN(`END`PLNnth`END`PUN(`END`LIT10`END`PUN,`END' +
+ '`PLN `END`KWDnew`END`PLN `END`TYPFibonacci`END`PUN()));`END' +
+ '`PLN\n' +
+ ' `END`PUN}`END`PLN\n' +
+ '`END`PUN}`END'),
+ java_lang: (
+ '<ol class="linenums"><li class="L1" value="12">' +
+ '`KWDpackage`END`PLN foo`END`PUN;`END' +
+ '`#2`PLN&nbsp;`END' +
+ '`#3`KWDimport`END`PLN java`END`PUN.`END`PLNutil`END`PUN.`END' +
+ '`TYPIterator`END`PUN;`END' +
+ '`#4`PLN&nbsp;`END' +
+ '`#5`COM/**`END' +
+ '`#6`COM * the fibonacci series implemented as an Iterable.`END' +
+ '`#7`COM *\/`END' +
+ '`#8`KWDpublic`END`PLN `END`KWDfinal`END`PLN `END`KWDclass`END' +
+ '`PLN `END`TYPFibonacci`END`PLN `END`KWDimplements`END`PLN `END' +
+ '`TYPIterable`END`PUN&lt;`END`TYPInteger`END`PUN&gt;`END`PLN `END`' +
+ 'PUN{`END' +
+ '`#9`PLN `END' +
+ '`COM/** the next and previous members of the series. *\/`END' +
+ '' +
+ '`#0`PLN `END`KWDprivate`END`PLN `END`KWDint`END`PLN a `END`PUN=`END' +
+ '`PLN `END`LIT1`END`PUN,`END`PLN b `END`PUN=`END`PLN `END`LIT1`END' +
+ '`PUN;`END' +
+ '`#1`PLN&nbsp;`END' +
+ '`#2`PLN `END`LIT@Override`END' +
+ '`#3`PLN `END`KWDpublic`END`PLN `END`TYPIterator`END`PUN&lt;`END' +
+ '`TYPInteger`END`PUN&gt;`END`PLN iterator`END`PUN()`END`PLN `END' +
+ '`PUN{`END' +
+ '`#4`PLN `END`KWDreturn`END`PLN `END`KWDnew`END`PLN `END' +
+ '`TYPIterator`END`PUN&lt;`END`TYPInteger`END`PUN&gt;()`END`PLN `END' +
+ '`PUN{`END' +
+ '`#5`PLN `END`COM/** the series is infinite. *\/`END' +
+ '' +
+ '`#6`PLN `END`KWDpublic`END`PLN `END`KWDboolean`END' +
+ '`PLN hasNext`END`PUN()`END`PLN `END`PUN{`END`PLN `END' +
+ '`KWDreturn`END`PLN `END`KWDtrue`END`PUN;`END`PLN `END`PUN}`END' +
+ '' +
+ '`#7`PLN `END`KWDpublic`END`PLN `END`TYPInteger`END' +
+ '`PLN next`END`PUN()`END`PLN `END`PUN{`END' +
+ '`#8`PLN `END`KWDint`END`PLN tmp `END`PUN=`END' +
+ '`PLN a`END`PUN;`END' +
+ '`#9`PLN a `END`PUN+=`END`PLN b`END`PUN;`END' +
+ '' +
+ '`#0`PLN b `END`PUN=`END`PLN tmp`END`PUN;`END' +
+ '' +
+ '`#1`PLN `END`KWDreturn`END`PLN a`END`PUN;`END' +
+ '' +
+ '`#2`PLN `END`PUN}`END' +
+ '`#3`PLN `END`KWDpublic`END`PLN `END`KWDvoid`END' +
+ '`PLN remove`END`PUN()`END`PLN `END`PUN{`END`PLN `END`KWDthrow`END' +
+ '`PLN `END`KWDnew`END`PLN `END' +
+ '`TYPUnsupportedOperationException`END`PUN();`END`PLN `END' +
+ '`PUN}`END' +
+ '`#4`PLN `END`PUN};`END' +
+ '`#5`PLN `END`PUN}`END' +
+ '`#6`PLN&nbsp;`END' +
+ '`#7`PLN `END`COM/**`END' +
+ '`#8`COM * the n&lt;sup&gt;th&lt;/sup&gt; element of the given ' +
+ 'series.`END' +
+ '`#9`COM * @throws NoSuchElementException if there are less than ' +
+ 'n elements in the`END' +
+ '`#0`COM * given Iterable\'s {@link Iterable#iterator ' +
+ 'iterator}.`END' +
+ '`#1`COM *\/`END' +
+ '`#2`PLN `END`KWDpublic`END`PLN `END`KWDstatic`END`PLN `END' +
+ '`PUN&lt;`END`PLNT`END`PUN&gt;`END' +
+ '`#3`PLN T nth`END`PUN(`END`KWDint`END`PLN n`END`PUN,`END`PLN `END' +
+ '`TYPIterable`END`PUN&lt;`END`PLNT`END`PUN&gt;`END' +
+ '`PLN iterable`END`PUN)`END`PLN `END`PUN{`END' +
+ '`#4`PLN `END`TYPIterator`END`PUN&lt;?`END`PLN `END' +
+ '`KWDextends`END`PLN T`END`PUN&gt;`END`PLN in `END`PUN=`END' +
+ '`PLN iterable`END`PUN.`END`PLNiterator`END`PUN();`END' +
+ '`#5`PLN `END`KWDwhile`END`PLN `END`PUN(--`END`PLNn `END' +
+ '`PUN&gt;`END`PLN `END`LIT0`END`PUN)`END`PLN `END`PUN{`END' +
+ '`#6`PLN in`END`PUN.`END`PLNnext`END`PUN();`END' +
+ '`#7`PLN `END`PUN}`END' +
+ '`#8`PLN `END`KWDreturn`END`PLN in`END`PUN.`END`PLNnext`END' +
+ '`PUN();`END' +
+ '`#9`PLN `END`PUN}`END' +
+ '`#0`PLN&nbsp;`END' +
+ '`#1`PLN `END`KWDpublic`END`PLN `END`KWDstatic`END`PLN `END`KWDvoid`END' +
+ '`PLN main`END`PUN(`END`TYPString`END`PUN[]`END`PLN args`END' +
+ '`PUN)`END`PLN `END`PUN{`END' +
+ '`#2`PLN `END`TYPSystem`END`PUN.`END`PLNout`END`PUN.`END' +
+ '`PLNprint`END`PUN(`END`PLNnth`END`PUN(`END`LIT10`END`PUN,`END' +
+ '`PLN `END`KWDnew`END`PLN `END`TYPFibonacci`END`PUN()));`END' +
+ '' +
+ '`#3`PLN `END`PUN}`END' +
+ '`#4`PUN}`END' +
+ '`#5`PLN&nbsp;`END' +
+ '`#6`PUN#`END`PLN not a java comment`END' +
+ '`#7`PUN#`END`PLN not keywords`END`PUN:`END' +
+ '`PLN static_cast and namespace`END</li></ol>'),
+ javascript: (
+ '`COM/**\n' +
+ ' * nth element in the fibonacci series.\n' +
+ ' * @param n &gt;= 0\n' +
+ ' * @return the nth element, &gt;= 0.\n' +
+ ' *\/`END`PLN\n' +
+ '`END`KWDfunction`END`PLN fib`END`PUN(`END`PLNn`END`PUN)`END`PLN `END' +
+ '`PUN{`END`PLN\n' +
+ ' `END`KWDvar`END`PLN a `END`PUN=`END`PLN `END`LIT1`END`PUN,`END' +
+ '`PLN b `END`PUN=`END`PLN `END`LIT1`END`PUN;`END`PLN\n' +
+ ' `END`KWDvar`END`PLN tmp`END`PUN;`END`PLN\n' +
+ ' `END`KWDwhile`END`PLN `END`PUN(--`END`PLNn `END`PUN&gt;=`END' +
+ '`PLN `END`LIT0`END`PUN)`END`PLN `END`PUN{`END`PLN\n' +
+ ' tmp `END`PUN=`END`PLN a`END`PUN;`END`PLN\n' +
+ ' a `END`PUN+=`END`PLN b`END`PUN;`END`PLN\n' +
+ ' b `END`PUN=`END`PLN tmp`END`PUN;`END`PLN\n' +
+ ' `END`PUN}`END`PLN\n' +
+ ' `END`KWDreturn`END`PLN a`END`PUN;`END`PLN\n' +
+ '`END`PUN}`END`PLN\n' +
+ '\n' +
+ 'document`END`PUN.`END`PLNwrite`END`PUN(`END`PLNfib`END`PUN(`END' +
+ '`LIT10`END`PUN));`END'),
+ perl: (
+ '`COM#!/usr/bin/perl`END`PLN\n' +
+ '\n' +
+ '`END`KWDuse`END`PLN strict`END`PUN;`END`PLN\n' +
+ '`END`KWDuse`END`PLN integer`END`PUN;`END`PLN\n' +
+ '\n' +
+ '`END`COM# the nth element of the fibonacci series`END`PLN\n' +
+ '`END`COM# param n - an int &gt;= 0`END`PLN\n' +
+ '`END`COM# return an int &gt;= 0`END`PLN\n' +
+ '`END`KWDsub`END`PLN fib`END`PUN(`END`PLN$`END`PUN)`END`PLN `END' +
+ '`PUN{`END`PLN\n' +
+ ' `END`KWDmy`END`PLN $n `END`PUN=`END`PLN shift`END`PUN,`END`PLN ' +
+ '$a `END`PUN=`END`PLN `END`LIT1`END`PUN,`END`PLN $b `END' +
+ '`PUN=`END`PLN `END`LIT1`END`PUN;`END`PLN\n' +
+ ' `END`PUN(`END`PLN$a`END`PUN,`END`PLN $b`END`PUN)`END' +
+ '`PLN `END`PUN=`END`PLN `END`PUN(`END`PLN$a `END`PUN+`END' +
+ '`PLN $b`END`PUN,`END`PLN $a`END`PUN)`END`PLN `END`KWDuntil`END' +
+ '`PLN `END`PUN(--`END`PLN$n `END`PUN&lt;`END`PLN `END`LIT0`END' +
+ '`PUN);`END`PLN\n' +
+ ' `END`KWDreturn`END`PLN $a`END`PUN;`END`PLN\n' +
+ '`END`PUN}`END`PLN\n' +
+ '\n' +
+ '`END`KWDprint`END`PLN fib`END`PUN(`END`LIT10`END`PUN);`END'),
+ python: (
+ '`COM#!/usr/bin/python2.4`END`PLN\n' +
+ '\n' +
+ '`END`KWDdef`END`PLN fib`END`PUN():`END`PLN\n' +
+ ' `END`STR\'\'\'\n' +
+ ' a generator that produces the elements of the fibonacci series' +
+ '\n' +
+ ' \'\'\'`END`PLN\n' +
+ '\n' +
+ ' a `END`PUN=`END`PLN `END`LIT1`END`PLN\n' +
+ ' b `END`PUN=`END`PLN `END`LIT1`END`PLN\n' +
+ ' `END`KWDwhile`END`PLN `END`KWDTrue`END`PUN:`END`PLN\n' +
+ ' a`END`PUN,`END`PLN b `END`PUN=`END`PLN a `END`PUN+`END' +
+ '`PLN b`END`PUN,`END`PLN a\n' +
+ ' `END`KWDyield`END`PLN a\n' +
+ '\n' +
+ '`END`KWDdef`END`PLN nth`END`PUN(`END`PLNseries`END`PUN,`END`PLN n`END' +
+ '`PUN):`END`PLN\n' +
+ ' `END`STR\'\'\'\n' +
+ ' returns the nth element of a series,\n' +
+ ' consuming the earlier elements of the series\n' +
+ ' \'\'\'`END`PLN\n' +
+ '\n' +
+ ' `END`KWDfor`END`PLN x `END`KWDin`END`PLN series`END`PUN:`END' +
+ '`PLN\n' +
+ ' n `END`PUN=`END`PLN n `END`PUN-`END`PLN `END`LIT1`END' +
+ '`PLN\n' +
+ ' `END`KWDif`END`PLN n `END`PUN&lt;=`END`PLN `END' +
+ '`LIT0`END`PUN:`END`PLN `END`KWDreturn`END`PLN x\n' +
+ '\n' +
+ '`END`KWDprint`END`PLN nth`END`PUN(`END`PLNfib`END`PUN(),`END`PLN `END' +
+ '`LIT10`END`PUN)`END'),
+ python_lang: (
+ '`COM#!/usr/bin/python2.4`END`PLN\n' +
+ '\n' +
+ '`END`KWDdef`END`PLN fib`END`PUN():`END`PLN\n' +
+ ' `END`STR\'\'\'\n' +
+ ' a generator that produces the fibonacci series\'s elements' +
+ '\n' +
+ ' \'\'\'`END`PLN\n' +
+ '\n' +
+ ' a `END`PUN=`END`PLN `END`LIT1`END`PLN\n' +
+ ' b `END`PUN=`END`PLN `END`LIT1`END`PLN\n' +
+ ' `END`KWDwhile`END`PLN `END`KWDTrue`END`PUN:`END`PLN\n' +
+ ' a`END`PUN,`END`PLN b `END`PUN=`END`PLN a `END`PUN+`END' +
+ '`PLN b`END`PUN,`END`PLN a\n' +
+ ' `END`KWDyield`END`PLN a\n' +
+ '\n' +
+ '`END`KWDdef`END`PLN nth`END`PUN(`END`PLNseries`END`PUN,`END`PLN n`END' +
+ '`PUN):`END`PLN\n' +
+ ' `END`STR\'\'\'\n' +
+ ' returns the nth element of a series,\n' +
+ ' consuming the series\' earlier elements.\n' +
+ ' \'\'\'`END`PLN\n' +
+ '\n' +
+ ' `END`KWDfor`END`PLN x `END`KWDin`END`PLN series`END`PUN:`END' +
+ '`PLN\n' +
+ ' n `END`PUN-=`END`PLN `END`LIT1`END' +
+ '`PLN\n' +
+ ' `END`KWDif`END`PLN n `END`PUN&lt;=`END`PLN `END' +
+ '`LIT0`END`PUN:`END`PLN `END`KWDreturn`END`PLN x\n' +
+ '\n' +
+ '`END`KWDprint`END`PLN nth`END`PUN(`END`PLNfib`END`PUN(),`END`PLN `END' +
+ '`LIT10`END`PUN)`END`PLN\n' +
+ '\n' +
+ '`END`PUN/*`END`PLN `END`KWDnot`END`PLN a comment `END`KWDand`END' +
+ '`PLN `END`KWDnot`END`PLN keywords`END`PUN:`END' +
+ '`PLN null char true `END`PUN*\/`END'),
+ sql_lang: (
+ '`COM/* A multi-line\n' +
+ ' * comment *\/`END`PLN\n' +
+ '`END`STR\'Another string /* Isn\\\'t a comment\'`END`PUN,`END`PLN\n' +
+ '`END`STR"A string *\/"`END`PLN\n' +
+ '`END`COM-- A line comment`END`PLN\n' +
+ '`END`KWDSELECT`END`PLN `END`PUN*`END`PLN `END`KWDFROM`END' +
+ '`PLN users `END`KWDWHERE`END`PLN id `END`KWDIN`END`PLN `END' +
+ '`PUN(`END`LIT1`END`PUN,`END`PLN `END`LIT2.0`END`PUN,`END`PLN `END' +
+ '`LIT+30e-1`END`PUN);`END`PLN\n' +
+ '`END`COM-- keywords are case-insensitive.`END`PLN\n' +
+ '`END`COM-- Note: user-table is a single identifier, not a pair of' +
+ ' keywords`END`PLN\n' +
+ '`END`KWDselect`END`PLN `END`PUN*`END`PLN `END`KWDfrom`END' +
+ '`PLN user-table `END`KWDwhere`END`PLN id `END`KWDin`END`PLN `END' +
+ '`PUN(`END`PLNx`END`PUN,`END`PLN y`END`PUN,`END`PLN z`END`PUN);`END'
+ ),
+ xml: (
+ '`DEC&lt;!DOCTYPE series PUBLIC "fibonacci numbers"&gt;`END`PLN\n' +
+ '\n' +
+ '`END`TAG&lt;series.root`END`PLN `END`ATNbase`END`PUN=`END' +
+ '`ATV"1"`END`PLN `END' +
+ '`ATNstep`END`PUN=`END`ATV"s(n-2) + s(n-1)"`END`TAG&gt;`END' +
+ '`PLN\n' +
+ ' `END`TAG&lt;element`END`PLN `END`ATNi`END`PUN=`END' +
+ '`ATV"0"`END' +
+ '`TAG&gt;`END`PLN1`END`TAG&lt;/element&gt;`END' +
+ '`PLN\n' +
+ ' `END`TAG&lt;element`END`PLN `END`ATNi`END`PUN=`END' +
+ '`ATV"1"`END' +
+ '`TAG&gt;`END`PLN1`END`TAG&lt;/element&gt;`END' +
+ '`PLN\n' +
+ ' `END`TAG&lt;element`END`PLN `END`ATNi`END`PUN=`END' +
+ '`ATV"2"`END' +
+ '`TAG&gt;`END`PLN2`END`TAG&lt;/element&gt;`END' +
+ '`PLN\n' +
+ ' `END`TAG&lt;element`END`PLN `END`ATNi`END`PUN=`END' +
+ '`ATV"3"`END' +
+ '`TAG&gt;`END`PLN3`END`TAG&lt;/element&gt;`END' +
+ '`PLN\n' +
+ ' `END`TAG&lt;element`END`PLN `END`ATNi`END`PUN=`END' +
+ '`ATV"4"`END' +
+ '`TAG&gt;`END`PLN5`END`TAG&lt;/element&gt;`END' +
+ '`PLN\n' +
+ ' `END`TAG&lt;element`END`PLN `END`ATNi`END`PUN=`END' +
+ '`ATV"5"`END' +
+ '`TAG&gt;`END`PLN8`END`TAG&lt;/element&gt;`END' +
+ '`PLN\n' +
+ ' ...\n' +
+ '`END`TAG&lt;/series.root&gt;`END'),
+ html: (
+ '`TAG&lt;html&gt;`END`PLN\n' +
+ ' `END`TAG&lt;head&gt;`END`PLN\n' +
+ ' `END`TAG&lt;title&gt;`END`PLNFibonacci number`END' +
+ '`TAG&lt;/title&gt;`END`PLN\n' +
+ ' `END`TAG&lt;style&gt;`END`COM&lt;!--`END' +
+ '`PLN BODY `END`PUN{`END`PLN `END`KWDtext-decoration`END`PUN:`END' +
+ '`PLN blink `END`PUN}`END`PLN `END`COM--&gt;`END`TAG&lt;/' +
+ 'style&gt;`END`PLN\n' +
+ ' `END`TAG&lt;script`END`PLN `END`ATNsrc`END`PUN=`END' +
+ '`ATV"foo.js"`END`TAG&gt;&lt;/script&gt;`END`PLN\n' +
+ ' `END`TAG&lt;script`END`PLN `END`ATNsrc`END`PUN=`END' +
+ '`ATV"bar.js"`END`TAG&gt;&lt;/script&gt;`END`PLN\n' +
+ ' `END`TAG&lt;/head&gt;`END`PLN\n' +
+ ' `END`TAG&lt;body&gt;`END`PLN\n' +
+ ' `END`TAG&lt;noscript&gt;`END`PLN\n' +
+ ' `END`TAG&lt;dl&gt;`END`PLN\n' +
+ ' `END`TAG&lt;dt&gt;`END' +
+ '`PLNFibonacci numbers`END`TAG&lt;/dt&gt;`END' +
+ '`PLN\n' +
+ ' `END`TAG&lt;dd&gt;`END`PLN1`END' +
+ '`TAG&lt;/dd&gt;`END`PLN\n' +
+ ' `END`TAG&lt;dd&gt;`END`PLN1`END' +
+ '`TAG&lt;/dd&gt;`END`PLN\n' +
+ ' `END`TAG&lt;dd&gt;`END`PLN2`END' +
+ '`TAG&lt;/dd&gt;`END`PLN\n' +
+ ' `END`TAG&lt;dd&gt;`END`PLN3`END' +
+ '`TAG&lt;/dd&gt;`END`PLN\n' +
+ ' `END`TAG&lt;dd&gt;`END`PLN5`END' +
+ '`TAG&lt;/dd&gt;`END`PLN\n' +
+ ' `END`TAG&lt;dd&gt;`END`PLN8`END' +
+ '`TAG&lt;/dd&gt;`END`PLN\n' +
+ ' &amp;hellip;\n' +
+ ' `END`TAG&lt;/dl&gt;`END`PLN\n' +
+ ' `END`TAG&lt;/noscript&gt;`END`PLN\n' +
+ '\n' +
+ ' `END`TAG&lt;script`END`PLN `END`ATNtype`END`PUN=`END' +
+ '`ATV"text/javascript"`END`TAG&gt;`END`PUN&lt;!--`END`PLN\n' +
+ '`END`KWDfunction`END`PLN fib`END`PUN(`END`PLNn`END`PUN)`END`PLN `END' +
+ '`PUN{`END`PLN\n' +
+ ' `END`KWDvar`END`PLN a `END`PUN=`END`PLN `END`LIT1`END`PUN,`END' +
+ '`PLN b `END`PUN=`END`PLN `END`LIT1`END`PUN;`END`PLN\n' +
+ ' `END`KWDvar`END`PLN tmp`END`PUN;`END`PLN\n' +
+ ' `END`KWDwhile`END`PLN `END`PUN(--`END`PLNn `END`PUN&gt;=`END' +
+ '`PLN `END`LIT0`END`PUN)`END`PLN `END`PUN{`END`PLN\n' +
+ ' tmp `END`PUN=`END`PLN a`END`PUN;`END`PLN\n' +
+ ' a `END`PUN+=`END`PLN b`END`PUN;`END`PLN\n' +
+ ' b `END`PUN=`END`PLN tmp`END`PUN;`END`PLN\n' +
+ ' `END`PUN}`END`PLN\n' +
+ ' `END`KWDreturn`END`PLN a`END`PUN;`END`PLN\n' +
+ '`END`PUN}`END`PLN\n' +
+ '\n' +
+ 'document`END`PUN.`END`PLNwriteln`END`PUN(`END`PLNfib`END`PUN(`END' +
+ '`LIT10`END`PUN));`END`PLN\n' +
+ '`END`COM// --&gt;`END`PLN\n' +
+ ' `END`TAG&lt;/script&gt;`END`PLN\n' +
+ ' `END`TAG&lt;/body&gt;`END`PLN\n' +
+ '`END`TAG&lt;/html&gt;`END'),
+ html_lang: (
+ '`PLNFibonacci Numbers\n' +
+ '\n' +
+ '`END`TAG&lt;noscript&gt;`END`PLN\n' +
+ ' `END`TAG&lt;dl`END`PLN `END`ATNstyle`END`PUN=`END' +
+ '`ATV"`END`KWDlist-style`END`PUN:`END`PLN disc`END`ATV"`END' +
+ '`TAG&gt;`END`PLN\n' +
+ ' `END`TAG&lt;dt&gt;`END' +
+ '`PLNFibonacci numbers`END`TAG&lt;/dt&gt;`END`PLN\n' +
+ ' `END`TAG&lt;dd&gt;`END`PLN1`END`TAG&lt;/dd&gt;`END' +
+ '`PLN\n' +
+ ' `END`TAG&lt;dd&gt;`END`PLN1`END`TAG&lt;/dd&gt;`END' +
+ '`PLN\n' +
+ ' `END`TAG&lt;dd&gt;`END`PLN2`END`TAG&lt;/dd&gt;`END' +
+ '`PLN\n' +
+ ' `END`TAG&lt;dd&gt;`END`PLN3`END`TAG&lt;/dd&gt;`END' +
+ '`PLN\n' +
+ ' `END`TAG&lt;dd&gt;`END`PLN5`END`TAG&lt;/dd&gt;`END' +
+ '`PLN\n' +
+ ' `END`TAG&lt;dd&gt;`END`PLN8`END`TAG&lt;/dd&gt;`END' +
+ '`PLN\n' +
+ ' &amp;hellip;\n' +
+ ' `END`TAG&lt;/dl&gt;`END`PLN\n' +
+ '`END`TAG&lt;/noscript&gt;`END`PLN\n' +
+ '\n' +
+ '`END`TAG&lt;script`END`PLN `END`ATNtype`END`PUN=`END' +
+ '`ATV"text/javascript"`END`TAG&gt;`END`PUN&lt;!--`END`PLN\n' +
+ '`END`KWDfunction`END`PLN fib`END`PUN(`END`PLNn`END`PUN)`END`PLN `END' +
+ '`PUN{`END`PLN\n' +
+ ' `END`KWDvar`END`PLN a `END`PUN=`END`PLN `END`LIT1`END`PUN,`END' +
+ '`PLN b `END`PUN=`END`PLN `END`LIT1`END`PUN;`END`PLN\n' +
+ ' `END`KWDvar`END`PLN tmp`END`PUN;`END`PLN\n' +
+ ' `END`KWDwhile`END`PLN `END`PUN(--`END`PLNn `END`PUN&gt;=`END' +
+ '`PLN `END`LIT0`END`PUN)`END`PLN `END`PUN{`END`PLN\n' +
+ ' tmp `END`PUN=`END`PLN a`END`PUN;`END`PLN\n' +
+ ' a `END`PUN+=`END`PLN b`END`PUN;`END`PLN\n' +
+ ' b `END`PUN=`END`PLN tmp`END`PUN;`END`PLN\n' +
+ ' `END`PUN}`END`PLN\n' +
+ ' `END`KWDreturn`END`PLN a`END`PUN;`END`PLN\n' +
+ '`END`PUN}`END`PLN\n' +
+ '\n' +
+ 'document`END`PUN.`END`PLNwriteln`END`PUN(`END`PLNfib`END`PUN(`END' +
+ '`LIT10`END`PUN));`END`PLN\n' +
+ '`END`COM// --&gt;`END`PLN\n' +
+ '`END`TAG&lt;/script&gt;`END'),
+ htmlXmp: (
+ '`TAG&lt;html&gt;`END`PLN\n' +
+ ' `END`TAG&lt;head&gt;`END`PLN\n' +
+ ' `END`TAG&lt;title&gt;`END`PLNFibonacci number`END' +
+ '`TAG&lt;/title&gt;`END`PLN\n' +
+ ' `END`TAG&lt;/head&gt;`END`PLN\n' +
+ ' `END`TAG&lt;body&gt;`END`PLN\n' +
+ ' `END`TAG&lt;noscript&gt;`END`PLN\n' +
+ ' `END`TAG&lt;dl&gt;`END`PLN\n' +
+ ' `END`TAG&lt;dt&gt;`END' +
+ '`PLNFibonacci numbers`END`TAG&lt;/dt&gt;`END`PLN\n' +
+ ' `END`TAG&lt;dd&gt;`END`PLN1`END' +
+ '`TAG&lt;/dd&gt;`END`PLN\n' +
+ ' `END`TAG&lt;dd&gt;`END`PLN1`END' +
+ '`TAG&lt;/dd&gt;`END`PLN\n' +
+ ' `END`TAG&lt;dd&gt;`END`PLN2`END' +
+ '`TAG&lt;/dd&gt;`END`PLN\n' +
+ ' `END`TAG&lt;dd&gt;`END`PLN3`END' +
+ '`TAG&lt;/dd&gt;`END`PLN\n' +
+ ' `END`TAG&lt;dd&gt;`END`PLN5`END' +
+ '`TAG&lt;/dd&gt;`END`PLN\n' +
+ ' `END`TAG&lt;dd&gt;`END`PLN8`END' +
+ '`TAG&lt;/dd&gt;`END`PLN\n' +
+ ' &amp;hellip;\n' +
+ ' `END`TAG&lt;/dl&gt;`END`PLN\n' +
+ ' `END`TAG&lt;/noscript&gt;`END`PLN\n' +
+ '\n' +
+ ' `END`TAG&lt;script`END`PLN `END`ATNtype`END`PUN=`END' +
+ '`ATV"text/javascript"`END`TAG&gt;`END`PUN&lt;!--`END`PLN\n' +
+ '`END`KWDfunction`END`PLN fib`END`PUN(`END`PLNn`END`PUN)`END`PLN `END' +
+ '`PUN{`END`PLN\n' +
+ ' `END`KWDvar`END`PLN a `END`PUN=`END`PLN `END`LIT1`END`PUN,`END' +
+ '`PLN b `END`PUN=`END`PLN `END`LIT1`END`PUN;`END`PLN\n' +
+ ' `END`KWDvar`END`PLN tmp`END`PUN;`END`PLN\n' +
+ ' `END`KWDwhile`END`PLN `END`PUN(--`END`PLNn `END`PUN&gt;=`END' +
+ '`PLN `END`LIT0`END`PUN)`END`PLN `END`PUN{`END`PLN\n' +
+ ' tmp `END`PUN=`END`PLN a`END`PUN;`END`PLN\n' +
+ ' a `END`PUN+=`END`PLN b`END`PUN;`END`PLN\n' +
+ ' b `END`PUN=`END`PLN tmp`END`PUN;`END`PLN\n' +
+ ' `END`PUN}`END`PLN\n' +
+ ' `END`KWDreturn`END`PLN a`END`PUN;`END`PLN\n' +
+ '`END`PUN}`END`PLN\n' +
+ '\n' +
+ 'document`END`PUN.`END`PLNwriteln`END`PUN(`END`PLNfib`END`PUN(`END' +
+ '`LIT10`END`PUN));`END`PLN\n' +
+ '`END`COM// --&gt;`END`PLN\n' +
+ ' `END`TAG&lt;/script&gt;`END`PLN\n' +
+ ' `END`TAG&lt;/body&gt;`END`PLN\n' +
+ '`END`TAG&lt;/html&gt;`END'),
+ xhtml: (
+ '`TAG&lt;xhtml&gt;`END`PLN\n' +
+ ' `END`TAG&lt;head&gt;`END`PLN\n' +
+ ' `END`TAG&lt;title&gt;`END' +
+ '`PLNFibonacci number`END`TAG&lt;/title&gt;`END' +
+ '`PLN\n' +
+ ' `END`TAG&lt;/head&gt;`END`PLN\n' +
+ ' `END`TAG&lt;body`END`PLN `END`ATNonload`END`PUN=`END' +
+ '`ATV"`END`PLNalert`END`PUN(`END`PLNfib`END`PUN(`END`LIT10`END' +
+ '`PUN))`END`ATV"`END`TAG&gt;`END`PLN\n' +
+ ' `END`TAG&lt;script`END`PLN `END`ATNtype`END' +
+ '`PUN=`END`ATV"text/javascript"`END`TAG&gt;`END' +
+ '`PUN&lt;![`END`PLNCDATA`END`PUN[`END`PLN\n' +
+ '`END`KWDfunction`END`PLN fib`END`PUN(`END`PLNn`END`PUN)`END`PLN `END' +
+ '`PUN{`END`PLN\n' +
+ ' `END`KWDvar`END`PLN a `END`PUN=`END`PLN `END`LIT1`END`PUN,`END' +
+ '`PLN b `END`PUN=`END`PLN `END`LIT1`END`PUN;`END`PLN\n' +
+ ' `END`KWDvar`END`PLN tmp`END`PUN;`END`PLN\n' +
+ ' `END`KWDwhile`END`PLN `END`PUN(--`END`PLNn `END`PUN&gt;=`END' +
+ '`PLN `END`LIT0`END`PUN)`END`PLN `END`PUN{`END`PLN\n' +
+ ' tmp `END`PUN=`END`PLN a`END`PUN;`END`PLN\n' +
+ ' a `END`PUN+=`END`PLN b`END`PUN;`END`PLN\n' +
+ ' b `END`PUN=`END`PLN tmp`END`PUN;`END`PLN\n' +
+ ' `END`PUN}`END`PLN\n' +
+ ' `END`KWDreturn`END`PLN a`END`PUN;`END`PLN\n' +
+ '`END`PUN}`END`PLN\n' +
+ '`END`PUN]]&gt;`END`PLN\n' +
+ ' `END`TAG&lt;/script&gt;`END`PLN\n' +
+ ' `END`TAG&lt;/body&gt;`END`PLN\n' +
+ '`END`TAG&lt;/xhtml&gt;`END'),
+ PHP: (
+ '`TAG&lt;html&gt;`END`PLN\n' +
+ ' `END`TAG&lt;head&gt;`END`PLN\n' +
+ ' `END`TAG&lt;title&gt;`END`PUN&lt;?=`END' +
+ '`PLN `END' +
+ '`STR\'Fibonacci numbers\'`END`PLN `END' +
+ '`PUN?&gt;`END`TAG&lt;/title&gt;`END`PLN\n' +
+ '\n' +
+ ' `END`PUN&lt;?`END`PLNphp\n' +
+ ' `END`COM// PHP has a plethora of comment types' +
+ '`END`PLN\n' +
+ ' `END`COM\/* What is a\n' +
+ ' "plethora"? *\/`END`PLN\n' +
+ ' `END`KWDfunction`END`PLN fib`END`PUN(`END' +
+ '`PLN$n`END`PUN)`END`PLN `END`PUN{`END`PLN\n' +
+ ' `END`COM# I don\'t know.`END`PLN\n' +
+ ' $a `END`PUN=`END`PLN `END`LIT1`END' +
+ '`PUN;`END`PLN\n' +
+ ' $b `END`PUN=`END`PLN `END`LIT1`END' +
+ '`PUN;`END`PLN\n' +
+ ' `END`KWDwhile`END`PLN `END`PUN(--`END' +
+ '`PLN$n `END`PUN&gt;=`END`PLN `END`LIT0`END`PUN)`END`PLN `END' +
+ '`PUN{`END`PLN\n' +
+ ' echo `END`STR"$a\\n"`END`PUN;`END' +
+ '`PLN\n' +
+ ' $tmp `END`PUN=`END`PLN $a`END' +
+ '`PUN;`END`PLN\n' +
+ ' $a `END`PUN+=`END`PLN $b`END' +
+ '`PUN;`END`PLN\n' +
+ ' $b `END`PUN=`END`PLN $tmp`END' +
+ '`PUN;`END`PLN\n' +
+ ' `END`PUN}`END`PLN\n' +
+ ' `END`PUN}`END`PLN\n' +
+ ' `END`PUN?&gt;`END`PLN\n' +
+ ' `END`TAG&lt;/head&gt;`END`PLN\n' +
+ ' `END`TAG&lt;body&gt;`END`PLN\n' +
+ ' `END`PUN&lt;?=`END`PLN fib`END' +
+ '`PUN(`END`LIT10`END`PUN)`END`PLN `END`PUN?&gt;`END`PLN\n' +
+ ' `END`TAG&lt;/body&gt;`END`PLN\n' +
+ '`END`TAG&lt;/html&gt;`END'),
+ xsl: (
+ '`COM&lt;!-- Test elements and attributes with namespaces --&gt;' +
+ '`END`PLN\n' +
+ '\n' +
+ '`END`TAG&lt;xsl:stylesheet`END`PLN `END`ATNxml:lang`END' +
+ '`PUN=`END`ATV"en"`END`TAG&gt;`END`PLN\n' +
+ ' `END`TAG&lt;xsl:template`END' +
+ '`PLN `END`ATNmatch`END`PUN=`END`ATV"."`END' +
+ '`TAG&gt;`END`PLN\n' +
+ ' `END`TAG&lt;xsl:text&gt;`END' +
+ '`PLNHello World`END' +
+ '`TAG&lt;/xsl:text&gt;`END`PLN\n' +
+ ' `END`TAG&lt;/xsl:template&gt;`END`PLN\n' +
+ '`END`TAG&lt;/xsl:stylesheet&gt;`END'
+ ),
+ whitespace: '',
+ misc1: '`COM// ends with line comment token`END`PLN\n' +
+ '`END`COM//`END',
+ issue4: (
+ '`TAG&lt;script`END`PLN `END' +
+ '`ATNtype`END`PUN=`END`ATV"text/javascript"`END' +
+ '`TAG&gt;`END`PLN\n' +
+ ' var savedTarget=null' +
+ '; ' +
+ ' // The target ' +
+ 'layer (effectively vidPane)\n' +
+ ' var orgCursor=null' +
+ '; ' +
+ ' // The ' +
+ 'original mouse style so we can restore it\n' +
+ ' var dragOK=false' +
+ '; ' +
+ ' ' +
+ '// True if we\'re allowed to move the element under mouse' +
+ '\n' +
+ ' var dragXoffset=0' +
+ '; ' +
+ ' ' +
+ '// How much we\'ve moved the element on the horozontal' +
+ '\n' +
+ ' var dragYoffset=0' +
+ '; ' +
+ ' ' +
+ '// How much we\'ve moved the element on the verticle' +
+ '\n' +
+ ' vidPaneID = document.' +
+ 'getElementById(\'vidPane\');' +
+ ' // Our movable layer\n' +
+ ' vidPaneID.style.top' +
+ '=\'75px\'; ' +
+ ' // ' +
+ 'Starting location horozontal\n' +
+ ' vidPaneID.style.left' +
+ '=\'75px\'; ' +
+ ' // ' +
+ 'Starting location verticle\n' +
+ '`END`TAG&lt;script&gt;`END'),
+ issue8:
+ (
+ '<b>`PLNone`END</b>`PLN\t`END<b>`TYPTwo`END</b>`PLN' +
+ '\t`END<b>`PLNthree`END</b>`PLN\t`END`TYPFour' +
+ '`END`PLN\t`END<b>`PLNfive`END</b>`PLN\t' +
+ '`END`PUN|`END`PLN\n' +
+ '`END`TYPSix`END`PLN\t`END<b>`PLNseven`END</b>`PLN\t' +
+ '`END`TYPEight`END`PLN\tnine\t`END`TYPTen`END' +
+ '`PLN\t`END`PUN|`END`PLN\n' +
+ '`END<b>`PLNeleven`END</b>`PLN\t`END`TYPTwelve`END`PLN\t`END' +
+ '<b>`PLNthirteen`END</b>`PLN\t`END' +
+ '`TYPFourteen`END`PLN\tfifteen\t`END`' +
+ 'PUN|`END'),
+ issue12: (
+ '`STR/foo/`END`PUN;`END`PLN `END`COM// a slash starting a line ' +
+ 'treated as a regexp beginning`END`PLN\n' +
+ '`END`STR"foo"`END`PUN.`END`PLNmatch`END`PUN(`END`STR/fo+$/`END' +
+ '`PUN);`END`PLN\n' +
+ '`END`COM// this line comment not treated as a regular expressions`END' +
+ '`PLN\n' +
+ '`END`STR"foo /bar/"`END`PUN.`END`PLNtest`END`PUN(`END`STR/"baz"/`END' +
+ '`PUN);`END`PLN `END`COM// test string and regexp boundaries' +
+ '`END`PLN\n' +
+ '`END`KWDvar`END`PLN division `END`PUN=`END`PLN `END' +
+ '`STR/\\b\\d+\\/\\d+/`END`PLNg`END`PUN;`END`PLN `END' +
+ '`COM// test char sets and escaping of specials`END`PLN\n' +
+ '`END`KWDvar`END`PLN allSpecials `END`PUN=`END`PLN `END' +
+ '`STR/([^\\(\\)\\[\\]\\{\\}\\-\\?\\+\\*\\.\\^\\$\\/]+)\\\\/`END' +
+ '`PUN;`END`PLN\n' +
+ '`END`KWDvar`END`PLN slashInCharset `END`PUN=`END`PLN `END' +
+ '`STR/[^/]/`END`PLNg`END`PUN,`END`PLN notCloseSq `END`PUN=`END' +
+ '`PLN `END`STR/[^\\]]/`END`PUN;`END`PLN\n' +
+ '\n' +
+ '`END`COM// test that slash used in numeric context treated as an ' +
+ 'operator`END`PLN\n' +
+ '`END`LIT1`END`PLN `END`PUN/`END`PLN `END`LIT2`END`PUN;`END`PLN\n' +
+ '`END`LIT1.`END`PLN `END`PUN/`END`PLN x`END`PUN;`END`PLN\n' +
+ 'x `END`PUN/`END`PLN y`END`PUN;`END`PLN\n' +
+ '`END`PUN(`END`PLNx`END`PUN)`END`PLN `END`PUN/`END`PLN y`END`PUN;`END' +
+ '`PLN\n' +
+ '`END`LIT1`END`PLN `END`COM/* foo *\/`END`PLN `END`PUN/`END`PLN `END' +
+ '`LIT2`END`PUN;`END`PLN\n' +
+ '`END`LIT1`END`PLN `END`COM/* foo *\/`END`PUN/`END`PLN `END`LIT2`END' +
+ '`PUN;`END`PLN\n' +
+ '`END`LIT1`END`PUN/`END`LIT2`END`PUN;`END`PLN\n' +
+ '`END`LIT1.`END`PUN/`END`PLNx`END`PUN;`END`PLN\n' +
+ 'x`END`PUN/`END`PLNy`END`PUN;`END`PLN\n' +
+ '`END`PUN(`END`PLNx`END`PUN)/`END`PLNy`END`PUN;`END`PLN\n' +
+ '\n' +
+ '`END`COM// test split over two lines. line comment should not ' +
+ 'fool it`END`PLN\n' +
+ '`END`LIT1`END`COM//`END`PLN\n' +
+ '`END`PUN/`END`LIT2`END`PUN;`END`PLN\n' +
+ '\n' +
+ 'x`END`PUN++/`END`PLNy`END`PUN;`END`PLN\n' +
+ 'x`END`PUN--/`END`PLNy`END`PUN;`END`PLN\n' +
+ 'x`END`PUN[`END`PLNy`END`PUN]`END`PLN `END`PUN/`END`PLN z`END`PUN;`END' +
+ '`PLN\n' +
+ 'f`END`PUN()`END`PLN `END`PUN/`END`PLN n`END`PUN;`END`PLN\n' +
+ '\n' +
+ '`END`COM// test that slash after non postfix operator is start of ' +
+ 'regexp`END`PLN\n' +
+ 'log`END`PUN(`END`STR\'matches = \'`END`PLN `END`PUN+`END`PLN `END' +
+ '`STR/foo/`END`PUN.`END`PLNtest`END`PUN(`END`PLNfoo`END`PUN));`END' +
+ '`PLN\n' +
+ '\n' +
+ '`END`COM// test keyword preceders`END`PLN\n' +
+ '`END`KWDreturn`END`PLN `END`STR/a regexp/`END`PUN;`END`PLN\n' +
+ 'division `END`PUN=`END`PLN notreturn `END`PUN/`END`PLN not_a_regexp ' +
+ '`END`PUN/`END`PLN `END`LIT2`END`PUN;`END`PLN `END`COM// ' +
+ 'keyword suffix does not match`END`PLN\n' +
+ '\n' +
+ '`END`COM// &amp; not used as prefix operator in javascript but this ' +
+ 'should still work`END`PLN\n' +
+ '`END`PUN&amp;`END`STR/foo/`END`PUN;`END`PLN\n' +
+ '\n' +
+ '`END`KWDextends`END`PLN `END`PUN=`END`PLN `END`STR/extends/`END' +
+ '`PUN;`END'),
+ issue12_lang: (
+ '`STR/foo/`END`PUN;`END`PLN `END`COM// a slash starting a line ' +
+ 'treated as a regexp beginning`END`PLN\n' +
+ '`END`STR"foo"`END`PUN.`END`PLNmatch`END`PUN(`END`STR/fo+$/`END' +
+ '`PUN);`END`PLN\n' +
+ '`END`COM// this line comment not treated as a regular expressions`END' +
+ '`PLN\n' +
+ '`END`STR"foo /bar/"`END`PUN.`END`PLNtest`END`PUN(`END`STR/"baz"/`END' +
+ '`PUN);`END`PLN `END`COM// test string and regexp boundaries' +
+ '`END`PLN\n' +
+ '`END`KWDvar`END`PLN division `END`PUN=`END`PLN `END' +
+ '`STR/\\b\\d+\\/\\d+/`END`PLNg`END`PUN;`END`PLN `END' +
+ '`COM// test char sets and escaping of specials`END`PLN\n' +
+ '`END`KWDvar`END`PLN allSpecials `END`PUN=`END`PLN `END' +
+ '`STR/([^\\(\\)\\[\\]\\{\\}\\-\\?\\+\\*\\.\\^\\$\\/]+)\\\\/`END' +
+ '`PUN;`END`PLN\n' +
+ '`END`KWDvar`END`PLN slashInCharset `END`PUN=`END`PLN `END' +
+ '`STR/[^/]/`END`PLNg`END`PUN,`END`PLN notCloseSq `END`PUN=`END' +
+ '`PLN `END`STR/[^\\]]/`END`PUN;`END`PLN\n' +
+ '\n' +
+ '`END`COM// test that slash used in numeric context treated as an ' +
+ 'operator`END`PLN\n' +
+ '`END`LIT1`END`PLN `END`PUN/`END`PLN `END`LIT2`END`PUN;`END`PLN\n' +
+ '`END`LIT1.`END`PLN `END`PUN/`END`PLN x`END`PUN;`END`PLN\n' +
+ 'x `END`PUN/`END`PLN y`END`PUN;`END`PLN\n' +
+ '`END`PUN(`END`PLNx`END`PUN)`END`PLN `END`PUN/`END`PLN y`END`PUN;`END' +
+ '`PLN\n' +
+ '`END`LIT1`END`PLN `END`COM/* foo *\/`END`PLN `END`PUN/`END`PLN `END' +
+ '`LIT2`END`PUN;`END`PLN\n' +
+ '`END`LIT1`END`PLN `END`COM/* foo *\/`END`PUN/`END`PLN `END`LIT2`END' +
+ '`PUN;`END`PLN\n' +
+ '`END`LIT1`END`PUN/`END`LIT2`END`PUN;`END`PLN\n' +
+ '`END`LIT1.`END`PUN/`END`PLNx`END`PUN;`END`PLN\n' +
+ 'x`END`PUN/`END`PLNy`END`PUN;`END`PLN\n' +
+ '`END`PUN(`END`PLNx`END`PUN)/`END`PLNy`END`PUN;`END`PLN\n' +
+ '\n' +
+ '`END`COM// test split over two lines. line comment should not ' +
+ 'fool it`END`PLN\n' +
+ '`END`LIT1`END`COM//`END`PLN\n' +
+ '`END`PUN/`END`LIT2`END`PUN;`END`PLN\n' +
+ '\n' +
+ 'x`END`PUN++/`END`PLNy`END`PUN;`END`PLN\n' +
+ 'x`END`PUN--/`END`PLNy`END`PUN;`END`PLN\n' +
+ 'x`END`PUN[`END`PLNy`END`PUN]`END`PLN `END`PUN/`END`PLN z`END`PUN;`END' +
+ '`PLN\n' +
+ 'f`END`PUN()`END`PLN `END`PUN/`END`PLN n`END`PUN;`END`PLN\n' +
+ '\n' +
+ '`END`COM// test that slash after non postfix operator is start of ' +
+ 'regexp`END`PLN\n' +
+ 'log`END`PUN(`END`STR\'matches = \'`END`PLN `END`PUN+`END`PLN `END' +
+ '`STR/foo/`END`PUN.`END`PLNtest`END`PUN(`END`PLNfoo`END`PUN));`END' +
+ '`PLN\n' +
+ '\n' +
+ '`END`COM// test keyword preceders`END`PLN\n' +
+ '`END`KWDreturn`END`PLN `END`STR/a regexp/`END`PUN;`END`PLN\n' +
+ 'division `END`PUN=`END`PLN notreturn `END`PUN/`END`PLN not_a_regexp ' +
+ '`END`PUN/`END`PLN `END`LIT2`END`PUN;`END`PLN `END`COM// ' +
+ 'keyword suffix does not match`END`PLN\n' +
+ '\n' +
+ '`END`COM// &amp; not used as prefix operator in javascript but this ' +
+ 'should still work`END`PLN\n' +
+ '`END`PUN&amp;`END`STR/foo/`END`PUN;`END`PLN\n' +
+ '\n' +
+ 'extends `END`PUN=`END`PLN `END`STR/extends/`END`PUN;`END'),
+ coffee: (
+ '`KWDclass`END`PLN `END`TYPAnimal`END`PLN\n' +
+ ' constructor`END`PUN:`END`PLN `END`PUN(`END`LIT@name`END`PUN)`END`PLN `END`PUN-&gt;`END`PLN\n' +
+ ' move`END`PUN:`END`PLN `END`PUN(`END`PLNmeters`END`PUN,`END`PLN loc`END`PUN)`END`PLN `END`PUN-&gt;`END`PLN\n' +
+ ' alert `END`LIT@name`END`PLN `END`PUN+`END`PLN `END`STR" moved "`END`PLN `END`PUN+`END`PLN meters `END`PUN+`END`PLN `END`STR"m."`END`PLN\n' +
+ ' travel`END`PUN:`END`PLN `END`PUN(`END`PLNpath`END`PUN...)`END`PLN `END`PUN-&gt;`END`PLN\n' +
+ ' `END`KWDfor`END`PLN place `END`KWDin`END`PLN path\n' +
+ ' `END`LIT@move`END`PLN place`END`PUN.`END`PLNdistance`END`PUN,`END`PLN place`END`PUN.`END`PLNlocation\n' +
+ '\n' +
+ '`END`KWDclass`END`PLN `END`TYPHorse`END`PLN `END`KWDextends`END`PLN `END`TYPAnimal`END`PLN\n' +
+ ' `END`COM###\n' +
+ ' @param name Horse name\n' +
+ ' @param jumper Jumping ability\n' +
+ ' ###`END`PLN\n' +
+ ' constructor`END`PUN:`END`PLN `END`PUN(`END`PLNname`END`PUN,`END`PLN jumper`END`PUN)`END`PLN `END`PUN-&gt;`END`PLN\n' +
+ ' `END`KWDsuper`END`PLN name\n' +
+ ' `END`LIT@capable`END`PLN `END`PUN=`END`PLN jumper\n' +
+ ' step`END`PUN:`END`PLN `END`PUN-&gt;`END`PLN\n' +
+ ' alert `END`STR\'\'\'\n' +
+ ' Step,\n' +
+ ' step...\n' +
+ ' \'\'\'`END`PLN\n' +
+ ' jump`END`PUN:`END`PLN `END`PUN-&gt;`END`PLN\n' +
+ ' `END`LIT@capable`END`PLN\n' +
+ ' move`END`PUN:`END`PLN `END`PUN(`END`PLNmeters`END`PUN,`END`PLN where`END`PUN)`END`PLN `END`PUN-&gt;`END`PLN\n' +
+ ' switch where\n' +
+ ' `END`KWDwhen`END`PLN `END`STR"ground"`END`PLN\n' +
+ ' `END`LIT@step`END`PUN()`END`PLN\n' +
+ ' `END`KWDsuper`END`PLN meters\n' +
+ ' `END`KWDwhen`END`PLN `END`STR"hurdle"`END`PLN\n' +
+ ' `END`KWDsuper`END`PLN meters `END`KWDif`END`PLN `END`LIT@jump`END`PUN()`END`PLN\n' +
+ '\n' +
+ '`END`COM# Create horse`END`PLN\n' +
+ 'tom `END`PUN=`END`PLN `END`KWDnew`END`PLN `END`TYPHorse`END`PLN `END`STR"Tommy"`END`PUN,`END`PLN `END`KWDyes`END`PLN\n' +
+ '\n' +
+ 'street `END`PUN=`END`PLN\n' +
+ ' location`END`PUN:`END`PLN `END`STR"ground"`END`PLN\n' +
+ ' distance`END`PUN:`END`PLN `END`LIT12`END`PLN\n' +
+ 'car `END`PUN=`END`PLN\n' +
+ ' location`END`PUN:`END`PLN `END`STR"hurdle"`END`PLN\n' +
+ ' distance`END`PUN:`END`PLN `END`LIT2`END`PLN\n' +
+ '\n' +
+ '`END`COM###\n' +
+ 'Tell him to travel:\n' +
+ '1. through the street\n' +
+ '2. over the car\n' +
+ '###`END`PLN\n' +
+ 'tom`END`PUN.`END`PLNtravel street`END`PUN,`END`PLN car`END'
+ ),
+ issue14a: (
+ '`COM//comment`END<br>' +
+ '`KWDint`END`PLN main`END`PUN(`END`KWDint`END`PLN argc`END`PUN,`END' +
+ '`PLN `END`KWDchar`END`PLN `END`PUN**`END`PLNargv`END`PUN)`END' +
+ '`PLN\n' +
+ '`END`PUN{}`END'),
+ issue14b: (
+ '`COM&lt;!-- There\'s an `END<acronym title="tag soup">`COMHTML`END' +
+ '</acronym>`COM comment in my comment --&gt;`END`PLN\n' +
+ '`END`TAG&lt;p&gt;`END' +
+ '`PLNAnd another one inside the end tag`END' +
+ '`TAG&lt;/p`END`TAG&gt;`END'),
+ issue20: (
+ '`TAG&lt;html&gt;`END`PLN\n' +
+ '\n' +
+ '`END`TAG&lt;head&gt;`END'),
+ issue21: (
+ '`TAG&lt;html&gt;`END`PLN\n' +
+ ' `END`TAG&lt;head&gt;`END`PLN\n' +
+ ' `END`TAG&lt;title&gt;`END`PLNTest`END' +
+ '`TAG&lt;/title&gt;`END`PLN\n' +
+ ' `END`TAG&lt;/head&gt;`END`PLN\n' +
+ '`END`TAG&lt;/html&gt;`END'),
+ issue22: (
+ '<span class="nocode">01: `END`COM// This is a line of code`END`PLN\n' +
+ '`END<span class="nocode">02: `END`COM/* Multiline comments can\n' +
+ '`END<span class="nocode">03: `END`COM * span over and around\n' +
+ '`END<span class="nocode">04: `END`COM * line markers\n' +
+ '`END<span class="nocode annot">And can even be interrupted`END`COM\n' +
+ '`END<span class="nocode annot">by inline code annotations`END`COM\n' +
+ '`END<span class="nocode">05: `END`COM *\/`END`PLN\n' +
+ '`END<span class="nocode">06: `END`KWDclass`END`PLN `END`TYPMyClass`END' +
+ '`PLN `END`KWDextends`END`PLN `END`TYPFoo`END`PLN `END`PUN{`END' +
+ '`PLN\n' +
+ '`END<span class="nocode">07: `END`PLN `END`KWDpublic`END' +
+ '`PLN `END`KWDstatic`END`PLN `END`KWDvoid`END`PLN main`END`PUN(`END' +
+ '`TYPString`END`PUN...`END`PLN argv`END`PUN)`END`PLN `END`PUN{`END' +
+ '`PLN\n' +
+ '`END<span class="nocode">08: `END`PLN `END`TYPSystem`END' +
+ '`PUN.`END`KWDout`END`PUN.`END`KWDprint`END`PUN(`END' +
+ '`STR"Hello World"`END`PUN);`END`PLN\n' +
+ '`END<span class="nocode">09: `END`PLN `END`PUN}`END`PLN\n' +
+ '`END<span class="nocode">10: `END`PUN}`END'
+ ),
+ issue24: (
+ '`PLNos`END`PUN=`END`PLNrequire`END`PUN(`END`STR"os"`END`PUN)`END`PLN\n' +
+ 'math`END`PUN=`END`PLNrequire`END`PUN(`END`STR"math"`END`PUN)`END`PLN\n' +
+ '\n' +
+ '`END`COM-- Examples from the language reference`END`PLN\n' +
+ ' a `END`PUN=`END`PLN `END`STR\'alo\\n123"\'`END' +
+ '`PLN\n' +
+ ' a `END`PUN=`END`PLN `END`STR"alo\\n123\\""`END' +
+ '`PLN\n' +
+ ' a `END`PUN=`END`PLN `END' +
+ '`STR\'\\97lo\\10\\04923"\'`END`PLN\n' +
+ ' a `END`PUN=`END`PLN `END`STR[[alo\n' +
+ ' 123"]]`END`PLN\n' +
+ ' a `END`PUN=`END`PLN `END`STR[==[\n' +
+ ' alo\n' +
+ ' 123"]==]`END`PLN\n' +
+ '\n' +
+ '`END`LIT3`END`PLN `END`LIT3.0`END`PLN `END`LIT3.1416`END' +
+ '`PLN `END`LIT314.16e-2`END`PLN `END`LIT0.31416E1`END' +
+ '`PLN `END`LIT0xff`END`PLN `END`LIT0x56`END`PLN\n' +
+ '\n' +
+ '`END`COM-- Some comments that demonstrate long brackets`END`PLN\n' +
+ 'double_quoted `END`PUN=`END`PLN `END`STR"Not a long bracket [=["`END' +
+ '`PLN\n' +
+ '`END`COM--[=[ quoting out\n' +
+ ' [[ foo ]]\n' +
+ ' [==[does not end comment either]==]\n' +
+ ']=]`END`PLN\n' +
+ 'past_end_of_comment\n' +
+ '`END`COM--]=]`END`PLN\n' +
+ '\n' +
+ '`END`COM-- Example code courtesy Joseph Harmbruster`END`PLN\n' +
+ '`END`PUN#`END`PLN\n' +
+ '`END`KWDdo`END`PLN\n' +
+ ' `END`KWDlocal`END`PLN `END`KWDfunction`END`PLN ssgeneral`END' +
+ '`PUN(`END`PLNt`END`PUN,`END`PLN n`END`PUN,`END`PLN before`END' +
+ '`PUN)`END`PLN\n' +
+ ' `END`KWDfor`END`PLN _`END`PUN,`END`PLN h `END`KWDin`END' +
+ '`PLN ipairs`END`PUN(`END`PLNincs`END`PUN)`END`PLN `END`KWDdo`END' +
+ '`PLN\n' +
+ ' `END`KWDfor`END`PLN i `END`PUN=`END`PLN h `END' +
+ '`PUN+`END`PLN `END`LIT1`END`PUN,`END`PLN n `END`KWDdo`END`PLN\n' +
+ ' `END`KWDlocal`END`PLN v `END`PUN=`END' +
+ '`PLN t`END`PUN[`END`PLNi`END`PUN]`END`PLN\n' +
+ ' `END`KWDfor`END`PLN j `END`PUN=`END' +
+ '`PLN i `END`PUN-`END`PLN h`END`PUN,`END`PLN `END`LIT1`END`PUN,`END' +
+ '`PLN `END`PUN-`END`PLNh `END`KWDdo`END`PLN\n' +
+ ' `END`KWDlocal`END`PLN testval `END' +
+ '`PUN=`END`PLN t`END`PUN[`END`PLNj`END`PUN]`END`PLN\n' +
+ ' `END`KWDif`END`PLN `END`KWDnot`END' +
+ '`PLN before`END`PUN(`END`PLNv`END`PUN,`END`PLN testval`END' +
+ '`PUN)`END`PLN `END`KWDthen`END`PLN `END`KWDbreak`END`PLN `END' +
+ '`KWDend`END`PLN\n' +
+ ' t`END`PUN[`END`PLNi`END`PUN]`END' +
+ '`PLN `END`PUN=`END`PLN testval`END`PUN;`END`PLN i `END`PUN=`END' +
+ '`PLN j\n' +
+ ' `END`KWDend`END`PLN\n' +
+ ' t`END`PUN[`END`PLNi`END`PUN]`END`PLN `END' +
+ '`PUN=`END`PLN v\n' +
+ ' `END`KWDend`END`PLN \n' +
+ ' `END`KWDend`END`PLN\n' +
+ ' `END`KWDreturn`END`PLN t\n' +
+ ' `END`KWDend`END`PLN\n' +
+ '\n' +
+ ' `END`KWDfunction`END`PLN shellsort`END`PUN(`END`PLNt`END' +
+ '`PUN,`END`PLN before`END`PUN,`END`PLN n`END`PUN)`END`PLN\n' +
+ ' n `END`PUN=`END`PLN n `END`KWDor`END`PLN `END`PUN#`END' +
+ '`PLNt\n' +
+ ' `END`KWDif`END`PLN `END`KWDnot`END`PLN before `END' +
+ '`KWDor`END`PLN before `END`PUN==`END`PLN `END`STR"&lt;"`END' +
+ '`PLN `END`KWDthen`END`PLN `END`KWDreturn`END`PLN ssup`END`PUN(`END' +
+ '`PLNt`END`PUN,`END`PLN n`END`PUN)`END`PLN\n' +
+ ' `END`KWDelseif`END`PLN before `END`PUN==`END`PLN `END' +
+ '`STR"&gt;"`END`PLN `END`KWDthen`END`PLN `END`KWDreturn`END' +
+ '`PLN ssdown`END`PUN(`END`PLNt`END`PUN,`END`PLN n`END`PUN)`END' +
+ '`PLN\n' +
+ ' `END`KWDelse`END`PLN `END`KWDreturn`END' +
+ '`PLN ssgeneral`END`PUN(`END`PLNt`END`PUN,`END`PLN n`END`PUN,`END' +
+ '`PLN before`END`PUN)`END`PLN\n' +
+ ' `END`KWDend`END`PLN\n' +
+ ' `END`KWDend`END`PLN\n' +
+ ' `END`KWDreturn`END`PLN shellsort\n' +
+ '`END`KWDend`END'),
+ issue27: (
+ '`KWDImports`END`PLN System\n' +
+ '\n' +
+ '`END`KWDClass`END`PLN [class]\n' +
+ ' `END`KWDShared`END`PLN `END`KWDSub`END`PLN [shared]`END' +
+ '`PUN(`END`KWDByVal`END`PLN [boolean] `END`KWDAs`END`PLN `END' +
+ '`KWDBoolean`END`PUN)`END`PLN\n' +
+ ' `END`KWDIf`END`PLN [boolean] `END' +
+ '`KWDThen`END`PLN\n' +
+ ' Console`END`PUN.`END' +
+ '`PLNWriteLine`END`PUN(`END`STR"true"`END`PUN)`END`PLN\n' +
+ ' `END`KWDElse`END`PLN\n' +
+ ' Console`END`PUN.`END' +
+ '`PLNWriteLine`END`PUN(`END`STR"false"`END`PUN)`END`PLN\n' +
+ ' `END`KWDEnd`END`PLN `END`KWDIf`END' +
+ '`PLN\n' +
+ ' `END`KWDEnd`END`PLN `END`KWDSub`END`PLN\n' +
+ '`END`KWDEnd`END`PLN `END`KWDClass`END`PLN\n' +
+ '\n' +
+ '`END`KWDModule`END`PLN [module]\n' +
+ ' `END`KWDSub`END`PLN Main`END`PUN()`END`PLN\n' +
+ ' [class]`END`PUN.`END`PLN[shared]`END' +
+ '`PUN(`END`LITTrue`END`PUN)`END`PLN\n' +
+ '\n' +
+ ' `END`COM\' This prints out: \".`END' +
+ '`PLN\n' +
+ ' Console`END`PUN.`END`PLNWriteLine`END' +
+ '`PUN(`END`STR""""`END`PUN)`END`PLN\n' +
+ '\n' +
+ ' `END`COM\' This prints out: a"b.`END' +
+ '`PLN\n' +
+ ' Console`END`PUN.`END`PLNWriteLine`END' +
+ '`PUN(`END`STR"a""b"`END`PUN)`END`PLN\n' +
+ '\n' +
+ ' `END`COM\' This prints out: a.`END' +
+ '`PLN\n' +
+ ' Console`END`PUN.`END`PLNWriteLine`END' +
+ '`PUN(`END`STR"a"c`END`PUN)`END`PLN\n' +
+ '\n' +
+ ' `END`COM\' This prints out: ".`END' +
+ '`PLN\n' +
+ ' Console`END`PUN.`END`PLNWriteLine`END' +
+ '`PUN(`END`STR""""c`END`PUN)`END`PLN\n' +
+ ' `END`KWDEnd`END`PLN `END`KWDSub`END`PLN\n' +
+ '`END`KWDEnd`END`PLN `END`KWDModule`END`PLN\n' +
+ '\n' +
+ '`END`KWDDim`END`PLN d `END`KWDAs`END`PLN `END`KWDDate`END`PLN\n' +
+ 'd `END`PUN=`END`PLN `END`LIT# 8/23/1970 3:45:39AM #`END`PLN\n' +
+ 'd `END`PUN=`END`PLN `END`LIT# 8/23/1970 #`END`PLN\n' +
+ 'd `END`PUN=`END`PLN `END`LIT# 3:45:39AM #`END`PLN\n' +
+ 'd `END`PUN=`END`PLN `END`LIT# 3:45:39 #`END`PLN\n' +
+ 'd `END`PUN=`END`PLN `END`LIT# 13:45:39 #`END`PLN\n' +
+ 'd `END`PUN=`END`PLN `END`LIT# 13:45:39PM #`END`PLN\n' +
+ '\n' +
+ '`END`KWDDim`END`PLN n `END`KWDAs`END`PLN Float\n' +
+ 'n `END`PUN=`END`PLN `END`PUN(`END`LIT0.0`END`PUN,`END`PLN `END' +
+ '`LIT.99F`END`PUN,`END`PLN `END`LIT1.0E-2D`END`PUN,`END`PLN `END' +
+ '`LIT1.0E+3D`END`PUN,`END`PLN `END`LIT.5E4`END`PUN,`END`PLN `END' +
+ '`LIT1E3R`END`PUN,`END`PLN `END`LIT4D`END`PUN)`END`PLN\n' +
+ '\n' +
+ '`END`KWDDim`END`PLN i `END`KWDAs`END`PLN `END`KWDInteger`END`PLN\n' +
+ 'i `END`PUN=`END`PLN `END`PUN(`END`LIT0`END`PUN,`END`PLN `END' +
+ '`LIT123`END`PUN,`END`PLN `END`LIT45L`END`PUN,`END`PLN `END' +
+ '`LIT&amp;HA0I`END`PUN,`END`PLN `END`LIT&amp;O177S`END`PUN)`END'),
+ issue30: (
+ '`COM-- A comment`END`PLN\n' +
+ 'Not`END`PUN(--`END`STR"a comment"`END`PUN)`END`PLN\n' +
+ 'Also.not`END`PUN(--(`END`PLNA.comment`END`PUN))`END`PLN\n' +
+ '\n' +
+ '`END`KWDmodule`END`PLN Foo`END`PUN(`END`PLNbar`END`PUN)`END`PLN `END' +
+ '`KWDwhere`END`PLN\n' +
+ '`END`KWDimport`END`PLN Blah\n' +
+ '`END`KWDimport`END`PLN BlahBlah`END`PUN(`END`PLNblah`END`PUN)`END' +
+ '`PLN\n' +
+ '`END`KWDimport`END`PLN Monads`END`PUN(`END`PLNException`END' +
+ '`PUN(..),`END`PLN FIO`END`PUN(..),`END`PLNunFIO`END`PUN,`END' +
+ '`PLNhandle`END`PUN,`END`PLNrunFIO`END`PUN,`END`PLNfixFIO`END' +
+ '`PUN,`END`PLNfio`END`PUN,`END`PLN\n' +
+ ' write`END`PUN,`END' +
+ '`PLNwriteln`END`PUN,`END`PLNHasNext`END`PUN(..),`END' +
+ '`PLNHasOutput`END`PUN(..))`END`PLN\n' +
+ '\n' +
+ '`END`COM{- nested comments\n' +
+ ' - don\'t work {-yet-}`END`PLN `END`PUN-}`END`PLN\n' +
+ '`END`KWDinstance`END`PLN Thingy Foo `END`KWDwhere`END`PLN\n' +
+ ' a `END`PUN=`END`PLN b\n' +
+ '\n' +
+ '`END`KWDdata`END`PLN Foo `END`PUN::`END`PLN `END`PUN(*`END`PLN `END' +
+ '`PUN-&gt;`END`PLN `END`PUN*`END`PLN `END`PUN-&gt;`END`PLN `END' +
+ '`PUN*)`END`PLN `END`PUN-&gt;`END`PLN `END`PUN*`END`PLN `END' +
+ '`PUN&gt;`END`PLN `END`PUN*`END`PLN `END`PUN-&gt;`END`PLN `END' +
+ '`PUN*`END`PLN `END`KWDwhere`END`PLN\n' +
+ ' Nil `END`PUN::`END`PLN Foo a b c\n' +
+ ' Cons `END`PUN::`END`PLN a b c `END`PUN-&gt;`END' +
+ '`PLN Foo abc `END`PUN-&gt;`END`PLN Foo a b c\n' +
+ '\n' +
+ 'str `END`PUN=`END`PLN `END`STR"Foo\\\\Bar"`END`PLN\n' +
+ 'char `END`PUN=`END`PLN `END`STR\'x\'`END`PLN\n' +
+ 'Not.A.Char `END`PUN=`END`PLN `END`STR\'t`END`PLNoo long\' `END' +
+ '`COM-- Don\'t barf. Show that \'t is a lexical error.`END' +
+ '`PLN\n' +
+ '\n' +
+ '`END`PUN(`END`PLNident`END`PUN,`END`PLN ident\'`END`PUN,`END' +
+ '`PLN Fo\'\'o.b\'ar`END`PUN)`END`PLN\n' +
+ '\n' +
+ '`END`PUN(`END`LIT0`END`PUN,`END`PLN `END`LIT12`END`PUN,`END`PLN `END' +
+ '`LIT0x45`END`PUN,`END`PLN `END`LIT0xA7`END`PUN,`END`PLN `END' +
+ '`LIT0o177`END`PUN,`END`PLN `END`LIT0O377`END`PUN,`END`PLN `END' +
+ '`LIT0.1`END`PUN,`END`PLN `END`LIT1.0`END`PUN,`END`PLN `END' +
+ '`LIT1e3`END`PUN,`END`PLN `END`LIT0.5E-3`END`PUN,`END`PLN `END' +
+ '`LIT1.0E+45`END`PUN)`END'
+ ),
+ issue33: (
+ '`COM(*\n' +
+ ' * Print the 10th fibonacci number\n' +
+ ' *)`END`PLN\n' +
+ '\n' +
+ '`END`COM//// A line comment`END`PLN\n' +
+ '`END`STR"A string"`END`PUN;;`END`PLN\n' +
+ '`END`PUN(`END`LIT0`END`PUN,`END`PLN `END`LIT125`END`PUN,`END' +
+ '`PLN `END`LIT0xa0`END`PUN,`END`PLN `END`LIT-1.0`END`PUN,`END' +
+ '`PLN `END`LIT1e6`END`PUN,`END`PLN `END`LIT1.2e-3`END`PUN);;`END' +
+ '`PLN `END`COM// number literals`END`PLN\n' +
+ '\n' +
+ '`END`COM#if fibby`END`PLN\n' +
+ ' `END`KWDlet`END`PLN\n' +
+ ' `END`KWDrec`END`PLN fib `END`PUN=`END`PLN `END' +
+ '`KWDfunction`END`PLN `END`PUN(`END`LIT0`END`PUN,`END`PLN a`END' +
+ '`PUN,`END`PLN _`END`PUN)`END`PLN `END`PUN-&gt;`END`PLN a\n' +
+ ' ' +
+ ' `END`PUN|`END`PLN `END`PUN(`END`PLNn`END`PUN,`END`PLN a`END' +
+ '`PUN,`END`PLN b`END`PUN)`END`PLN `END`PUN-&gt;`END`PLN fib`END' +
+ '`PUN(`END`PLNn `END`PUN-`END`PLN `END`LIT1`END`PUN,`END' +
+ '`PLN a `END`PUN+`END`PLN b`END`PUN,`END`PLN a`END`PUN)`END' +
+ '`PLN\n' +
+ ' `END`KWDin`END`PLN\n' +
+ ' print_int`END`PUN(`END`PLNfib`END`PUN(`END`LIT10`END' +
+ '`PUN,`END`PLN `END`LIT1`END`PUN,`END`PLN `END`LIT1`END' +
+ '`PUN));;`END`PLN\n' +
+ '`END`COM#endif`END`PLN\n' +
+ '\n' +
+ '`END`KWDlet`END`PLN zed `END`PUN=`END`PLN `END`STR\'z\'`END`PLN\n' +
+ '\n' +
+ '`END`KWDlet`END`PLN f\' x\' `END`PUN=`END`PLN x\' `END`PUN+`END`PLN `END`LIT1`END'),
+ issue42: (
+ '`COM; -*- mode: lisp -*-`END`PLN\n' +
+ '\n' +
+ '`END`OPN(`END`KWDdefun`END`PLN back-six-lines `END`OPN(`END`CLO)`END' +
+ '`PLN `END`OPN(`END`PLNinteractive`END`CLO)`END`PLN `END`OPN(`END' +
+ '`PLNforward-line `END`LIT-6`END`CLO))`END`PLN\n' +
+ '`END`OPN(`END`KWDdefun`END`PLN forward-six-lines `END`OPN(`END' +
+ '`CLO)`END`PLN `END`OPN(`END`PLNinteractive`END`CLO)`END`PLN `END' +
+ '`OPN(`END`PLNforward-line `END`LIT6`END`CLO))`END`PLN\n' +
+ '\n' +
+ '`END`OPN(`END`PLNglobal-set-key `END`STR"\\M-l"`END`PLN `END' +
+ '`LIT\'goto-line`END`CLO)`END`PLN\n' +
+ '`END`OPN(`END`PLNglobal-set-key `END`STR"\\C-z"`END`PLN `END' +
+ '`LIT\'advertised-undo`END`CLO)`END`PLN\n' +
+ '`END`OPN(`END`PLNglobal-set-key `END`PUN[`END`PLNC-insert`END' +
+ '`PUN]`END`PLN `END`LIT\'clipboard-kill-ring-save`END`CLO)`END' +
+ '`PLN\n' +
+ '`END`OPN(`END`PLNglobal-set-key `END`PUN[`END`PLNS-insert`END`PUN]`END' +
+ '`PLN `END`LIT\'clipboard-yank`END`CLO)`END`PLN\n' +
+ '`END`OPN(`END`PLNglobal-set-key `END`PUN[`END`PLNC-up`END`PUN]`END' +
+ '`PLN `END`LIT\'back-six-lines`END`CLO)`END`PLN\n' +
+ '`END`OPN(`END`PLNglobal-set-key `END`PUN[`END`PLNC-down`END`PUN]`END' +
+ '`PLN `END`LIT\'forward-six-lines`END`CLO)`END`PLN\n' +
+ '\n' +
+ '`END`OPN(`END`KWDsetq`END`PLN visible-bell `END`KWDt`END`CLO)`END' +
+ '`PLN\n' +
+ '`END`OPN(`END`KWDsetq`END`PLN user-mail-address `END' +
+ '`STR"foo@bar.com"`END`CLO)`END`PLN\n' +
+ '`END`OPN(`END`KWDsetq`END`PLN default-major-mode `END' +
+ '`LIT\'text-mode`END`CLO)`END`PLN\n' +
+ '\n' +
+ '`END`OPN(`END`PLNsetenv `END`STR"TERM"`END`PLN `END' +
+ '`STR"emacs"`END`CLO)`END`PLN\n' +
+ '`END`OPN(`END`PLNc-set-offset `END`LIT\'case-label`END`PLN `END' +
+ '`LIT2`END`CLO)`END`PLN\n' +
+ '`END`OPN(`END`KWDsetq`END`PLN c-basic-offset `END`LIT2`END`CLO)`END' +
+ '`PLN\n' +
+ '`END`OPN(`END`KWDsetq`END`PLN perl-indent-level `END`LIT0x2`END`CLO)`END' +
+ '`PLN\n' +
+ '`END`OPN(`END`KWDsetq`END`PLN delete-key-deletes-forward `END`KWDt`END' +
+ '`CLO)`END`PLN\n' +
+ '`END`OPN(`END`KWDsetq`END`PLN indent-tabs-mode `END`KWDnil`END' +
+ '`CLO)`END`PLN\n' +
+ '\n' +
+ '`END`COM;; Text mode`END`PLN\n' +
+ '`END`OPN(`END`PLNadd-hook `END`LIT\'text-mode-hook`END`PLN \n' +
+ ' `END`LIT\'`END`OPN(`END`KWDlambda`END`PLN `END`OPN(`END' +
+ '`CLO)`END`PLN\n' +
+ ' `END`OPN(`END`PLNturn-on-auto-fill`END`CLO)`END' +
+ '`PLN\n' +
+ ' `END`CLO)`END`PLN\n' +
+ '`END`CLO)`END`PLN\n' +
+ '\n' +
+ '`END`COM;; Fundamental mode`END`PLN\n' +
+ '`END`OPN(`END`PLNadd-hook `END`LIT\'fundamental-mode-hook`END' +
+ '`PLN \n' +
+ ' `END`LIT\'`END`OPN(`END`KWDlambda`END`PLN `END`OPN(`END' +
+ '`CLO)`END`PLN\n' +
+ ' `END`OPN(`END`PLNturn-on-auto-fill`END' +
+ '`CLO)`END`PLN\n' +
+ ' `END`CLO)`END`PLN\n' +
+ '`END`CLO)`END`PLN\n' +
+ '\n' +
+ '`END`COM;; Define and cond are keywords in scheme`END`PLN\n' +
+ '`END`OPN(`END`KWDdefine`END`PLN `END`OPN(`END`PLNsqt x`END`CLO)`END' +
+ '`PLN `END`OPN(`END`PLNsqrt-iter `END`LIT1.0`END`PLN `END' +
+ '`LIT2.0`END`PLN x`END`CLO))`END'),
+ issue45: (
+ '`KWDthrow`END`PLN `END`KWDnew`END`PLN `END`TYPRuntimeException`END' +
+ '`PUN(`END`STR"Element ["`END`PLN `END`PUN+`END`PLN element`END' +
+ '`PUN.`END`PLNgetName`END`PUN()`END`PLN `END`PUN+`END`PLN \n' +
+ ' `END`STR"] missing attribute."`END`PUN);`END`PLN\n' +
+ 'variable`END`PUN++;`END'),
+ proto: (
+ '`KWDmessage`END`PLN `END`TYPSearchRequest`END`PLN `END`PUN{`END' +
+ '`PLN\n' +
+ ' `END`KWDrequired`END`PLN `END`TYPstring`END`PLN query `END' +
+ '`PUN=`END`PLN `END`LIT1`END`PUN;`END`PLN\n' +
+ ' `END`KWDoptional`END`PLN `END`TYPint32`END`PLN page_number `END' +
+ '`PUN=`END`PLN `END`LIT2`END`PUN;`END`PLN\n' +
+ ' `END`KWDoptional`END`PLN `END`TYPint32`END' +
+ '`PLN result_per_page `END`PUN=`END`PLN `END`LIT3`END`PLN `END' +
+ '`PUN[`END`KWDdefault`END`PLN `END`PUN=`END`PLN `END`LIT10`END' +
+ '`PUN];`END`PLN\n' +
+ ' `END`KWDenum`END`PLN `END`TYPCorpus`END`PLN `END`PUN{`END' +
+ '`PLN\n' +
+ ' UNIVERSAL `END`PUN=`END`PLN `END`LIT0`END`PUN;`END' +
+ '`PLN\n' +
+ ' WEB `END`PUN=`END`PLN `END`LIT1`END`PUN;`END`PLN\n' +
+ ' IMAGES `END`PUN=`END`PLN `END`LIT2`END`PUN;`END`PLN\n' +
+ ' LOCAL `END`PUN=`END`PLN `END`LIT3`END`PUN;`END`PLN\n' +
+ ' NEWS `END`PUN=`END`PLN `END`LIT4`END`PUN;`END`PLN\n' +
+ ' PRODUCTS `END`PUN=`END`PLN `END`LIT5`END`PUN;`END' +
+ '`PLN\n' +
+ ' VIDEO `END`PUN=`END`PLN `END`LIT6`END`PUN;`END`PLN\n' +
+ ' `END`PUN}`END`PLN\n' +
+ ' `END`KWDoptional`END`PLN `END`TYPCorpus`END`PLN corpus `END' +
+ '`PUN=`END`PLN `END`LIT4`END`PLN `END`PUN[`END`KWDdefault`END' +
+ '`PLN `END`PUN=`END`PLN UNIVERSAL`END`PUN];`END`PLN\n' +
+ '`END`PUN}`END'),
+ wiki: (
+ '`KWD#summary`END`PLN hello world\n' +
+ '`END`KWD#labels`END`PLN `END`LITHelloWorld`END`PLN `END' +
+ '`LITWikiWord`END`PLN Hiya\n' +
+ '\n' +
+ '`END`PUN[`END' +
+ '`STRhttp://www.google.com/?q=WikiSyntax+site:code.google.com`END' +
+ '`PLN `END`LITWikiSyntax`END`PUN]`END`PLN\n' +
+ '\n' +
+ 'Lorem Ipsum ``END`KWDwhile`END`PLN `END`PUN(`END`LIT1`END' +
+ '`PUN)`END`PLN `END`KWDprint`END`PUN(`END`STR"blah blah"`END' +
+ '`PUN);`END`PLN`\n' +
+ '\n' +
+ ' `END`PUN*`END`PLN Bullet\n' +
+ ' `END`PUN*`END`PLN Points\n' +
+ ' `END`PUN*`END`PLN `END`LITNestedBullet`END' +
+ '`PLN\n' +
+ '\n' +
+ '`END`PUN==`END`LITDroningOnAndOn`END`PUN==`END`PLN\n' +
+ '{{{\n' +
+ ' `END`COM// Some EmbeddedSourceCode`END`PLN\n' +
+ ' `END`KWDvoid`END`PLN main`END`PUN()`END`PLN `END`PUN{`END' +
+ '`PLN\n' +
+ ' `END`TYPPrint`END`PUN(`END`STR\'hello world\'`END' +
+ '`PUN);`END`PLN\n' +
+ ' `END`PUN}`END`PLN\n' +
+ '}}}\n' +
+ '\n' +
+ '{{{\n' +
+ ' `END`COM&lt;!-- Embedded XML --&gt;`END`PLN\n' +
+ ' `END`TAG&lt;foo`END`PLN `END`ATNbar`END`PUN=`END' +
+ '`ATV"baz"`END`TAG&gt;&lt;boo`END`PLN `END' +
+ '`TAG/&gt;&lt;foo&gt;`END`PLN\n' +
+ '}}}`END'
+ ),
+ css: (
+ '`COM&lt;!--`END`PLN\n' +
+ '`END`KWD@charset`END`PUN(`END`STR\'UTF-8\'`END`PUN);`END`PLN\n' +
+ '\n' +
+ '`END`COM/** A url that is not quoted. *\/`END`PLN\n' +
+ '`END`KWD@import`END`PUN(`END`KWDurl`END`PUN(`END`STR/more-styles.css`END' +
+ '`PUN));`END`PLN\n' +
+ '\n' +
+ 'HTML `END`PUN{`END`PLN `END`KWDcontent-before`END`PUN:`END`PLN `END' +
+ '`STR\'hello\\20\'`END`PUN;`END`PLN `END`KWDcontent-after`END' +
+ '`PUN:`END`PLN `END`STR\'w\\6f rld\'`END`PUN;`END`PLN\n' +
+ ' `END`KWD-moz-spiff`END`PUN:`END`PLN `END' +
+ '`KWDinherit`END`PLN `END`KWD!important`END`PLN `END`PUN}`END' +
+ '`PLN\n' +
+ '\n' +
+ '`END`COM/* Test units on numbers. *\/`END`PLN\n' +
+ 'BODY `END`PUN{`END`PLN `END`KWDmargin-bottom`END`PUN:`END`PLN `END' +
+ '`LIT4px`END`PUN;`END`PLN `END`KWDmargin-left`END`PUN:`END' +
+ '`PLN `END`LIT3in`END`PUN;`END`PLN `END`KWDmargin-bottom`END' +
+ '`PUN:`END`PLN `END`LIT0`END`PUN;`END`PLN `END`KWDmargin-top`END' +
+ '`PUN:`END`PLN `END`LIT5%`END`PLN `END`PUN}`END`PLN\n' +
+ '\n' +
+ '`END`COM/** Test number literals and quoted values. *\/`END`PLN\n' +
+ 'TABLE`END`PUN.`END`PLNfoo TR`END`PUN.`END`PLNbar A`END`PUN#`END' +
+ '`PLNvisited `END`PUN{`END`PLN `END`KWDcolor`END`PUN:`END`PLN `END' +
+ '`LIT#001123`END`PUN;`END`PLN `END`KWDfont-family`END`PUN:`END' +
+ '`PLN `END`STR"monospace"`END`PLN `END`PUN}`END`PLN\n' +
+ '`END`COM/** bolder is not a name, so should be plain. ' +
+ ' !IMPORTANT is a keyword\n' +
+ ' * regardless of case.\n' +
+ ' *\/`END`PLN\n' +
+ 'blink `END`PUN{`END`PLN `END`KWDtext-decoration`END`PUN:`END' +
+ '`PLN BLINK `END`KWD!IMPORTANT`END`PUN;`END`PLN `END' +
+ '`KWDfont-weight`END`PUN:`END`PLN bolder `END`PUN}`END`PLN\n' +
+ '`END`COM--&gt;`END'
+ ),
+ issue84: '`KWDsuper`END`PUN(`END`STR"&amp;nbsp;"`END`PUN);`END',
+ issue86_0: '`COM#One Two words`END',
+ issue86_1: '`COM#One`END`PLN\n' +
+ '`END`TYPTwo`END`PLN lines`END',
+ issue86_2: '`COM#One`END`PLN\n' +
+ '`END`TYPTwo`END`PLN lines`END',
+ issue86_3: '`COM#One`END`PLN\n' +
+ '`END`TYPTwo`END`PLN lines`END',
+ issue86_4: '`COM#One`END`PLN\n' +
+ '`END`TYPTwo`END`PLN lines`END',
+ issue92: '`PUN&lt;?`END`PLNxml version`END`PUN=`END`STR"1.0"`END`PLN encoding`END`PUN=`END' +
+ '`STR"UTF-8"`END`PUN?&gt;`END`PLN\n' +
+ '`END`TAG&lt;kml`END`PLN `END`ATNxmlns`END`PUN=`END`ATV"http://www.opengis.net/kml/2.2"`END' +
+ '`TAG&gt;`END`PLN\n' +
+ ' `END`TAG&lt;Placemark&gt;`END`PLN\n' +
+ ' `END`TAG&lt;name&gt;`END`PLNSimple placemark`END`TAG&lt;/name&gt;`END`PLN\n' +
+ ' `END`TAG&lt;description`END' +
+ '`PLN `END`ATNLang`END`PUN=`END`ATV"en"`END`TAG&gt;`END' +
+ '`PLNAttached to the ground.' +
+ ' Intelligently places itself \n' +
+ ' at the height of the underlying terrain.`END' +
+ '`TAG&lt;/description&gt;`END`PLN\n' +
+ ' `END`TAG&lt;Point&gt;`END`PLN\n' +
+ ' `END`TAG&lt;coordinates&gt;`END' +
+ '`PLN-122.0822035425683,37.42228990140251,0`END`TAG&lt;/coordinates&gt;`END`PLN\n' +
+ ' `END`TAG&lt;/Point&gt;`END`PLN\n' +
+ ' `END`TAG&lt;/Placemark&gt;`END`PLN\n' +
+ '`END`TAG&lt;/kml&gt;`END',
+ issue93: '`COM// The normal string syntax`END`PLN\n' +
+ '`END`KWDstring`END`PLN a `END`PUN=`END`PLN `END`STR"C:\\\\"`END`PUN;`END`PLN\n' +
+ '`END`COM// is equivalent to a verbatim string`END`PLN\n' +
+ '`END`KWDstring`END`PLN b `END`PUN=`END`PLN `END`STR@"C:\\"`END`PUN;`END',
+ vhdl: '`KWDlibrary`END`PLN ieee`END`PUN;`END`PLN\n' +
+ '`END`KWDuse`END`PLN ieee`END`PUN.`END`PLNstd_logic_1164`END`PUN.`END`KWDall`END`PUN;`END`PLN\n' +
+ '`END`KWDuse`END`PLN ieee`END`PUN.`END`PLNnumeric_std`END`PUN.`END`KWDall`END`PUN;`END`PLN\n' +
+ '\n' +
+ '`END`COM-- A line comment`END`PLN\n' +
+ '`END`KWDentity`END`PLN foo_entity `END`KWDis`END`PLN\n' +
+ '\n' +
+ ' `END`KWDgeneric`END`PLN `END`PUN(`END`COM-- comment after punc`END`PLN\n' +
+ ' a `END`PUN:`END`PLN `END`TYPnatural`END`PLN `END`PUN:=`END' +
+ '`PLN `END`LIT42`END`PUN;`END`PLN\n' +
+ ' x `END`PUN:`END`PLN `END`TYPreal`END`PLN `END' +
+ '`PUN:=`END`PLN `END`LIT16#ab.cd#-3`END`PLN\n' +
+ ' `END`PUN);`END`PLN\n' +
+ ' `END`KWDport`END`PLN `END`PUN(`END`PLN\n' +
+ ' clk_i `END`PUN:`END`PLN `END`KWDin`END`PLN `END`TYPstd_logic`END`PUN;`END`PLN\n' +
+ ' b_i `END`PUN:`END`PLN `END`KWDin`END`PLN `END`TYPnatural`END`PLN `END`KWDrange`END`PLN `END`LIT0`END`PLN `END`KWDto`END`PLN `END`LIT100`END`PUN;`END`PLN\n' +
+ ' c_o `END`PUN:`END`PLN `END`KWDout`END`PLN `END`TYPstd_logic_vector`END`PUN(`END`LIT5`END`PLN `END`KWDdownto`END`PLN `END`LIT0`END`PUN);`END`PLN\n' +
+ ' \\a "name"\\ `END`PUN:`END`PLN `END`KWDout`END`PLN `END`TYPinteger`END`PLN `END`COM-- extended identifier`END`PLN\n' +
+ ' `END`PUN);`END`PLN\n' +
+ '\n' +
+ '`END`KWDend`END`PLN `END`KWDentity`END`PLN foo_entity`END`PUN;`END`PLN\n' +
+ '\n' +
+ '`END`KWDarchitecture`END`PLN foo_architecture `END`KWDof`END`PLN foo_entity `END`KWDis`END`PLN\n' +
+ ' `END`KWDsignal`END`PLN bar_s `END`PUN:`END`PLN `END`TYPstd_logic_vector`END`PUN(`END`LIT2`END`PLN `END`KWDdownto`END`PLN `END`LIT0`END`PUN);`END`PLN\n' +
+ '`END`KWDbegin`END`PLN\n' +
+ ' \n' +
+ ' bar_s `END`PUN&lt;=`END`PLN `END`STRb"101"`END`PUN;`END`PLN\n' +
+ '\n' +
+ ' dummy_p `END`PUN:`END`PLN `END`KWDprocess`END`PLN `END`PUN(`END`PLNclk_i`END`PUN)`END`PLN\n' +
+ ' `END`KWDbegin`END`PLN\n' +
+ ' `END`KWDif`END`PLN b_i `END`PUN=`END`PLN `END`LIT1`END`PLN `END`KWDthen`END`PLN\n' +
+ ' c_o `END`PUN&lt;=`END`PLN `END`PUN(`END`KWDothers`END`PLN `END`PUN=&gt;`END`PLN `END`STR\'0\'`END`PUN);`END`PLN\n' +
+ ' `END`KWDelsif`END`PLN rising_edge`END`PUN(`END`PLNclk_i`END`PUN)`END`PLN `END`KWDthen`END`PLN\n' +
+ ' c_o `END`PUN&lt;=`END`PLN `END`STR"1011"`END`PLN `END`PUN&amp;`END`PLN bar_s`END`PUN(`END`LIT1`END`PLN `END`KWDdownto`END`PLN `END`LIT0`END`PUN);`END`PLN\n' +
+ ' `END`KWDend`END`PLN `END`KWDif`END`PUN;`END`PLN\n' +
+ ' `END`KWDend`END`PLN `END`KWDprocess`END`PLN dummy_p`END`PUN;`END`PLN\n' +
+ '\n' +
+ '`END`KWDend`END`PLN `END`KWDarchitecture`END`PLN foo_architecture`END`PUN;`END',
+ yaml1: '`KWDapplication: `END`PLNmirah`END`PUN-`END`PLNlang\n' +
+ '`END`KWDversion: `END`PLN1\n' +
+ '\n' +
+ '`END`COM# Here\'s a comment`END`PLN\n' +
+ '`END`KWDhandlers:\n' +
+ '`END`PLN `END`PUN-`END`PLN `END`KWDurl: `END`PLN/red/*\n' +
+ ' `END`KWDservlet: `END`PLNmysite.server.TeamServlet\n' +
+ ' `END`KWDinit_params:\n' +
+ '`END`PLN `END`KWDteamColor: `END`PLNred\n' +
+ ' `END`KWDbgColor: `END`STR"#CC0000"`END`PLN\n' +
+ ' `END`KWDname: `END`PLNredteam\n' +
+ ' `END`PUN-`END`PLN `END`KWDurl: `END`PLN/blue/*\n' +
+ ' `END`KWDservlet: `END`PLNmysite.server.TeamServlet\n' +
+ ' `END`KWDinit_params:\n' +
+ '`END`PLN `END`KWDteamColor: `END`PLNblue\n' +
+ ' `END`KWDbgColor: `END`STR"#0000CC"`END`PLN\n' +
+ ' `END`KWDname: `END`PLNblueteam\n' +
+ ' `END`PUN-`END`PLN `END`KWDurl: `END`PLN/register/*\n' +
+ ' `END`KWDjsp: `END`PLN/register/start.jsp\n' +
+ ' `END`PUN-`END`PLN `END`KWDurl: `END`PLN*.special\n' +
+ ' `END`KWDfilter: `END`PLNmysite.server.LogFilterImpl\n' +
+ ' `END`KWDinit_params:\n' +
+ '`END`PLN `END`KWDlogType: `END`PLNspecial\n' +
+ ' `END',
+ yaml2: '`DEC%YAML 1.1`END`PLN\n' +
+ '`END`DEC---\n' +
+ '`END`TYP!!map`END`PLN {\n' +
+ ' `END`PUN?`END`PLN `END`TYP!!str`END`PLN `END`STR""`END`PLN\n' +
+ ' `END`PUN:`END`PLN `END`TYP!!str`END`PLN `END`STR"value"`END`PLN,\n' +
+ ' `END`PUN?`END`PLN `END`TYP!!str`END`PLN `END`STR"explicit key"`END`PLN\n' +
+ ' `END`PUN:`END`PLN `END`TYP!!str`END`PLN `END`STR"value"`END`PLN,\n' +
+ ' `END`PUN?`END`PLN `END`TYP!!str`END`PLN `END`STR"simple key"`END`PLN\n' +
+ ' `END`PUN:`END`PLN `END`TYP!!str`END`PLN `END`STR"value"`END`PLN,\n' +
+ ' `END`PUN?`END`PLN `END`TYP!!seq`END`PLN [\n' +
+ ' `END`TYP!!str`END`PLN `END`STR"collection"`END`PLN,\n' +
+ ' `END`TYP!!str`END`PLN `END`STR"simple"`END`PLN,\n' +
+ ' `END`TYP!!str`END`PLN `END`STR"key"`END`PLN\n' +
+ ' ]\n' +
+ ' `END`PUN:`END`PLN `END`TYP!!str`END`PLN `END`STR"value"`END`PLN\n' +
+ '}`END',
+ scala: '`COM/* comment 1 *\/`END`PLN\n' +
+ '`END`COM/*\n' +
+ 'comment 2\n' +
+ '*\/`END`PLN\n' +
+ '`END`COM/* comment / * comment 3 **\/`END`PLN\n' +
+ '`END`COM// strings`END`PLN\n' +
+ '`END`STR"Hello, World!"`END`PUN,`END`PLN `END`STR"\\n"`END`PUN,`END`PLN\n' +
+ '`END`LIT`an-identifier``END`PUN,`END`PLN `END`LIT`\\n``END`PUN,`END`PLN\n' +
+ '`END`STR\'A\'`END`PUN,`END`PLN `END`STR\'\\n\'`END`PUN,`END`PLN\n' +
+ '`END`LIT\'aSymbol`END`PUN,`END`PLN\n' +
+ '`END`STR"""Hello,\n' +
+ 'World"""`END`PUN,`END`PLN `END`STR"""Hello,\\nWorld"""`END`PUN,`END`PLN\n' +
+ '`END`STR"""Hello, "World"!"""`END`PUN,`END`PLN\n' +
+ '`END`STR"""Hello, \\"World\\""""`END`PLN\n' +
+ '\n' +
+ '`END`COM// Numbers`END`PLN\n' +
+ '`END`LIT0`END`PLN\n' +
+ '`END`LIT0123`END`PLN\n' +
+ '`END`LIT0xa0`END`PLN\n' +
+ '`END`LIT0XA0L`END`PLN\n' +
+ '`END`LIT123`END`PLN\n' +
+ '`END`LIT123.45`END`PLN\n' +
+ '`END`LIT1.50F`END`PLN\n' +
+ '`END`LIT0.50`END`PLN\n' +
+ '`END`PUN.`END`LIT50`END`PLN\n' +
+ '`END`LIT123e-1`END`PLN\n' +
+ '`END`LIT123.45e+1`END`PLN\n' +
+ '`END`LIT1.50e2`END`PLN\n' +
+ '`END`LIT0.50e-6`END`PLN\n' +
+ '`END`PUN.`END`LIT50e+42f`END`PLN\n' +
+ '\n' +
+ '`END`COM// Values`END`PLN\n' +
+ '`END`LITfalse`END`PUN,`END`PLN `END`LITtrue`END`PUN,`END`PLN `END`LITnull`END`PUN,`END`PLN `END`LITthis`END`PUN;`END`PLN\n' +
+ '\n' +
+ '`END`COM// Keywords`END`PLN\n' +
+ '`END`KWDclass`END`PLN `END`TYPMyClass`END`PUN;`END`PLN\n' +
+ '`END`KWDimport`END`PLN foo`END`PUN.`END`PLNbar`END`PUN;`END`PLN\n' +
+ '`END`KWDpackage`END`PLN baz`END`PUN;`END`PLN\n' +
+ '\n' +
+ '`END`COM// From scala-lang.org/node/242`END`PLN\n' +
+ '`END`KWDdef`END`PLN act`END`PUN()`END`PLN `END`PUN{`END`PLN\n' +
+ ' `END`KWDvar`END`PLN pongCount `END`PUN=`END`PLN `END`LIT0`END`PLN\n' +
+ ' loop `END`PUN{`END`PLN\n' +
+ ' react `END`PUN{`END`PLN\n' +
+ ' `END`KWDcase`END`PLN `END`TYPPing`END`PLN `END`PUN=&gt;`END`PLN\n' +
+ ' `END`KWDif`END`PLN `END`PUN(`END`PLNpongCount `END`PUN%`END`PLN `END`LIT1000`END`PLN `END`PUN==`END`PLN `END`LIT0`END`PUN)`END`PLN\n' +
+ ' `END`TYPConsole`END`PUN.`END`PLNprintln`END`PUN(`END`STR"Pong: ping "`END`PUN+`END`PLNpongCount`END`PUN)`END`PLN\n' +
+ ' sender `END`PUN!`END`PLN `END`TYPPong`END`PLN\n' +
+ ' pongCount `END`PUN=`END`PLN pongCount `END`PUN+`END`PLN `END`LIT1`END`PLN\n' +
+ ' `END`KWDcase`END`PLN `END`TYPStop`END`PLN `END`PUN=&gt;`END`PLN\n' +
+ ' `END`TYPConsole`END`PUN.`END`PLNprintln`END`PUN(`END`STR"Pong: stop"`END`PUN)`END`PLN\n' +
+ ' exit`END`PUN()`END`PLN\n' +
+ ' `END`PUN}`END`PLN\n' +
+ ' `END`PUN}`END`PLN\n' +
+ '`END`PUN}`END',
+ go: '`PLNpackage main `END`COM/* Package of which this program is part. *\/`END`PLN\n' +
+ '\n' +
+ 'import fmt "fmt" `END`COM// Package implementing formatted I/O.`END`PLN\n' +
+ '\n' +
+ '\n' +
+ 'func main() {\n' +
+ ' fmt.Printf("Hello, world; or \u039a\u03b1\u03bb\u03b7\u03bc\u03ad\u03c1\u03b1 \u03ba\u03cc\u03c3\u03bc\u03b5; or \u3053\u3093\u306b\u3061\u306f \u4e16\u754c\\n") `END`COM// Semicolon inserted here`END`PLN\n' +
+ '}\n' +
+ '\n' +
+ '`END`COM/* " *\/`END`PLN "foo /* " `END`COM/*\/ *\/`END`PLN\n' +
+ '`END`COM/* ` *\/`END`PLN `foo /* ` `END`COM/*\/ *\/`END'
+};
+</script>
+
+</html>
diff --git a/media/prettify-20110601/tests/prettify_test_2.html b/media/prettify-20110601/tests/prettify_test_2.html
new file mode 100644
index 0000000..66cea8d
--- /dev/null
+++ b/media/prettify-20110601/tests/prettify_test_2.html
@@ -0,0 +1,893 @@
+<!DOCTYPE HTML PUBLIC "-//W5C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<title>Code Prettifier</title>
+<script>(function () {
+ var sourceBaseUrl = /[&?]distrib/.test(location.search)
+ ? "../distrib/google-code-prettify/" : "../src/";
+ var sources = [
+ "prettify.js",
+ "lang-css.js",
+ // Language extensions tested.
+ "lang-clj.js",
+ "lang-lisp.js",
+ "lang-xq.js",
+ "lang-n.js",
+ "lang-tex.js"
+ ];
+ var styles = [
+ "prettify.css"
+ ];
+ if (window.console) {
+ console.log("sourceBaseUrl=" + sourceBaseUrl);
+ }
+ for (var i = 0; i < sources.length; ++i) {
+ document.write(
+ "<script src=\"" + sourceBaseUrl + sources[i] + "\"><\/script>");
+ }
+ for (var i = 0; i < styles.length; ++i) {
+ document.write(
+ "<link rel=\"stylesheet\" href=\"" + sourceBaseUrl + styles[i] + "\">");
+ }
+})();
+</script>
+
+<script src="test_base.js" type="text/javascript"
+ onerror="alert('Error: failed to load ' + this.src)"></script>
+<link rel="stylesheet" type="text/css" href="test_styles.css" />
+</head>
+
+<body onload="go(goldens)" bgcolor="white">
+<div id="timing"></div>
+<div id="errorReport" style="white-space: pre"></div>
+
+<h1>XQuery mode</h1>
+From <code>http://www.patrick-wied.at/static/xquery/prettify/</code>
+<pre class="prettyprint lang-xq" id="xquery">
+(:
+ Took some of Mike Brevoort's xquery code samples because they are nice and show common xquery syntax
+:)
+
+ (:~
+ : Given a sequence of version URIs, publish all of these versions of each document
+ : If there is a version of the same document already published, unpublish it 1st
+ :
+ : When "publish" is referred to, we mean that it is put into the PUBLISHED collection
+ : unpublish removes content from this collection
+ : @param $version_uris - sequence of uris of versions of managed documents to publish
+ :)
+ declare function comoms-dls:publish($version_uris as item()*) {
+ for $uri in $version_uris
+ let $doc := fn:doc($uri)
+ let $managed_base_uri := $doc/node()/property::dls:version/dls:document-uri/text()
+ let $existing := comoms-dls:publishedDoc($managed_base_uri)
+ let $unpublishExisting := if($existing) then comoms-dls:unpublishVersion((xdmp:node-uri($existing))) else ()
+ let $addPermissions := dls:document-add-permissions($uri, (xdmp:permission('mkp-anon', 'read')))
+ return
+ dls:document-add-collections($uri, ("PUBLISHED"))
+ };
+
+ declare function comoms-dls:publishLatest($uri) {
+ (: TODO check if it's in the draft collection probably :)
+
+ let $latest_version_uri := comoms-dls:latestVersionUri($uri)
+ let $log:= xdmp:log(fn:concat("latest: ", $latest_version_uri))
+ let $log:= xdmp:log(fn:concat("uri: ", $uri))
+ return comoms-dls:publish($latest_version_uri)
+
+ };
+
+ declare function comoms-dls:latestVersionUri($uri) {
+ let $latest_version_num :=
+ (
+ for $version in dls:document-history($uri)/dls:version
+ order by fn:number($version//dls:version-id/text()) descending
+ return $version//dls:version-id/text()
+ )[1]
+
+
+ return dls:document-version-uri($uri, $latest_version_num)
+ };
+
+ declare function comoms-dls:unpublish($uris as item()*) {
+ for $uri in $uris
+ return
+ let $published_doc := comoms-dls:publishedDoc($uri)
+ return
+ if($published_doc) then
+ let $published_version_uri := xdmp:node-uri($published_doc)
+ return comoms-dls:unpublishVersion($published_version_uri)
+ else
+ ()
+ };
+
+ declare function comoms-dls:latestPublishedDocAuthor($uri) {
+ let $author_id := doc($uri)/property::dls:version/dls:author/text()
+ return
+ if($author_id) then
+ comoms-user:getUsername($author_id)
+ else
+ ()
+
+ };
+
+ (:~
+ : Given a sequence of version URIs, unpublish all of these versions of each document
+ :)
+ declare function comoms-dls:unpublishVersion($version_uris as item()*) {
+ for $uri in $version_uris
+ return
+ let $removePermissions := dls:document-remove-permissions($uri, (xdmp:permission('mkp-anon', 'read')))
+ return dls:document-remove-collections($uri, ("PUBLISHED"))
+ };
+
+ (:~
+ : Given the base URI of a managed piece of content, return the document of the node
+ : of the version that is published
+ :)
+ declare function comoms-dls:publishedDoc($uri) {
+ fn:collection("PUBLISHED")[property::dls:version/dls:document-uri = $uri]
+ };
+
+
+ (:~
+ : Test if any version of the managed document is published
+ :)
+ declare function comoms-dls:isPublished($uri) {
+ if( comoms-dls:publishedDoc($uri)) then
+ fn:true()
+ else
+ fn:false()
+ };
+
+
+ declare function comoms-dls:publishedState($uri) {
+ let $doc := comoms-dls:publishedDoc($uri)
+ let $published_uri := if($doc) then xdmp:node-uri($doc) else ()
+ let $latest := comoms-dls:latestVersionUri($uri)
+ return
+ if($doc) then
+ if($latest ne $published_uri) then
+ "stale"
+ else
+ "published"
+ else
+ "unpublished"
+ };
+
+
+ declare function comoms-dls:getManagedDocUri($uri) {
+ let $doc := fn:doc($uri)
+ let $managed_uri := $doc/property::dls:version/dls:document-uri/text()
+ let $managed_uri := if($managed_uri) then $managed_uri else $uri
+ return $managed_uri
+ };
+
+ (:~
+ : Given a manage content url (e.g. /content/123456.xml) return the appropriate
+ : version of the document based on what stage collection is being viewed and
+ : what's published
+ :
+ : @param $uri a manage content url (e.g. /content/123456.xml) - NOT A VERSIONED URI
+ :)
+ declare function comoms-dls:doc($uri) {
+ let $doc := fn:root(comoms-dls:collection()[property::dls:version/dls:document-uri = $uri][1])
+ return
+ if($doc) then
+ $doc
+ else
+ let $managedDocInCollection := comoms-dls:collection-name() = xdmp:document-get-collections($uri)
+ return
+ if($managedDocInCollection) then
+ fn:doc($uri)
+ else
+ ()
+ };
+
+ (:~
+ : Get the collection to be used when querying for content
+ : THIS or comoms-dls:collection-name() SHOULD BE USED WHEN BUILDING ANY QUERY FOR MANAGED CONTENT
+ :)
+ declare function comoms-dls:collection() {
+ fn:collection( comoms-dls:collection-name() )
+ };
+
+ (:~
+ : Get the collection nameto be used when querying for content
+ : THIS or comoms-dls:collection() SHOULD BE USED WHEN BUILDING ANY QUERY FOR MANAGED CONTENT
+ :)
+ declare function comoms-dls:collection-name() as xs:string {
+ let $default_collection := "PUBLISHED"
+ return
+ if(comoms-user:isAdmin()) then
+ let $pub_stage_collection_cookie := comoms-util:getCookie("COMOMS_COLLECTION")
+ return
+ if($pub_stage_collection_cookie) then
+ $pub_stage_collection_cookie
+ else
+ $default_collection
+ else
+ $default_collection
+ };
+
+ (:~
+ : Check if the published collection is being viewed
+ :)
+ declare function comoms-dls:isViewingPublished() {
+ if(comoms-dls:collection-name() = "PUBLISHED") then
+ fn:true()
+ else
+ fn:false()
+ };
+
+ (:~
+ : Get the best URL for the content URI.
+ : This is either the default URI based on detail type or should also take
+ : into account friendly urls and navigation structures to figure out the
+ : best choice
+ :)
+ declare function comoms-dls:contentUrl($uri) {
+
+ (: TODO: add friendly URL and nav structure logic 1st :)
+
+ let $doc := fn:doc($uri)
+ let $managedDocUri := $doc/property::dls:version/dls:document-uri
+ let $uri := if($managedDocUri) then $managedDocUri else $uri
+ let $type := $doc/node()/fn:name()
+ let $content_id := fn:tokenize( fn:tokenize($uri, "/")[3], "\.")[1]
+ return
+ fn:concat("/", $type, "/", $content_id)
+ };
+
+ (:
+ :
+ : gets list of doc versions and uri.
+ :
+ :)
+ declare function comoms-dls:versionHistory($uri) {
+ let $published_doc := comoms-dls:publishedDoc($uri)
+ let $published_uri := if($published_doc) then xdmp:node-uri($published_doc) else ()
+ return
+ &lt;versions&gt;
+ {
+ for $version in dls:document-history($uri)/dls:version
+ let $version_num := $version/dls:version-id/text()
+ let $created := $version/dls:created/text()
+ let $author_id := $version/dls:author/text()
+ let $author := comoms-user:getUsername($author_id)
+
+
+ let $note := $version/dls:annotation/text()
+ let $version_uri := xdmp:node-uri(dls:document-version($uri, $version_num))
+ let $published := $published_uri eq $version_uri
+ return
+ &lt;version&gt;
+ &lt;version-number&gt;{$version_num}&lt;/version-number&gt;
+ &lt;created&gt;{$created}&lt;/created&gt;
+ &lt;author&gt;{$author}&lt;/author&gt;
+ &lt;published&gt;{$published}&lt;/published&gt;
+ &lt;version-uri&gt;{$version_uri}&lt;/version-uri&gt;
+ &lt;/version&gt;
+ }
+ &lt;/versions&gt;
+ };
+
+
+
+
+
+
+ (: ########################################################################### :)
+ (: PRIVATE FUNCTIONS :)
+ (: ########################################################################### :)
+
+ declare function comoms-dls:_import() {
+ "xquery version '1.0-ml';
+ import module namespace dls = 'http://marklogic.com/xdmp/dls' at '/MarkLogic/dls.xqy'; "
+ };
+
+(: ----
+---- :)
+xquery version '1.0-ml';
+declare variable $URI as xs:string external;
+
+declare function local:document-move-forest($uri as xs:string, $forest-ids as xs:unsignedLong*)
+{
+ xdmp:document-insert(
+ $uri,
+ fn:doc($uri),
+ xdmp:document-get-permissions($uri),
+ xdmp:document-get-collections($uri),
+ xdmp:document-get-quality($uri),
+ $forest-ids
+ )
+};
+
+let $xml :=
+ &lt;xml att="blah" att2="blah"&gt;
+ sdasd&lt;b&gt;asdasd&lt;/b&gt;
+ &lt;/xml&gt;
+(: -------- :)
+for $d in fn:doc("depts.xml")/depts/deptno
+let $e := fn:doc("emps.xml")/emps/emp[deptno = $d]
+where fn:count($e) &gt;= 10
+order by fn:avg($e/salary) descending
+return
+ &lt;big-dept&gt;
+ {
+ $d,
+ &lt;headcount&gt;{fn:count($e)}&lt;/headcount&gt;,
+ &lt;avgsal&gt;{fn:avg($e/salary)}&lt;/avgsal&gt;
+ }
+ &lt;/big-dept&gt;
+(: -------- :)
+declare function local:depth($e as node()) as xs:integer
+{
+ (: A node with no children has depth 1 :)
+ (: Otherwise, add 1 to max depth of children :)
+ if (fn:empty($e/*)) then 1
+ else fn:max(for $c in $e/* return local:depth($c)) + 1
+};
+
+local:depth(fn:doc("partlist.xml"))
+
+(: -------- :)
+&lt;html&gt;&lt;head/&gt;&lt;body&gt;
+{
+ for $act in doc("hamlet.xml")//ACT
+ let $speakers := distinct-values($act//SPEAKER)
+ return
+ &lt;div&gt;{ string($act/TITLE) }&lt;/h1&gt;
+ &lt;ul&gt;
+ {
+ for $speaker in $speakers
+ return &lt;li&gt;{ $speaker }&lt;/li&gt;
+ }
+ &lt;/ul&gt;
+ &lt;/div&gt;
+}
+&lt;/body&gt;&lt;/html&gt;
+(: -------- :)
+{
+ for $book in doc("books.xml")//book
+ return
+ if (contains($book/author/text(),"Herbert") or contains($book/author/text(),"Asimov"))
+ then $book
+ else $book/text()
+
+ let $let := &lt;x&gt;"test"&lt;/x&gt;
+ return element element {
+ attribute attribute { 1 },
+ element test { 'a' },
+ attribute foo { "bar" },
+ fn:doc()[ foo/@bar eq $let ],
+ //x }
+}
+(: -------- :)
+&lt;bib&gt;
+ {
+ for $b in doc("http://bstore1.example.com/bib.xml")/bib/book
+ where $b/publisher = "Addison-Wesley" and $b/@year &gt; 1991
+ return
+ &lt;book year="{ $b/@year }"&gt;
+ { $b/title }
+ &lt;/book&gt;
+ }
+&lt;/bib&gt;
+(: -------- :)
+</pre>
+
+<h1>Nemerle code</h1>
+<pre id="nemerle" class="prettyprint lang-nemerle">
+class Set ['a]
+{
+ mutable storage : list ['a] = [];
+ public Add (e : 'a) : void
+ {
+ when (! Contains (e))
+ storage ::= e;
+ }
+ public Contains (e : 'a) : bool
+ {
+ storage.Contains (e)
+ }
+}
+
+def s1 = Set ();
+s1.Add (3);
+s1.Add (42);
+assert (s1.Contains (3));
+// s1.Add ("foo"); // error here!
+def s2 = Set ();
+s2.Add ("foo");
+assert (s2.Contains ("foo"));
+</pre>
+
+<h1>Tex support</h1>
+<pre id="latex" class="prettyprint lang-tex">% resume.tex
+% vim:set ft=tex spell:
+\documentclass[10pt,letterpaper]{article}
+\usepackage[letterpaper,margin=0.8in]{geometry}
+\usepackage{mdwlist}
+\usepackage[T1]{fontenc}
+\usepackage{textcomp}
+\pagestyle{empty}
+\setlength{\tabcolsep}{0em}
+</pre>
+
+<h1>Issue 144</h1>
+Escaped quotes in bash.
+<pre id="issue144" class="prettyprint">
+#! /bin/bash
+# toascii.sh
+for i in $(echo $* | fold -w 1);do
+ printf "%x " \'$i;
+done;
+echo
+</pre>
+
+<h1>Issue 145</h1>
+<pre id="issue145" class="prettyprint">
+&lt;script type="text/javascript"&gt;
+&lt;!--
+ var target = $$.css('backgroundImage').replace(/^url[\(\)'"]/g, '');
+
+ // nice long chain: wrap img element in span
+ $$.wrap('&lt;span style="position: relative;"&gt;&lt;/span&gt;')
+--&gt;
+&lt;/script&gt;
+</pre>
+
+<h1>Clojure Syntax Highlighting</h1>
+<pre class="prettyprint lang-clj" id="clojure">
+; Clojure test comment
+(ns test
+ (:gen-class))
+
+(def foo "bar")
+(defn bar [arg1 arg2 & args]
+ "sample function"
+ (for [arg args]
+ (prn arg)))
+
+(bar "foo" "bar" "blah" :baz)
+</pre>
+
+<h1>HTML 5 language on code</h1>
+<p>
+The text is specified to be lisp by the class attribute.
+Semicolon is normally a valid punctuation character but
+in lisp it is a comment so should be colored as a comment
+if the className is being properly parsed.</p>
+<code class="prettyprint language-lisp" id="html5conv1">; foo</code>
+
+<h1>HTML 5 language on nested code element</h1>
+<p>The language is attached to a CODE element inside a PRE.</p>
+<pre class="prettyprint" id="html5conv2"
+><code class="language-lisp">; foo</code></pre>
+
+<h1>HTML 5 language on nested code element not foiled by space</h1>
+<p>The language is attached to a CODE element inside a PRE and there
+is space between the PRE element's tags and CODE element's tags.</p>
+<pre class="prettyprint" id="html5conv3">
+<code class="language-lisp">
+; foo
+</code>
+</pre>
+
+<h1>HTML 5 nested code element language ignored if not only content</h1>
+<p>The below is not treated as lisp despite there being a lisp
+language specifier on the contained CODE element, the CODE element
+does not wrap all non-space content.</p>
+<pre class="prettyprint" id="html5conv4">
+before CODE
+<code class="language-lisp">; foo</code>
+</pre>
+
+</body>
+
+<script type="text/javascript">
+/**
+ * maps ids of rewritten code to the expected output.
+ * For brevity, <span class="foo"> has been changed to `FOO and close span tags
+ * have been changed to `END.
+ */
+var goldens = {
+ xquery: (
+ '`COM(: \n' +
+ '\tTook some of Mike Brevoort\'s xquery code samples because they are nice and show common xquery syntax \n' +
+ ':)`END`PLN\n' +
+ ' \n' +
+ ' `END`COM(:~\n' +
+ ' : Given a sequence of version URIs, publish all of these versions of each document\n' +
+ ' : If there is a version of the same document already published, unpublish it 1st\n' +
+ ' :\n' +
+ ' : When "publish" is referred to, we mean that it is put into the PUBLISHED collection\n' +
+ ' : unpublish removes content from this collection\n' +
+ ' : @param $version_uris - sequence of uris of versions of managed documents to publish\n' +
+ ' :)`END`PLN\n' +
+ ' `END`KWDdeclare`END`PLN `END`KWDfunction`END`PLN comoms-dls:publish(`END<span class="var pln">$version_uris`END`PLN `END`KWDas`END`PLN `END`KWDitem`END`PLN()*) {\n' +
+ ' `END`KWDfor`END`PLN `END<span class="var pln">$uri`END`PLN `END`KWDin`END`PLN `END<span class="var pln">$version_uris`END`PLN\n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$doc`END`PLN := `END<span class="fun pln">fn:doc`END`PLN(`END<span class="var pln">$uri`END`PLN)\n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$managed_base_uri`END`PLN := `END<span class="var pln">$doc`END`PLN/`END`KWDnode`END`PLN()/property::dls:version/dls:document-uri/`END`KWDtext`END`PLN()\n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$existing`END`PLN := comoms-dls:publishedDoc(`END<span class="var pln">$managed_base_uri`END`PLN)\n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$unpublishExisting`END`PLN := `END`KWDif`END`PLN(`END<span class="var pln">$existing`END`PLN) `END`KWDthen`END`PLN comoms-dls:unpublishVersion((`END<span class="fun pln">xdmp:node-uri`END`PLN(`END<span class="var pln">$existing`END`PLN))) `END`KWDelse`END`PLN ()\n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$addPermissions`END`PLN := `END<span class="fun pln">dls:document-add-permissions`END`PLN(`END<span class="var pln">$uri`END`PLN, (`END<span class="fun pln">xdmp:permission`END`PLN(`END`STR\'mkp-anon\'`END`PLN, `END`STR\'read\'`END`PLN)))\n' +
+ ' `END`KWDreturn`END`PLN\n' +
+ ' `END<span class="fun pln">dls:document-add-collections`END`PLN(`END<span class="var pln">$uri`END`PLN, (`END`STR"PUBLISHED"`END`PLN)) \n' +
+ ' };\n' +
+ ' \n' +
+ ' `END`KWDdeclare`END`PLN `END`KWDfunction`END`PLN comoms-dls:publishLatest(`END<span class="var pln">$uri`END`PLN) {\n' +
+ ' `END`COM(: TODO check if it\'s in the draft collection probably :)`END`PLN\n' +
+ ' \n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$latest_version_uri`END`PLN := comoms-dls:latestVersionUri(`END<span class="var pln">$uri`END`PLN)\n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$log`END`PLN:= `END<span class="fun pln">xdmp:log`END`PLN(`END<span class="fun pln">fn:concat`END`PLN(`END`STR"latest: "`END`PLN, `END<span class="var pln">$latest_version_uri`END`PLN)) \n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$log`END`PLN:= `END<span class="fun pln">xdmp:log`END`PLN(`END<span class="fun pln">fn:concat`END`PLN(`END`STR"uri: "`END`PLN, `END<span class="var pln">$uri`END`PLN)) \n' +
+ ' `END`KWDreturn`END`PLN comoms-dls:publish(`END<span class="var pln">$latest_version_uri`END`PLN) \n' +
+ ' \n' +
+ ' };\n' +
+ ' \n' +
+ ' `END`KWDdeclare`END`PLN `END`KWDfunction`END`PLN comoms-dls:latestVersionUri(`END<span class="var pln">$uri`END`PLN) {\n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$latest_version_num`END`PLN :=\n' +
+ ' (\n' +
+ ' `END`KWDfor`END`PLN `END<span class="var pln">$version`END`PLN `END`KWDin`END`PLN `END<span class="fun pln">dls:document-history`END`PLN(`END<span class="var pln">$uri`END`PLN)/dls:version\n' +
+ ' `END`KWDorder`END`PLN `END`KWDby`END`PLN `END<span class="fun pln">fn:number`END`PLN(`END<span class="var pln">$version`END`PLN//dls:version-id/`END`KWDtext`END`PLN()) `END`KWDdescending`END`PLN\n' +
+ ' `END`KWDreturn`END`PLN `END<span class="var pln">$version`END`PLN//dls:version-id/`END`KWDtext`END`PLN()\n' +
+ ' )[1]\n' +
+ ' \n' +
+ ' \n' +
+ ' `END`KWDreturn`END`PLN `END<span class="fun pln">dls:document-version-uri`END`PLN(`END<span class="var pln">$uri`END`PLN, `END<span class="var pln">$latest_version_num`END`PLN)\n' +
+ ' };\n' +
+ ' \n' +
+ ' `END`KWDdeclare`END`PLN `END`KWDfunction`END`PLN comoms-dls:unpublish(`END<span class="var pln">$uris`END`PLN `END`KWDas`END`PLN `END`KWDitem`END`PLN()*) {\n' +
+ ' `END`KWDfor`END`PLN `END<span class="var pln">$uri`END`PLN `END`KWDin`END`PLN `END<span class="var pln">$uris`END`PLN\n' +
+ ' `END`KWDreturn`END`PLN\n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$published_doc`END`PLN := comoms-dls:publishedDoc(`END<span class="var pln">$uri`END`PLN)\n' +
+ ' `END`KWDreturn`END`PLN\n' +
+ ' `END`KWDif`END`PLN(`END<span class="var pln">$published_doc`END`PLN) `END`KWDthen`END`PLN\n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$published_version_uri`END`PLN := `END<span class="fun pln">xdmp:node-uri`END`PLN(`END<span class="var pln">$published_doc`END`PLN)\n' +
+ ' `END`KWDreturn`END`PLN comoms-dls:unpublishVersion(`END<span class="var pln">$published_version_uri`END`PLN) \n' +
+ ' `END`KWDelse`END`PLN\n' +
+ ' ()\n' +
+ ' };\n' +
+ ' \n' +
+ ' `END`KWDdeclare`END`PLN `END`KWDfunction`END`PLN comoms-dls:latestPublishedDocAuthor(`END<span class="var pln">$uri`END`PLN) {\n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$author_id`END`PLN := `END<span class="fun pln">doc`END`PLN(`END<span class="var pln">$uri`END`PLN)/property::dls:version/dls:author/`END`KWDtext`END`PLN()\n' +
+ ' `END`KWDreturn`END`PLN\n' +
+ ' `END`KWDif`END`PLN(`END<span class="var pln">$author_id`END`PLN) `END`KWDthen`END`PLN\n' +
+ ' comoms-user:getUsername(`END<span class="var pln">$author_id`END`PLN)\n' +
+ ' `END`KWDelse`END`PLN\n' +
+ ' ()\n' +
+ ' \n' +
+ ' };\n' +
+ ' \n' +
+ ' `END`COM(:~\n' +
+ ' : Given a sequence of version URIs, unpublish all of these versions of each document\n' +
+ ' :)`END`PLN\n' +
+ ' `END`KWDdeclare`END`PLN `END`KWDfunction`END`PLN comoms-dls:unpublishVersion(`END<span class="var pln">$version_uris`END`PLN `END`KWDas`END`PLN `END`KWDitem`END`PLN()*) {\n' +
+ ' `END`KWDfor`END`PLN `END<span class="var pln">$uri`END`PLN `END`KWDin`END`PLN `END<span class="var pln">$version_uris`END`PLN\n' +
+ ' `END`KWDreturn`END`PLN\n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$removePermissions`END`PLN := `END<span class="fun pln">dls:document-remove-permissions`END`PLN(`END<span class="var pln">$uri`END`PLN, (`END<span class="fun pln">xdmp:permission`END`PLN(`END`STR\'mkp-anon\'`END`PLN, `END`STR\'read\'`END`PLN)))\n' +
+ ' `END`KWDreturn`END`PLN `END<span class="fun pln">dls:document-remove-collections`END`PLN(`END<span class="var pln">$uri`END`PLN, (`END`STR"PUBLISHED"`END`PLN)) \n' +
+ ' };\n' +
+ ' \n' +
+ ' `END`COM(:~\n' +
+ ' : Given the base URI of a managed piece of content, return the document of the node\n' +
+ ' : of the version that is published\n' +
+ ' :)`END`PLN\n' +
+ ' `END`KWDdeclare`END`PLN `END`KWDfunction`END`PLN comoms-dls:publishedDoc(`END<span class="var pln">$uri`END`PLN) {\n' +
+ ' `END<span class="fun pln">fn:collection`END`PLN(`END`STR"PUBLISHED"`END`PLN)[property::dls:version/dls:document-uri = `END<span class="var pln">$uri`END`PLN]\n' +
+ ' };\n' +
+ ' \n' +
+ ' \n' +
+ ' `END`COM(:~\n' +
+ ' : Test if any version of the managed document is published\n' +
+ ' :)`END`PLN\n' +
+ ' `END`KWDdeclare`END`PLN `END`KWDfunction`END`PLN comoms-dls:isPublished(`END<span class="var pln">$uri`END`PLN) {\n' +
+ ' `END`KWDif`END`PLN( comoms-dls:publishedDoc(`END<span class="var pln">$uri`END`PLN)) `END`KWDthen`END`PLN\n' +
+ ' `END<span class="fun pln">fn:true`END`PLN()\n' +
+ ' `END`KWDelse`END`PLN\n' +
+ ' `END<span class="fun pln">fn:false`END`PLN()\n' +
+ ' };\n' +
+ ' \n' +
+ ' \n' +
+ ' `END`KWDdeclare`END`PLN `END`KWDfunction`END`PLN comoms-dls:publishedState(`END<span class="var pln">$uri`END`PLN) {\n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$doc`END`PLN := comoms-dls:publishedDoc(`END<span class="var pln">$uri`END`PLN)\n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$published_uri`END`PLN := `END`KWDif`END`PLN(`END<span class="var pln">$doc`END`PLN) `END`KWDthen`END`PLN `END<span class="fun pln">xdmp:node-uri`END`PLN(`END<span class="var pln">$doc`END`PLN) `END`KWDelse`END`PLN ()\n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$latest`END`PLN := comoms-dls:latestVersionUri(`END<span class="var pln">$uri`END`PLN)\n' +
+ ' `END`KWDreturn`END`PLN\n' +
+ ' `END`KWDif`END`PLN(`END<span class="var pln">$doc`END`PLN) `END`KWDthen`END`PLN\n' +
+ ' `END`KWDif`END`PLN(`END<span class="var pln">$latest`END`PLN ne `END<span class="var pln">$published_uri`END`PLN) `END`KWDthen`END`PLN\n' +
+ ' `END`STR"stale"`END`PLN\n' +
+ ' `END`KWDelse`END`PLN\n' +
+ ' `END`STR"published"`END`PLN\n' +
+ ' `END`KWDelse`END`PLN\n' +
+ ' `END`STR"unpublished"`END`PLN\n' +
+ ' };\n' +
+ ' \n' +
+ ' \n' +
+ ' `END`KWDdeclare`END`PLN `END`KWDfunction`END`PLN comoms-dls:getManagedDocUri(`END<span class="var pln">$uri`END`PLN) {\n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$doc`END`PLN := `END<span class="fun pln">fn:doc`END`PLN(`END<span class="var pln">$uri`END`PLN)\n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$managed_uri`END`PLN := `END<span class="var pln">$doc`END`PLN/property::dls:version/dls:document-uri/`END`KWDtext`END`PLN()\n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$managed_uri`END`PLN := `END`KWDif`END`PLN(`END<span class="var pln">$managed_uri`END`PLN) `END`KWDthen`END`PLN `END<span class="var pln">$managed_uri`END`PLN `END`KWDelse`END`PLN `END<span class="var pln">$uri`END`PLN\n' +
+ ' `END`KWDreturn`END`PLN `END<span class="var pln">$managed_uri`END`PLN\n' +
+ ' };\n' +
+ ' \n' +
+ ' `END`COM(:~\n' +
+ ' : Given a manage content url (e.g. /content/123456.xml) return the appropriate\n' +
+ ' : version of the document based on what stage collection is being viewed and\n' +
+ ' : what\'s published\n' +
+ ' :\n' +
+ ' : @param $uri a manage content url (e.g. /content/123456.xml) - NOT A VERSIONED URI\n' +
+ ' :)`END`PLN\n' +
+ ' `END`KWDdeclare`END`PLN `END`KWDfunction`END`PLN comoms-dls:doc(`END<span class="var pln">$uri`END`PLN) {\n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$doc`END`PLN := `END<span class="fun pln">fn:root`END`PLN(comoms-dls:collection()[property::dls:version/dls:document-uri = `END<span class="var pln">$uri`END`PLN][1])\n' +
+ ' `END`KWDreturn`END`PLN\n' +
+ ' `END`KWDif`END`PLN(`END<span class="var pln">$doc`END`PLN) `END`KWDthen`END`PLN\n' +
+ ' `END<span class="var pln">$doc`END`PLN\n' +
+ ' `END`KWDelse`END`PLN\n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$managedDocInCollection`END`PLN := comoms-dls:collection-name() = `END<span class="fun pln">xdmp:document-get-collections`END`PLN(`END<span class="var pln">$uri`END`PLN)\n' +
+ ' `END`KWDreturn`END`PLN\n' +
+ ' `END`KWDif`END`PLN(`END<span class="var pln">$managedDocInCollection`END`PLN) `END`KWDthen`END`PLN\n' +
+ ' `END<span class="fun pln">fn:doc`END`PLN(`END<span class="var pln">$uri`END`PLN)\n' +
+ ' `END`KWDelse`END`PLN\n' +
+ ' ()\n' +
+ ' };\n' +
+ ' \n' +
+ ' `END`COM(:~\n' +
+ ' : Get the collection to be used when querying for content\n' +
+ ' : THIS or comoms-dls:collection-name() SHOULD BE USED WHEN BUILDING ANY QUERY FOR MANAGED CONTENT\n' +
+ ' :)`END`PLN\n' +
+ ' `END`KWDdeclare`END`PLN `END`KWDfunction`END`PLN comoms-dls:collection() {\n' +
+ ' `END<span class="fun pln">fn:collection`END`PLN( comoms-dls:collection-name() )\n' +
+ ' };\n' +
+ ' \n' +
+ ' `END`COM(:~\n' +
+ ' : Get the collection nameto be used when querying for content\n' +
+ ' : THIS or comoms-dls:collection() SHOULD BE USED WHEN BUILDING ANY QUERY FOR MANAGED CONTENT\n' +
+ ' :)`END`PLN\n' +
+ ' `END`KWDdeclare`END`PLN `END`KWDfunction`END`PLN comoms-dls:collection-name() `END`KWDas`END`PLN `END`TYPxs:string`END`PLN {\n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$default_collection`END`PLN := `END`STR"PUBLISHED"`END`PLN\n' +
+ ' `END`KWDreturn`END`PLN\n' +
+ ' `END`KWDif`END`PLN(comoms-user:isAdmin()) `END`KWDthen`END`PLN\n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$pub_stage_collection_cookie`END`PLN := comoms-util:getCookie(`END`STR"COMOMS_COLLECTION"`END`PLN)\n' +
+ ' `END`KWDreturn`END`PLN\n' +
+ ' `END`KWDif`END`PLN(`END<span class="var pln">$pub_stage_collection_cookie`END`PLN) `END`KWDthen`END`PLN\n' +
+ ' `END<span class="var pln">$pub_stage_collection_cookie`END`PLN\n' +
+ ' `END`KWDelse`END`PLN\n' +
+ ' `END<span class="var pln">$default_collection`END`PLN\n' +
+ ' `END`KWDelse`END`PLN\n' +
+ ' `END<span class="var pln">$default_collection`END`PLN\n' +
+ ' };\n' +
+ ' \n' +
+ ' `END`COM(:~\n' +
+ ' : Check if the published collection is being viewed\n' +
+ ' :)`END`PLN\n' +
+ ' `END`KWDdeclare`END`PLN `END`KWDfunction`END`PLN comoms-dls:isViewingPublished() {\n' +
+ ' `END`KWDif`END`PLN(comoms-dls:collection-name() = `END`STR"PUBLISHED"`END`PLN) `END`KWDthen`END`PLN\n' +
+ ' `END<span class="fun pln">fn:true`END`PLN()\n' +
+ ' `END`KWDelse`END`PLN\n' +
+ ' `END<span class="fun pln">fn:false`END`PLN()\n' +
+ ' };\n' +
+ ' \n' +
+ ' `END`COM(:~\n' +
+ ' : Get the best URL for the content URI.\n' +
+ ' : This is either the default URI based on detail type or should also take\n' +
+ ' : into account friendly urls and navigation structures to figure out the\n' +
+ ' : best choice\n' +
+ ' :)`END`PLN\n' +
+ ' `END`KWDdeclare`END`PLN `END`KWDfunction`END`PLN comoms-dls:contentUrl(`END<span class="var pln">$uri`END`PLN) {\n' +
+ ' \n' +
+ ' `END`COM(: TODO: add friendly URL and nav structure logic 1st :)`END`PLN\n' +
+ ' \n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$doc`END`PLN := `END<span class="fun pln">fn:doc`END`PLN(`END<span class="var pln">$uri`END`PLN)\n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$managedDocUri`END`PLN := `END<span class="var pln">$doc`END`PLN/property::dls:version/dls:document-uri\n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$uri`END`PLN := `END`KWDif`END`PLN(`END<span class="var pln">$managedDocUri`END`PLN) `END`KWDthen`END`PLN `END<span class="var pln">$managedDocUri`END`PLN `END`KWDelse`END`PLN `END<span class="var pln">$uri`END`PLN\n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$type`END`PLN := `END<span class="var pln">$doc`END`PLN/`END`KWDnode`END`PLN()/`END<span class="fun pln">fn:name`END`PLN()\n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$content_id`END`PLN := `END<span class="fun pln">fn:tokenize`END`PLN( `END<span class="fun pln">fn:tokenize`END`PLN(`END<span class="var pln">$uri`END`PLN, `END`STR"/"`END`PLN)[3], `END`STR"\\."`END`PLN)[1]\n' +
+ ' `END`KWDreturn`END`PLN\n' +
+ ' `END<span class="fun pln">fn:concat`END`PLN(`END`STR"/"`END`PLN, `END<span class="var pln">$type`END`PLN, `END`STR"/"`END`PLN, `END<span class="var pln">$content_id`END`PLN)\n' +
+ ' };\n' +
+ ' \n' +
+ ' `END`COM(:\n' +
+ ' :\n' +
+ ' : gets list of doc versions and uri.\n' +
+ ' :\n' +
+ ' :)`END`PLN\n' +
+ ' `END`KWDdeclare`END`PLN `END`KWDfunction`END`PLN comoms-dls:versionHistory(`END<span class="var pln">$uri`END`PLN) {\n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$published_doc`END`PLN := comoms-dls:publishedDoc(`END<span class="var pln">$uri`END`PLN)\n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$published_uri`END`PLN := `END`KWDif`END`PLN(`END<span class="var pln">$published_doc`END`PLN) `END`KWDthen`END`PLN `END<span class="fun pln">xdmp:node-uri`END`PLN(`END<span class="var pln">$published_doc`END`PLN) `END`KWDelse`END`PLN ()\n' +
+ ' `END`KWDreturn`END`PLN\n' +
+ ' `END`TAG&lt;versions&gt;`END`PLN\n' +
+ ' {\n' +
+ ' `END`KWDfor`END`PLN `END<span class="var pln">$version`END`PLN `END`KWDin`END`PLN `END<span class="fun pln">dls:document-history`END`PLN(`END<span class="var pln">$uri`END`PLN)/dls:version\n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$version_num`END`PLN := `END<span class="var pln">$version`END`PLN/dls:version-id/`END`KWDtext`END`PLN()\n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$created`END`PLN := `END<span class="var pln">$version`END`PLN/dls:created/`END`KWDtext`END`PLN()\n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$author_id`END`PLN := `END<span class="var pln">$version`END`PLN/dls:author/`END`KWDtext`END`PLN()\n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$author`END`PLN := comoms-user:getUsername(`END<span class="var pln">$author_id`END`PLN)\n' +
+ ' \n' +
+ ' \n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$note`END`PLN := `END<span class="var pln">$version`END`PLN/dls:annotation/`END`KWDtext`END`PLN()\n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$version_uri`END`PLN := `END<span class="fun pln">xdmp:node-uri`END`PLN(`END<span class="fun pln">dls:document-version`END`PLN(`END<span class="var pln">$uri`END`PLN, `END<span class="var pln">$version_num`END`PLN))\n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$published`END`PLN := `END<span class="var pln">$published_uri`END`PLN `END`KWDeq`END`PLN `END<span class="var pln">$version_uri`END`PLN\n' +
+ ' `END`KWDreturn`END`PLN\n' +
+ ' `END`TAG&lt;version&gt;`END`PLN\n' +
+ ' `END`TAG&lt;version-number&gt;`END`PLN{`END<span class="var pln">$version_num`END`PLN}`END`TAG&lt;/version-number&gt;`END`PLN\n' +
+ ' `END`TAG&lt;created&gt;`END`PLN{`END<span class="var pln">$created`END`PLN}`END`TAG&lt;/created&gt;`END`PLN \n' +
+ ' `END`TAG&lt;author&gt;`END`PLN{`END<span class="var pln">$author`END`PLN}`END`TAG&lt;/author&gt;`END`PLN\n' +
+ ' `END`TAG&lt;published&gt;`END`PLN{`END<span class="var pln">$published`END`PLN}`END`TAG&lt;/published&gt;`END`PLN\n' +
+ ' `END`TAG&lt;version-uri&gt;`END`PLN{`END<span class="var pln">$version_uri`END`PLN}`END`TAG&lt;/version-uri&gt;`END`PLN\n' +
+ ' `END`TAG&lt;/version&gt;`END`PLN \n' +
+ ' } \n' +
+ ' `END`TAG&lt;/versions&gt;`END`PLN\n' +
+ ' };\n' +
+ ' \n' +
+ ' \n' +
+ ' \n' +
+ ' \n' +
+ ' \n' +
+ ' \n' +
+ ' `END`COM(: ########################################################################### :)`END`PLN\n' +
+ ' `END`COM(: PRIVATE FUNCTIONS :)`END`PLN\n' +
+ ' `END`COM(: ########################################################################### :)`END`PLN\n' +
+ ' \n' +
+ ' `END`KWDdeclare`END`PLN `END`KWDfunction`END`PLN comoms-dls:_import() {\n' +
+ ' `END`STR"xquery version \'1.0-ml\';\n' +
+ ' import module namespace dls = \'http://marklogic.com/xdmp/dls\' at \'/MarkLogic/dls.xqy\'; "`END`PLN\n' +
+ ' }; \n' +
+ ' \n' +
+ '`END`COM(: ----\n' +
+ '---- :)`END`PLN\n' +
+ '`END`KWDxquery`END`PLN `END`KWDversion`END`PLN `END`STR\'1.0-ml\'`END`PLN;\n' +
+ '`END`KWDdeclare`END`PLN `END`KWDvariable`END`PLN `END<span class="var pln">$URI`END`PLN `END`KWDas`END`PLN `END`TYPxs:string`END`PLN `END`KWDexternal`END`PLN;\n' +
+ ' \n' +
+ '`END`KWDdeclare`END`PLN `END`KWDfunction`END`PLN local:document-move-forest(`END<span class="var pln">$uri`END`PLN `END`KWDas`END`PLN `END`TYPxs:string`END`PLN, `END<span class="var pln">$forest-ids`END`PLN `END`KWDas`END`PLN `END`TYPxs:unsignedLong`END`PLN*)\n' +
+ '{\n' +
+ ' `END<span class="fun pln">xdmp:document-insert`END`PLN(\n' +
+ ' `END<span class="var pln">$uri`END`PLN,\n' +
+ ' `END<span class="fun pln">fn:doc`END`PLN(`END<span class="var pln">$uri`END`PLN),\n' +
+ ' `END<span class="fun pln">xdmp:document-get-permissions`END`PLN(`END<span class="var pln">$uri`END`PLN),\n' +
+ ' `END<span class="fun pln">xdmp:document-get-collections`END`PLN(`END<span class="var pln">$uri`END`PLN),\n' +
+ ' `END<span class="fun pln">xdmp:document-get-quality`END`PLN(`END<span class="var pln">$uri`END`PLN),\n' +
+ ' `END<span class="var pln">$forest-ids`END`PLN\n' +
+ ' )\n' +
+ '};\n' +
+ ' \n' +
+ '`END`KWDlet`END`PLN `END<span class="var pln">$xml`END`PLN :=\n' +
+ ' `END`TAG&lt;xml`END`PLN att=`END`STR"blah"`END`PLN att2=`END`STR"blah"`END`TAG&gt;`END`PLN\n' +
+ ' sdasd`END`TAG&lt;b&gt;`END`PLNasdasd`END`TAG&lt;/b&gt;`END`PLN\n' +
+ ' `END`TAG&lt;/xml&gt;`END`PLN\n' +
+ '`END`COM(: -------- :)`END`PLN\n' +
+ '`END`KWDfor`END`PLN `END<span class="var pln">$d`END`PLN `END`KWDin`END`PLN `END<span class="fun pln">fn:doc`END`PLN(`END`STR"depts.xml"`END`PLN)/depts/deptno\n' +
+ '`END`KWDlet`END`PLN `END<span class="var pln">$e`END`PLN := `END<span class="fun pln">fn:doc`END`PLN(`END`STR"emps.xml"`END`PLN)/emps/emp[deptno = `END<span class="var pln">$d`END`PLN]\n' +
+ '`END`KWDwhere`END`PLN `END<span class="fun pln">fn:count`END`PLN(`END<span class="var pln">$e`END`PLN) &gt;= 10\n' +
+ '`END`KWDorder`END`PLN `END`KWDby`END`PLN `END<span class="fun pln">fn:avg`END`PLN(`END<span class="var pln">$e`END`PLN/salary) `END`KWDdescending`END`PLN\n' +
+ '`END`KWDreturn`END`PLN\n' +
+ ' `END`TAG&lt;big-dept&gt;`END`PLN\n' +
+ ' {\n' +
+ ' `END<span class="var pln">$d`END`PLN,\n' +
+ ' `END`TAG&lt;headcount&gt;`END`PLN{`END<span class="fun pln">fn:count`END`PLN(`END<span class="var pln">$e`END`PLN)}`END`TAG&lt;/headcount&gt;`END`PLN,\n' +
+ ' `END`TAG&lt;avgsal&gt;`END`PLN{`END<span class="fun pln">fn:avg`END`PLN(`END<span class="var pln">$e`END`PLN/salary)}`END`TAG&lt;/avgsal&gt;`END`PLN\n' +
+ ' }\n' +
+ ' `END`TAG&lt;/big-dept&gt;`END`PLN\n' +
+ '`END`COM(: -------- :)`END`PLN\n' +
+ '`END`KWDdeclare`END`PLN `END`KWDfunction`END`PLN local:depth(`END<span class="var pln">$e`END`PLN `END`KWDas`END`PLN `END`KWDnode`END`PLN()) `END`KWDas`END`PLN `END`TYPxs:integer`END`PLN\n' +
+ '{\n' +
+ ' `END`COM(: A node with no children has depth 1 :)`END`PLN\n' +
+ ' `END`COM(: Otherwise, add 1 to max depth of children :)`END`PLN\n' +
+ ' `END`KWDif`END`PLN (`END<span class="fun pln">fn:empty`END`PLN(`END<span class="var pln">$e`END`PLN/*)) `END`KWDthen`END`PLN 1\n' +
+ ' `END`KWDelse`END`PLN `END<span class="fun pln">fn:max`END`PLN(`END`KWDfor`END`PLN `END<span class="var pln">$c`END`PLN `END`KWDin`END`PLN `END<span class="var pln">$e`END`PLN/* `END`KWDreturn`END`PLN local:depth(`END<span class="var pln">$c`END`PLN)) + 1\n' +
+ '};\n' +
+ ' \n' +
+ 'local:depth(`END<span class="fun pln">fn:doc`END`PLN(`END`STR"partlist.xml"`END`PLN))\n' +
+ ' \n' +
+ '`END`COM(: -------- :)`END`PLN\n' +
+ '`END`TAG&lt;html&gt;&lt;head`END`PLN/`END`TAG&gt;&lt;body&gt;`END`PLN\n' +
+ '{\n' +
+ ' `END`KWDfor`END`PLN `END<span class="var pln">$act`END`PLN `END`KWDin`END`PLN `END<span class="fun pln">doc`END`PLN(`END`STR"hamlet.xml"`END`PLN)//ACT\n' +
+ ' `END`KWDlet`END`PLN `END<span class="var pln">$speakers`END`PLN := `END<span class="fun pln">distinct-values`END`PLN(`END<span class="var pln">$act`END`PLN//SPEAKER)\n' +
+ ' `END`KWDreturn`END`PLN\n' +
+ ' `END`TAG&lt;div&gt;`END`PLN{ `END<span class="fun pln">string`END`PLN(`END<span class="var pln">$act`END`PLN/TITLE) }`END`TAG&lt;/h1&gt;`END`PLN\n' +
+ ' `END`TAG&lt;ul&gt;`END`PLN\n' +
+ ' {\n' +
+ ' `END`KWDfor`END`PLN `END<span class="var pln">$speaker`END`PLN `END`KWDin`END`PLN `END<span class="var pln">$speakers`END`PLN\n' +
+ ' `END`KWDreturn`END`PLN `END`TAG&lt;li&gt;`END`PLN{ `END<span class="var pln">$speaker`END`PLN }`END`TAG&lt;/li&gt;`END`PLN\n' +
+ ' }\n' +
+ ' `END`TAG&lt;/ul&gt;`END`PLN\n' +
+ ' `END`TAG&lt;/div&gt;`END`PLN\n' +
+ '}\n' +
+ '`END`TAG&lt;/body&gt;&lt;/html&gt;`END`PLN\n' +
+ '`END`COM(: -------- :)`END`PLN\n' +
+ '{\n' +
+ '\t`END`KWDfor`END`PLN `END<span class="var pln">$book`END`PLN `END`KWDin`END`PLN `END<span class="fun pln">doc`END`PLN(`END`STR"books.xml"`END`PLN)//book\n' +
+ ' `END`KWDreturn`END`PLN\n' +
+ '\t`END`KWDif`END`PLN (`END<span class="fun pln">contains`END`PLN(`END<span class="var pln">$book`END`PLN/author/`END`KWDtext`END`PLN(),`END`STR"Herbert"`END`PLN) `END`KWDor`END`PLN `END<span class="fun pln">contains`END`PLN(`END<span class="var pln">$book`END`PLN/author/`END`KWDtext`END`PLN(),`END`STR"Asimov"`END`PLN))\n' +
+ '\t\t`END`KWDthen`END`PLN `END<span class="var pln">$book`END`PLN\n' +
+ '\t`END`KWDelse`END`PLN `END<span class="var pln">$book`END`PLN/`END`KWDtext`END`PLN()\n' +
+ '\t\n' +
+ '\t`END`KWDlet`END`PLN `END<span class="var pln">$let`END`PLN := `END`TAG&lt;x&gt;`END`STR"test"`END`TAG&lt;/x&gt;`END`PLN\n' +
+ '\t`END`KWDreturn`END`PLN `END`KWDelement`END`PLN `END`KWDelement`END`PLN {\n' +
+ '\t`END`KWDattribute`END`PLN `END`KWDattribute`END`PLN { 1 },\n' +
+ '\t`END`KWDelement`END`PLN test { `END`STR\'a\'`END`PLN },\n' +
+ '\t`END`KWDattribute`END`PLN foo { `END`STR"bar"`END`PLN },\n' +
+ '\t`END<span class="fun pln">fn:doc`END`PLN()[ foo/`END`LIT@bar`END`PLN `END`KWDeq`END`PLN `END<span class="var pln">$let`END`PLN ],\n' +
+ '\t//x }\n' +
+ '}\n' +
+ '`END`COM(: -------- :)`END`PLN\n' +
+ '`END`TAG&lt;bib&gt;`END`PLN\n' +
+ ' {\n' +
+ ' `END`KWDfor`END`PLN `END<span class="var pln">$b`END`PLN `END`KWDin`END`PLN `END<span class="fun pln">doc`END`PLN(`END`STR"http://bstore1.example.com/bib.xml"`END`PLN)/bib/book\n' +
+ ' `END`KWDwhere`END`PLN `END<span class="var pln">$b`END`PLN/publisher = `END`STR"Addison-Wesley"`END`PLN `END`KWDand`END`PLN `END<span class="var pln">$b`END`PLN/`END`LIT@year`END`PLN &gt; 1991\n' +
+ ' `END`KWDreturn`END`PLN\n' +
+ ' `END`TAG&lt;book`END`PLN year=`END`STR"`END`PLN{ `END<span class="var pln">$b`END`PLN/`END`LIT@year`END`PLN }`END`STR"`END`TAG&gt;`END`PLN\n' +
+ ' { `END<span class="var pln">$b`END`PLN/title }\n' +
+ ' `END`TAG&lt;/book&gt;`END`PLN\n' +
+ ' }\n' +
+ '`END`TAG&lt;/bib&gt;`END`PLN\n' +
+ '`END`COM(: -------- :)`END'),
+ nemerle: (
+ '`KWDclass`END`PLN Set `END`PUN[`END`PLN\'a`END`PUN]`END`PLN\n' +
+ '`END`PUN{`END`PLN\n' +
+ ' `END`KWDmutable`END`PLN storage `END`PUN:`END`PLN `END`TYPlist`END`PLN `END`PUN[`END`PLN\'a`END`PUN]`END`PLN `END`PUN=`END`PLN `END`PUN[];`END`PLN\n' +
+ ' `END`KWDpublic`END`PLN Add `END`PUN(`END`PLNe `END`PUN:`END`PLN \'a`END`PUN)`END`PLN `END`PUN:`END`PLN `END`TYPvoid`END`PLN\n' +
+ ' `END`PUN{`END`PLN\n' +
+ ' `END`KWDwhen`END`PLN `END`PUN(!`END`PLN Contains `END`PUN(`END`PLNe`END`PUN))`END`PLN\n' +
+ ' storage `END`PUN::=`END`PLN e`END`PUN;`END`PLN\n' +
+ ' `END`PUN}`END`PLN\n' +
+ ' `END`KWDpublic`END`PLN Contains `END`PUN(`END`PLNe `END`PUN:`END`PLN \'a`END`PUN)`END`PLN `END`PUN:`END`PLN `END`TYPbool`END`PLN\n' +
+ ' `END`PUN{`END`PLN\n' +
+ ' storage`END`PUN.`END`PLNContains `END`PUN(`END`PLNe`END`PUN)`END`PLN\n' +
+ ' `END`PUN}`END`PLN\n' +
+ '`END`PUN}`END`PLN\n' +
+ ' \n' +
+ '`END`KWDdef`END`PLN s1 `END`PUN=`END`PLN Set `END`PUN();`END`PLN\n' +
+ 's1`END`PUN.`END`PLNAdd `END`PUN(`END`LIT3`END`PUN);`END`PLN\n' +
+ 's1`END`PUN.`END`PLNAdd `END`PUN(`END`LIT42`END`PUN);`END`PLN\n' +
+ '`END`KWDassert`END`PLN `END`PUN(`END`PLNs1`END`PUN.`END`PLNContains `END`PUN(`END`LIT3`END`PUN));`END`PLN\n' +
+ '`END`COM// s1.Add ("foo"); // error here!`END`PLN\n' +
+ '`END`KWDdef`END`PLN s2 `END`PUN=`END`PLN Set `END`PUN();`END`PLN\n' +
+ 's2`END`PUN.`END`PLNAdd `END`PUN(`END`STR"foo"`END`PUN);`END`PLN\n' +
+ '`END`KWDassert`END`PLN `END`PUN(`END`PLNs2`END`PUN.`END`PLNContains `END`PUN(`END`STR"foo"`END`PUN));`END'),
+ latex: (
+ '`COM% resume.tex`END`PLN\n' +
+ '`END`COM% vim:set ft=tex spell:`END`PLN\n' +
+ '`END`KWD\\documentclass`END`PUN[`END`LIT10pt`END`PLN,letterpaper`END`PUN]{`END`PLNarticle`END`PUN}`END`PLN\n' +
+ '`END`KWD\\usepackage`END`PUN[`END`PLNletterpaper,margin`END`PUN=`END`LIT0.8in`END`PUN]{`END`PLNgeometry`END`PUN}`END`PLN\n' +
+ '`END`KWD\\usepackage`END`PUN{`END`PLNmdwlist`END`PUN}`END`PLN\n' +
+ '`END`KWD\\usepackage`END`PUN[`END`PLNT1`END`PUN]{`END`PLNfontenc`END`PUN}`END`PLN\n' +
+ '`END`KWD\\usepackage`END`PUN{`END`PLNtextcomp`END`PUN}`END`PLN\n' +
+ '`END`KWD\\pagestyle`END`PUN{`END`PLNempty`END`PUN}`END`PLN\n' +
+ '`END`KWD\\setlength`END`PUN{`END`KWD\\tabcolsep`END`PUN}{`END`LIT0em`END`PUN}`END'
+ ),
+ issue144: (
+ '`COM#! /bin/bash`END`PLN\n' +
+ '`END`COM# toascii.sh`END`PLN\n' +
+ '`END`KWDfor`END`PLN i `END`KWDin`END`PLN $`END`PUN(`END`PLNecho $`END`PUN*' +
+ '`END`PLN `END`PUN|`END`PLN fold `END`PUN-`END`PLNw `END`LIT1`END`PUN);`END' +
+ '`KWDdo`END`PLN\n' +
+ ' printf `END`STR"%x "`END`PLN \\\'$i`END`PUN;`END`PLN\n' +
+ '`END`KWDdone`END`PUN;`END`PLN\n' +
+ 'echo`END'
+ ),
+ clojure: '`COM; Clojure test comment`END`PLN\n' +
+ '`END`OPN(`END`KWDns`END`PLN test\n' +
+ ' `END`OPN(`END`TYP:gen-class`END`CLO))`END`PLN\n' +
+ '\n' +
+ '`END`OPN(`END`KWDdef`END`PLN foo `END`STR"bar"`END`CLO)`END`PLN\n' +
+ '`END`OPN(`END`KWDdefn`END`PLN bar `END`OPN[`END`PLNarg1 arg2 &amp; args`END`CLO]`END`PLN\n' +
+ ' `END`STR"sample function"`END`PLN\n' +
+ ' `END`OPN(`END`KWDfor`END`PLN `END`OPN[`END`PLNarg args`END`CLO]`END`PLN\n' +
+ ' `END`OPN(`END`KWDprn`END`PLN arg`END`CLO)))`END`PLN\n' +
+ '\n' +
+ '`END`OPN(`END`PLNbar `END`STR"foo"`END`PLN `END`STR"bar"`END`PLN `END`STR"blah"`END`PLN `END`TYP:baz`END`CLO)`END',
+ html5conv1: '`COM; foo`END',
+ html5conv2: '<code class="language-lisp">`COM; foo`END</code>',
+ html5conv3: ('<code class="language-lisp">`PLN\n' +
+ '`END`COM; foo`END`PLN\n' +
+ '`END</code>\n'),
+ html5conv4: ('`PLNbefore CODE\n' +
+ '`END<code class="language-lisp">`PUN;`END`PLN foo`END</code>\n')
+};
+</script>
+
+</html>
diff --git a/media/prettify-20110601/tests/test_base.js b/media/prettify-20110601/tests/test_base.js
new file mode 100644
index 0000000..203faf4
--- /dev/null
+++ b/media/prettify-20110601/tests/test_base.js
@@ -0,0 +1,246 @@
+// get accurate timing.
+// This file must be loaded after prettify.js for this to work.
+PR_SHOULD_USE_CONTINUATION = false;
+
+var attribToHtml, textToHtml;
+
+var getInnerHtml;
+
+(function () {
+ /** is the given node's innerHTML normally unescaped? */
+ function isRawContent(node) {
+ return 'XMP' === node.tagName;
+ }
+
+ var newlineRe = /[\r\n]/g;
+ /**
+ * Are newlines and adjacent spaces significant in the given node's innerHTML?
+ */
+ function isPreformatted(node, content) {
+ // PRE means preformatted, and is a very common case, so don't create
+ // unnecessary computed style objects.
+ if ('PRE' === node.tagName) { return true; }
+ if (!newlineRe.test(content)) { return true; } // Don't care
+ var whitespace = '';
+ // For disconnected nodes, IE has no currentStyle.
+ if (node.currentStyle) {
+ whitespace = node.currentStyle.whiteSpace;
+ } else if (window.getComputedStyle) {
+ // Firefox makes a best guess if node is disconnected whereas Safari
+ // returns the empty string.
+ whitespace = window.getComputedStyle(node, null).whiteSpace;
+ }
+ return !whitespace || whitespace === 'pre';
+ }
+
+ // Define regexps here so that the interpreter doesn't have to create an
+ // object each time the function containing them is called.
+ // The language spec requires a new object created even if you don't access
+ // the $1 members.
+ var pr_amp = /&/g;
+ var pr_lt = /</g;
+ var pr_gt = />/g;
+ var pr_quot = /\"/g;
+
+ /** escapest html special characters to html. */
+ textToHtml = function (str) {
+ return str.replace(pr_amp, '&amp;')
+ .replace(pr_lt, '&lt;')
+ .replace(pr_gt, '&gt;');
+ };
+
+ /** like textToHtml but escapes double quotes to be attribute safe. */
+ attribToHtml = function (str) {
+ return str.replace(pr_amp, '&amp;')
+ .replace(pr_lt, '&lt;')
+ .replace(pr_gt, '&gt;')
+ .replace(pr_quot, '&quot;');
+ };
+
+ var PR_innerHtmlWorks = null;
+ getInnerHtml = function (node) {
+ // inner html is hopelessly broken in Safari 2.0.4 when the content is
+ // an html description of well formed XML and the containing tag is a PRE
+ // tag, so we detect that case and emulate innerHTML.
+ if (null === PR_innerHtmlWorks) {
+ var testNode = document.createElement('PRE');
+ testNode.appendChild(
+ document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />'));
+ PR_innerHtmlWorks = !/</.test(testNode.innerHTML);
+ }
+
+ if (PR_innerHtmlWorks) {
+ var content = node.innerHTML;
+ // XMP tags contain unescaped entities so require special handling.
+ if (isRawContent(node)) {
+ content = textToHtml(content);
+ } else if (!isPreformatted(node, content)) {
+ content = content.replace(/(<br\s*\/?>)[\r\n]+/g, '$1')
+ .replace(/(?:[\r\n]+[ \t]*)+/g, ' ');
+ }
+ return content;
+ }
+
+ var out = [];
+ for (var child = node.firstChild; child; child = child.nextSibling) {
+ normalizedHtml(child, out);
+ }
+ return out.join('');
+ };
+})();
+
+function normalizedHtml(node, out, opt_sortAttrs) {
+ switch (node.nodeType) {
+ case 1: // an element
+ var name = node.tagName.toLowerCase();
+
+ out.push('<', name);
+ var attrs = node.attributes;
+ var n = attrs.length;
+ if (n) {
+ if (opt_sortAttrs) {
+ var sortedAttrs = [];
+ for (var i = n; --i >= 0;) { sortedAttrs[i] = attrs[i]; }
+ sortedAttrs.sort(function (a, b) {
+ return (a.name < b.name) ? -1 : a.name === b.name ? 0 : 1;
+ });
+ attrs = sortedAttrs;
+ }
+ for (var i = 0; i < n; ++i) {
+ var attr = attrs[i];
+ if (!attr.specified) { continue; }
+ out.push(' ', attr.name.toLowerCase(),
+ '="', attribToHtml(attr.value), '"');
+ }
+ }
+ out.push('>');
+ for (var child = node.firstChild; child; child = child.nextSibling) {
+ normalizedHtml(child, out, opt_sortAttrs);
+ }
+ if (node.firstChild || !/^(?:br|link|img)$/.test(name)) {
+ out.push('<\/', name, '>');
+ }
+ break;
+ case 3: case 4: // text
+ out.push(textToHtml(node.nodeValue));
+ break;
+ }
+}
+
+
+/**
+ * @param golden a mapping from IDs of prettyprinted chunks to an abbreviated
+ * form of the expected output. See "var goldens" in prettify_test.html
+ * for an example.
+ */
+function go(goldens) {
+ startClock();
+ prettyPrint(function () { stopClock(); runTests(goldens); });
+}
+
+function runTests(goldens) {
+ /** number of characters in common at the end up to max. */
+ function commonPrefix(a, b) {
+ var n = Math.min(a.length, b.length);
+ var i;
+ for (i = 0; i < n; ++i) {
+ if (a.charAt(i) !== b.charAt(i)) { break; }
+ }
+ return i;
+ }
+
+ /** number of characters in common at the end up to max. */
+ function commonSuffix(a, b, max) {
+ var n = Math.min(a.length - max, b.length - max);
+ var i;
+ for (i = 0; i < n; ++i) {
+ if (a.charAt(a.length - i - 1) !== b.charAt(b.length - i - 1)) { break; }
+ }
+ return i;
+ }
+
+ /** convert a plain text string to html by escaping html special chars. */
+ function html(plainText) {
+ return attribToHtml(plainText).replace(/\xa0/g, '&nbsp;');
+ }
+
+ /**
+ * get normalized markup. innerHTML varies enough across browsers that we
+ * can't use it.
+ */
+ function normalizedInnerHtml(node) {
+ var out = [];
+ for (var child = node.firstChild; child; child = child.nextSibling) {
+ normalizedHtml(child, out, true);
+ }
+ out = out.join('');
+ // more normalization to work around problems with non-ascii chars in
+ // regexps in Safari
+ for (var i = 0; (i = out.indexOf('\xa0')) >= 0;) {
+ out = out.substring(0, i) + '&nbsp;' + out.substring(i + 1);
+ }
+ return out.replace(/\r\n?/g, '\n');
+ }
+
+ var htmlOut = [];
+ var failures = 0;
+ document.getElementById('errorReport').innerHTML =
+ '<h1>Running tests&hellip;<\/h1>';
+ htmlOut.push('<h1>Test results<\/h1>');
+ for (var lang in goldens) {
+ var container = document.getElementById(lang);
+ // Convert abbreviations that start with `.
+ var golden = goldens[lang].replace(/`([A-Z]{3})/g, function (_, lbl) {
+ return (lbl == 'END'
+ ? '<\/span>'
+ : '<span class="' + lbl.toLowerCase() + '">');
+ })
+ // Line numbers
+ .replace(/`#(?![0-9])/, '<li class="L0">')
+ .replace(/`#([0-9])/g, '</li><li class="L$1">');
+ var actual = normalizedInnerHtml(container);
+ if (golden !== actual) { // test failed
+ // write out
+ var pre = commonPrefix(golden, actual);
+ var post = commonSuffix(golden, actual, pre);
+
+ ++failures;
+ htmlOut.push(
+ '<h2><a href="#' + html(lang) + '">'
+ + html(lang) + '<\/a> Failed<\/h2>');
+ htmlOut.push(
+ '<tt>' + html(golden.substring(0, pre)) +
+ '&raquo;<span class="mismatch">' +
+ html(golden.substring(pre, golden.length - post)) +
+ '<\/span>&laquo;' +
+ html(golden.substring(golden.length - post)) +
+
+ '<br>!==<br>' +
+
+ html(actual.substring(0, pre)) +
+ '&raquo;<span class="mismatch">' +
+ html(actual.substring(pre, actual.length - post)) +
+ '<\/span>&laquo;' +
+ html(actual.substring(actual.length - post)) + '<\/tt>');
+ } else {
+ htmlOut.push(
+ '<h2><a href="#' + html(lang) + '">' + html(lang) + '<\/a> OK<\/h2>');
+ }
+ }
+ var summary = (failures ? (failures + ' test(s) failed') : 'Tests Passed');
+ htmlOut.push('<h2>' + summary + '<\/h2>');
+ document.title += ' \u2014 ' + summary;
+ document.getElementById('errorReport').innerHTML =
+ htmlOut.join('').replace(/&lt;br&gt;/g, '&lt;br&gt;\n');
+}
+
+var startTime = null;
+function startClock() {
+ startTime = (new Date).getTime();
+}
+
+function stopClock() {
+ var delta = (new Date).getTime() - startTime;
+ startTime = null;
+ document.getElementById('timing').innerHTML = 'Took ' + delta + ' ms';
+}
diff --git a/media/prettify-20110601/tests/test_styles.css b/media/prettify-20110601/tests/test_styles.css
new file mode 100644
index 0000000..23c5946
--- /dev/null
+++ b/media/prettify-20110601/tests/test_styles.css
@@ -0,0 +1,5 @@
+/* Used by error reporting code in test_base.js */
+.mismatch { background: #fee; font-weight: bold }
+span.annot { margin:2px 2px 2px 3em; border:1px dotted #88f; background:#eef;
+ padding: 0 2px 0 2px }
+.nocode { background: #f8f8f8 }
diff --git a/media/prettify-min-20100721/lang-apollo.js b/media/prettify-min-20100721/lang-apollo.js
deleted file mode 100644
index bfc0014..0000000
--- a/media/prettify-min-20100721/lang-apollo.js
+++ /dev/null
@@ -1,2 +0,0 @@
-PR.registerLangHandler(PR.createSimpleLexer([["com",/^#[^\r\n]*/,null,"#"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\s/,
-null],["typ",/^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[SE]?BANK\=?|BLOCK|BNKSUM|E?CADR|COUNT\*?|2?DEC\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\s/,null],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[!-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),["apollo","agc","aea"]) \ No newline at end of file
diff --git a/media/prettify-min-20100721/lang-css.js b/media/prettify-min-20100721/lang-css.js
deleted file mode 100644
index 61157f3..0000000
--- a/media/prettify-min-20100721/lang-css.js
+++ /dev/null
@@ -1,2 +0,0 @@
-PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[ \t\r\n\f]+/,null," \t\r\n\u000c"]],[["str",/^\"(?:[^\n\r\f\\\"]|\\(?:\r\n?|\n|\f)|\\[\s\S])*\"/,null],["str",/^\'(?:[^\n\r\f\\\']|\\(?:\r\n?|\n|\f)|\\[\s\S])*\'/,null],["lang-css-str",/^url\(([^\)\"\']*)\)/i],["kwd",/^(?:url|rgb|\!important|@import|@page|@media|@charset|inherit)(?=[^\-\w]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|(?:\\[0-9a-f]+ ?))(?:[_a-z0-9\-]|\\(?:\\[0-9a-f]+ ?))*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^\/*][^*]*\*+)*\//],
-["com",/^(?:<!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#(?:[0-9a-f]{3}){1,2}/i],["pln",/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i],["pun",/^[^\s\w\'\"]+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|(?:\\[\da-f]+ ?))(?:[_a-z\d\-]|\\(?:\\[\da-f]+ ?))*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^\)\"\']+/]]),["css-str"]) \ No newline at end of file
diff --git a/media/prettify-min-20100721/lang-hs.js b/media/prettify-min-20100721/lang-hs.js
deleted file mode 100644
index 00cea7c..0000000
--- a/media/prettify-min-20100721/lang-hs.js
+++ /dev/null
@@ -1,2 +0,0 @@
-PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\x0B\x0C\r ]+/,null,"\t\n\u000b\u000c\r "],["str",/^\"(?:[^\"\\\n\x0C\r]|\\[\s\S])*(?:\"|$)/,null,'"'],["str",/^\'(?:[^\'\\\n\x0C\r]|\\[^&])\'?/,null,"'"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+\-]?\d+)?)/i,null,"0123456789"]],[["com",/^(?:(?:--+(?:[^\r\n\x0C]*)?)|(?:\{-(?:[^-]|-+[^-\}])*-\}))/],["kwd",/^(?:case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)(?=[^a-zA-Z0-9\']|$)/,
-null],["pln",/^(?:[A-Z][\w\']*\.)*[a-zA-Z][\w\']*/],["pun",/^[^\t\n\x0B\x0C\r a-zA-Z0-9\'\"]+/]]),["hs"]) \ No newline at end of file
diff --git a/media/prettify-min-20100721/lang-lisp.js b/media/prettify-min-20100721/lang-lisp.js
deleted file mode 100644
index fab992b..0000000
--- a/media/prettify-min-20100721/lang-lisp.js
+++ /dev/null
@@ -1,2 +0,0 @@
-PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(/,null,"("],["clo",/^\)/,null,")"],["com",/^;[^\r\n]*/,null,";"],["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)/,null,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/,
-null],["lit",/^[+\-]?(?:0x[0-9a-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[ed][+\-]?\d+)?)/i],["lit",/^\'(?:-*(?:\w|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?)?/],["pln",/^-*(?:[a-z_]|\\[\x21-\x7e])(?:[\w-]*|\\[\x21-\x7e])[=!?]?/i],["pun",/^[^\w\t\n\r \xA0()\"\\\';]+/]]),["cl","el","lisp","scm"]) \ No newline at end of file
diff --git a/media/prettify-min-20100721/lang-lua.js b/media/prettify-min-20100721/lang-lua.js
deleted file mode 100644
index 45d0ba2..0000000
--- a/media/prettify-min-20100721/lang-lua.js
+++ /dev/null
@@ -1,2 +0,0 @@
-PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^(?:\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\]|\\[\s\S])*(?:\'|$))/,null,"\"'"]],[["com",/^--(?:\[(=*)\[[\s\S]*?(?:\]\1\]|$)|[^\r\n]*)/],["str",/^\[(=*)\[[\s\S]*?(?:\]\1\]|$)/],["kwd",/^(?:and|break|do|else|elseif|end|false|for|function|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,null],["lit",/^[+-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],
-["pln",/^[a-z_]\w*/i],["pun",/^[^\w\t\n\r \xA0][^\w\t\n\r \xA0\"\'\-\+=]*/]]),["lua"]) \ No newline at end of file
diff --git a/media/prettify-min-20100721/lang-ml.js b/media/prettify-min-20100721/lang-ml.js
deleted file mode 100644
index 5879726..0000000
--- a/media/prettify-min-20100721/lang-ml.js
+++ /dev/null
@@ -1,2 +0,0 @@
-PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["com",/^#(?:if[\t\n\r \xA0]+(?:[a-z_$][\w\']*|``[^\r\n\t`]*(?:``|$))|else|endif|light)/i,null,"#"],["str",/^(?:\"(?:[^\"\\]|\\[\s\S])*(?:\"|$)|\'(?:[^\'\\]|\\[\s\S])*(?:\'|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\r\n]*|\(\*[\s\S]*?\*\))/],["kwd",/^(?:abstract|and|as|assert|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|if|in|inherit|inline|interface|internal|lazy|let|match|member|module|mutable|namespace|new|null|of|open|or|override|private|public|rec|return|static|struct|then|to|true|try|type|upcast|use|val|void|when|while|with|yield|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|global|include|method|mixin|object|parallel|process|protected|pure|sealed|trait|virtual|volatile)\b/],
-["lit",/^[+\-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],["pln",/^(?:[a-z_]\w*[!?#]?|``[^\r\n\t`]*(?:``|$))/i],["pun",/^[^\t\n\r \xA0\"\'\w]+/]]),["fs","ml"]) \ No newline at end of file
diff --git a/media/prettify-min-20100721/lang-proto.js b/media/prettify-min-20100721/lang-proto.js
deleted file mode 100644
index f713420..0000000
--- a/media/prettify-min-20100721/lang-proto.js
+++ /dev/null
@@ -1 +0,0 @@
-PR.registerLangHandler(PR.sourceDecorator({keywords:"bool bytes default double enum extend extensions false fixed32 fixed64 float group import int32 int64 max message option optional package repeated required returns rpc service sfixed32 sfixed64 sint32 sint64 string syntax to true uint32 uint64",cStyleComments:true}),["proto"]) \ No newline at end of file
diff --git a/media/prettify-min-20100721/lang-scala.js b/media/prettify-min-20100721/lang-scala.js
deleted file mode 100644
index 00f4e0c..0000000
--- a/media/prettify-min-20100721/lang-scala.js
+++ /dev/null
@@ -1,2 +0,0 @@
-PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^(?:"(?:(?:""(?:""?(?!")|[^\\"]|\\.)*"{0,3})|(?:[^"\r\n\\]|\\.)*"?))/,null,'"'],["lit",/^`(?:[^\r\n\\`]|\\.)*`?/,null,"`"],["pun",/^[!#%&()*+,\-:;<=>?@\[\\\]^{|}~]+/,null,"!#%&()*+,-:;<=>?@[\\]^{|}~"]],[["str",/^'(?:[^\r\n\\']|\\(?:'|[^\r\n']+))'/],["lit",/^'[a-zA-Z_$][\w$]*(?!['$\w])/],["kwd",/^(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|object|override|package|private|protected|requires|return|sealed|super|throw|trait|try|type|val|var|while|with|yield)\b/],
-["lit",/^(?:true|false|null|this)\b/],["lit",/^(?:(?:0(?:[0-7]+|X[0-9A-F]+))L?|(?:(?:0|[1-9][0-9]*)(?:(?:\.[0-9]+)?(?:E[+\-]?[0-9]+)?F?|L?))|\\.[0-9]+(?:E[+\-]?[0-9]+)?F?)/i],["typ",/^[$_]*[A-Z][_$A-Z0-9]*[a-z][\w$]*/],["pln",/^[$a-zA-Z_][\w$]*/],["com",/^\/(?:\/.*|\*(?:\/|\**[^*/])*(?:\*+\/?)?)/],["pun",/^(?:\.+|\/)/]]),["scala"]) \ No newline at end of file
diff --git a/media/prettify-min-20100721/lang-sql.js b/media/prettify-min-20100721/lang-sql.js
deleted file mode 100644
index 800b13e..0000000
--- a/media/prettify-min-20100721/lang-sql.js
+++ /dev/null
@@ -1,2 +0,0 @@
-PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^(?:"(?:[^\"\\]|\\.)*"|'(?:[^\'\\]|\\.)*')/,null,"\"'"]],[["com",/^(?:--[^\r\n]*|\/\*[\s\S]*?(?:\*\/|$))/],["kwd",/^(?:ADD|ALL|ALTER|AND|ANY|AS|ASC|AUTHORIZATION|BACKUP|BEGIN|BETWEEN|BREAK|BROWSE|BULK|BY|CASCADE|CASE|CHECK|CHECKPOINT|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMN|COMMIT|COMPUTE|CONSTRAINT|CONTAINS|CONTAINSTABLE|CONTINUE|CONVERT|CREATE|CROSS|CURRENT|CURRENT_DATE|CURRENT_TIME|CURRENT_TIMESTAMP|CURRENT_USER|CURSOR|DATABASE|DBCC|DEALLOCATE|DECLARE|DEFAULT|DELETE|DENY|DESC|DISK|DISTINCT|DISTRIBUTED|DOUBLE|DROP|DUMMY|DUMP|ELSE|END|ERRLVL|ESCAPE|EXCEPT|EXEC|EXECUTE|EXISTS|EXIT|FETCH|FILE|FILLFACTOR|FOR|FOREIGN|FREETEXT|FREETEXTTABLE|FROM|FULL|FUNCTION|GOTO|GRANT|GROUP|HAVING|HOLDLOCK|IDENTITY|IDENTITYCOL|IDENTITY_INSERT|IF|IN|INDEX|INNER|INSERT|INTERSECT|INTO|IS|JOIN|KEY|KILL|LEFT|LIKE|LINENO|LOAD|NATIONAL|NOCHECK|NONCLUSTERED|NOT|NULL|NULLIF|OF|OFF|OFFSETS|ON|OPEN|OPENDATASOURCE|OPENQUERY|OPENROWSET|OPENXML|OPTION|OR|ORDER|OUTER|OVER|PERCENT|PLAN|PRECISION|PRIMARY|PRINT|PROC|PROCEDURE|PUBLIC|RAISERROR|READ|READTEXT|RECONFIGURE|REFERENCES|REPLICATION|RESTORE|RESTRICT|RETURN|REVOKE|RIGHT|ROLLBACK|ROWCOUNT|ROWGUIDCOL|RULE|SAVE|SCHEMA|SELECT|SESSION_USER|SET|SETUSER|SHUTDOWN|SOME|STATISTICS|SYSTEM_USER|TABLE|TEXTSIZE|THEN|TO|TOP|TRAN|TRANSACTION|TRIGGER|TRUNCATE|TSEQUAL|UNION|UNIQUE|UPDATE|UPDATETEXT|USE|USER|VALUES|VARYING|VIEW|WAITFOR|WHEN|WHERE|WHILE|WITH|WRITETEXT)(?=[^\w-]|$)/i,
-null],["lit",/^[+-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],["pln",/^[a-z_][\w-]*/i],["pun",/^[^\w\t\n\r \xA0\"\'][^\w\t\n\r \xA0+\-\"\']*/]]),["sql"]) \ No newline at end of file
diff --git a/media/prettify-min-20100721/lang-vb.js b/media/prettify-min-20100721/lang-vb.js
deleted file mode 100644
index c479c11..0000000
--- a/media/prettify-min-20100721/lang-vb.js
+++ /dev/null
@@ -1,2 +0,0 @@
-PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0\u2028\u2029]+/,null,"\t\n\r \u00a0\u2028\u2029"],["str",/^(?:[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})(?:[\"\u201C\u201D]c|$)|[\"\u201C\u201D](?:[^\"\u201C\u201D]|[\"\u201C\u201D]{2})*(?:[\"\u201C\u201D]|$))/i,null,'"\u201c\u201d'],["com",/^[\'\u2018\u2019][^\r\n\u2028\u2029]*/,null,"'\u2018\u2019"]],[["kwd",/^(?:AddHandler|AddressOf|Alias|And|AndAlso|Ansi|As|Assembly|Auto|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|CBool|CByte|CChar|CDate|CDbl|CDec|Char|CInt|Class|CLng|CObj|Const|CShort|CSng|CStr|CType|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else|ElseIf|End|EndIf|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get|GetType|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|Let|Lib|Like|Long|Loop|Me|Mod|Module|MustInherit|MustOverride|MyBase|MyClass|Namespace|New|Next|Not|NotInheritable|NotOverridable|Object|On|Option|Optional|Or|OrElse|Overloads|Overridable|Overrides|ParamArray|Preserve|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|Select|Set|Shadows|Shared|Short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TypeOf|Unicode|Until|Variant|Wend|When|While|With|WithEvents|WriteOnly|Xor|EndIf|GoSub|Let|Variant|Wend)\b/i,
-null],["com",/^REM[^\r\n\u2028\u2029]*/i],["lit",/^(?:True\b|False\b|Nothing\b|\d+(?:E[+\-]?\d+[FRD]?|[FRDSIL])?|(?:&H[0-9A-F]+|&O[0-7]+)[SIL]?|\d*\.\d+(?:E[+\-]?\d+)?[FRD]?|#\s+(?:\d+[\-\/]\d+[\-\/]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)?|\d+:\d+(?::\d+)?(\s*(?:AM|PM))?)\s+#)/i],["pln",/^(?:(?:[a-z]|_\w)\w*|\[(?:[a-z]|_\w)\w*\])/i],["pun",/^[^\w\t\n\r \"\'\[\]\xA0\u2018\u2019\u201C\u201D\u2028\u2029]+/],["pun",/^(?:\[|\])/]]),["vb","vbs"]) \ No newline at end of file
diff --git a/media/prettify-min-20100721/lang-vhdl.js b/media/prettify-min-20100721/lang-vhdl.js
deleted file mode 100644
index dc81a3f..0000000
--- a/media/prettify-min-20100721/lang-vhdl.js
+++ /dev/null
@@ -1,3 +0,0 @@
-PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"]],[["str",/^(?:[BOX]?"(?:[^\"]|"")*"|'.')/i],["com",/^--[^\r\n]*/],["kwd",/^(?:abs|access|after|alias|all|and|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|mod|nand|new|next|nor|not|null|of|on|open|or|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|rem|report|return|rol|ror|select|severity|shared|signal|sla|sll|sra|srl|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with|xnor|xor)(?=[^\w-]|$)/i,
-null],["typ",/^(?:bit|bit_vector|character|boolean|integer|real|time|string|severity_level|positive|natural|signed|unsigned|line|text|std_u?logic(?:_vector)?)(?=[^\w-]|$)/i,null],["typ",/^\'(?:ACTIVE|ASCENDING|BASE|DELAYED|DRIVING|DRIVING_VALUE|EVENT|HIGH|IMAGE|INSTANCE_NAME|LAST_ACTIVE|LAST_EVENT|LAST_VALUE|LEFT|LEFTOF|LENGTH|LOW|PATH_NAME|POS|PRED|QUIET|RANGE|REVERSE_RANGE|RIGHT|RIGHTOF|SIMPLE_NAME|STABLE|SUCC|TRANSACTION|VAL|VALUE)(?=[^\w-]|$)/i,null],["lit",/^\d+(?:_\d+)*(?:#[\w\\.]+#(?:[+\-]?\d+(?:_\d+)*)?|(?:\.\d+(?:_\d+)*)?(?:E[+\-]?\d+(?:_\d+)*)?)/i],
-["pln",/^(?:[a-z]\w*|\\[^\\]*\\)/i],["pun",/^[^\w\t\n\r \xA0\"\'][^\w\t\n\r \xA0\-\"\']*/]]),["vhdl","vhd"]) \ No newline at end of file
diff --git a/media/prettify-min-20100721/lang-wiki.js b/media/prettify-min-20100721/lang-wiki.js
deleted file mode 100644
index 3b8fb50..0000000
--- a/media/prettify-min-20100721/lang-wiki.js
+++ /dev/null
@@ -1,2 +0,0 @@
-PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t \xA0a-gi-z0-9]+/,null,"\t \u00a0abcdefgijklmnopqrstuvwxyz0123456789"],["pun",/^[=*~\^\[\]]+/,null,"=*~^[]"]],[["lang-wiki.meta",/(?:^^|\r\n?|\n)(#[a-z]+)\b/],["lit",/^(?:[A-Z][a-z][a-z0-9]+[A-Z][a-z][a-zA-Z0-9]+)\b/],["lang-",/^\{\{\{([\s\S]+?)\}\}\}/],["lang-",/^`([^\r\n`]+)`/],["str",/^https?:\/\/[^\/?#\s]*(?:\/[^?#\s]*)?(?:\?[^#\s]*)?(?:#\S*)?/i],["pln",/^(?:\r\n|[\s\S])[^#=*~^A-Zh\{`\[\r\n]*/]]),["wiki"]);
-PR.registerLangHandler(PR.createSimpleLexer([["kwd",/^#[a-z]+/i,null,"#"]],[]),["wiki.meta"]) \ No newline at end of file
diff --git a/media/prettify-min-20100721/lang-yaml.js b/media/prettify-min-20100721/lang-yaml.js
deleted file mode 100644
index f2f3607..0000000
--- a/media/prettify-min-20100721/lang-yaml.js
+++ /dev/null
@@ -1,2 +0,0 @@
-PR.registerLangHandler(PR.createSimpleLexer([["pun",/^[:|>?]+/,null,":|>?"],["dec",/^%(?:YAML|TAG)[^#\r\n]+/,null,"%"],["typ",/^[&]\S+/,null,"&"],["typ",/^!\S*/,null,"!"],["str",/^"(?:[^\\"]|\\.)*(?:"|$)/,null,'"'],["str",/^'(?:[^']|'')*(?:'|$)/,null,"'"],["com",/^#[^\r\n]*/,null,"#"],["pln",/^\s+/,null," \t\r\n"]],[["dec",/^(?:---|\.\.\.)(?:[\r\n]|$)/],["pun",/^-/],["kwd",/^\w+:[ \r\n]/],["pln",/^\w+/]]),
-["yaml","yml"]) \ No newline at end of file
diff --git a/media/prettify-min-20100721/prettify-combined.js b/media/prettify-min-20100721/prettify-combined.js
deleted file mode 100644
index d7bebc2..0000000
--- a/media/prettify-min-20100721/prettify-combined.js
+++ /dev/null
@@ -1,36 +0,0 @@
-window.PR_SHOULD_USE_CONTINUATION=true;window.PR_TAB_WIDTH=8;window.PR_normalizedHtml=window.PR=window.prettyPrintOne=window.prettyPrint=void 0;window._pr_isIE6=function(){var y=navigator&&navigator.userAgent&&navigator.userAgent.match(/\bMSIE ([678])\./);y=y?+y[1]:false;window._pr_isIE6=function(){return y};return y};
-(function(){function y(b){return b.replace(L,"&amp;").replace(M,"&lt;").replace(N,"&gt;")}function H(b,f,i){switch(b.nodeType){case 1:var o=b.tagName.toLowerCase();f.push("<",o);var l=b.attributes,n=l.length;if(n){if(i){for(var r=[],j=n;--j>=0;)r[j]=l[j];r.sort(function(q,m){return q.name<m.name?-1:q.name===m.name?0:1});l=r}for(j=0;j<n;++j){r=l[j];r.specified&&f.push(" ",r.name.toLowerCase(),'="',r.value.replace(L,"&amp;").replace(M,"&lt;").replace(N,"&gt;").replace(X,"&quot;"),'"')}}f.push(">");
-for(l=b.firstChild;l;l=l.nextSibling)H(l,f,i);if(b.firstChild||!/^(?:br|link|img)$/.test(o))f.push("</",o,">");break;case 3:case 4:f.push(y(b.nodeValue));break}}function O(b){function f(c){if(c.charAt(0)!=="\\")return c.charCodeAt(0);switch(c.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(c.substring(2),16)||c.charCodeAt(1);case "0":case "1":case "2":case "3":case "4":case "5":case "6":case "7":return parseInt(c.substring(1),
-8);default:return c.charCodeAt(1)}}function i(c){if(c<32)return(c<16?"\\x0":"\\x")+c.toString(16);c=String.fromCharCode(c);if(c==="\\"||c==="-"||c==="["||c==="]")c="\\"+c;return c}function o(c){var d=c.substring(1,c.length-1).match(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"));c=[];for(var a=[],k=d[0]==="^",e=k?1:0,h=d.length;e<h;++e){var g=d[e];switch(g){case "\\B":case "\\b":case "\\D":case "\\d":case "\\S":case "\\s":case "\\W":case "\\w":c.push(g);
-continue}g=f(g);var s;if(e+2<h&&"-"===d[e+1]){s=f(d[e+2]);e+=2}else s=g;a.push([g,s]);if(!(s<65||g>122)){s<65||g>90||a.push([Math.max(65,g)|32,Math.min(s,90)|32]);s<97||g>122||a.push([Math.max(97,g)&-33,Math.min(s,122)&-33])}}a.sort(function(v,w){return v[0]-w[0]||w[1]-v[1]});d=[];g=[NaN,NaN];for(e=0;e<a.length;++e){h=a[e];if(h[0]<=g[1]+1)g[1]=Math.max(g[1],h[1]);else d.push(g=h)}a=["["];k&&a.push("^");a.push.apply(a,c);for(e=0;e<d.length;++e){h=d[e];a.push(i(h[0]));if(h[1]>h[0]){h[1]+1>h[0]&&a.push("-");
-a.push(i(h[1]))}}a.push("]");return a.join("")}function l(c){for(var d=c.source.match(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=d.length,k=[],e=0,h=0;e<a;++e){var g=d[e];if(g==="(")++h;else if("\\"===g.charAt(0))if((g=+g.substring(1))&&g<=h)k[g]=-1}for(e=1;e<k.length;++e)if(-1===k[e])k[e]=++n;for(h=e=0;e<a;++e){g=d[e];if(g==="("){++h;if(k[h]===undefined)d[e]="(?:"}else if("\\"===
-g.charAt(0))if((g=+g.substring(1))&&g<=h)d[e]="\\"+k[h]}for(h=e=0;e<a;++e)if("^"===d[e]&&"^"!==d[e+1])d[e]="";if(c.ignoreCase&&r)for(e=0;e<a;++e){g=d[e];c=g.charAt(0);if(g.length>=2&&c==="[")d[e]=o(g);else if(c!=="\\")d[e]=g.replace(/[a-zA-Z]/g,function(s){s=s.charCodeAt(0);return"["+String.fromCharCode(s&-33,s|32)+"]"})}return d.join("")}for(var n=0,r=false,j=false,q=0,m=b.length;q<m;++q){var t=b[q];if(t.ignoreCase)j=true;else if(/[a-z]/i.test(t.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,
-""))){r=true;j=false;break}}var p=[];q=0;for(m=b.length;q<m;++q){t=b[q];if(t.global||t.multiline)throw Error(""+t);p.push("(?:"+l(t)+")")}return RegExp(p.join("|"),j?"gi":"g")}function Y(b){var f=0;return function(i){for(var o=null,l=0,n=0,r=i.length;n<r;++n)switch(i.charAt(n)){case "\t":o||(o=[]);o.push(i.substring(l,n));l=b-f%b;for(f+=l;l>=0;l-=16)o.push(" ".substring(0,l));l=n+1;break;case "\n":f=0;break;default:++f}if(!o)return i;o.push(i.substring(l));return o.join("")}}function I(b,
-f,i,o){if(f){b={source:f,c:b};i(b);o.push.apply(o,b.d)}}function B(b,f){var i={},o;(function(){for(var r=b.concat(f),j=[],q={},m=0,t=r.length;m<t;++m){var p=r[m],c=p[3];if(c)for(var d=c.length;--d>=0;)i[c.charAt(d)]=p;p=p[1];c=""+p;if(!q.hasOwnProperty(c)){j.push(p);q[c]=null}}j.push(/[\0-\uffff]/);o=O(j)})();var l=f.length;function n(r){for(var j=r.c,q=[j,z],m=0,t=r.source.match(o)||[],p={},c=0,d=t.length;c<d;++c){var a=t[c],k=p[a],e=void 0,h;if(typeof k==="string")h=false;else{var g=i[a.charAt(0)];
-if(g){e=a.match(g[1]);k=g[0]}else{for(h=0;h<l;++h){g=f[h];if(e=a.match(g[1])){k=g[0];break}}e||(k=z)}if((h=k.length>=5&&"lang-"===k.substring(0,5))&&!(e&&typeof e[1]==="string")){h=false;k=P}h||(p[a]=k)}g=m;m+=a.length;if(h){h=e[1];var s=a.indexOf(h),v=s+h.length;if(e[2]){v=a.length-e[2].length;s=v-h.length}k=k.substring(5);I(j+g,a.substring(0,s),n,q);I(j+g+s,h,Q(k,h),q);I(j+g+v,a.substring(v),n,q)}else q.push(j+g,k)}r.d=q}return n}function x(b){var f=[],i=[];if(b.tripleQuotedStrings)f.push([A,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,
-null,"'\""]);else b.multiLineStrings?f.push([A,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):f.push([A,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]);b.verbatimStrings&&i.push([A,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);if(b.hashComments)if(b.cStyleComments){f.push([C,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]);i.push([A,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,
-null])}else f.push([C,/^#[^\r\n]*/,null,"#"]);if(b.cStyleComments){i.push([C,/^\/\/[^\r\n]*/,null]);i.push([C,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}b.regexLiterals&&i.push(["lang-regex",RegExp("^"+Z+"(/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/)")]);b=b.keywords.replace(/^\s+|\s+$/g,"");b.length&&i.push([R,RegExp("^(?:"+b.replace(/\s+/g,"|")+")\\b"),null]);f.push([z,/^\s+/,null," \r\n\t\u00a0"]);i.push([J,/^@[a-z_$][a-z_$@0-9]*/i,null],[S,/^@?[A-Z]+[a-z][A-Za-z_$@0-9]*/,
-null],[z,/^[a-z_$][a-z_$@0-9]*/i,null],[J,/^(?:0x[a-f0-9]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+\-]?\d+)?)[a-z]*/i,null,"0123456789"],[E,/^.[^\s\w\.$@\'\"\`\/\#]*/,null]);return B(f,i)}function $(b){function f(D){if(D>r){if(j&&j!==q){n.push("</span>");j=null}if(!j&&q){j=q;n.push('<span class="',j,'">')}var T=y(p(i.substring(r,D))).replace(e?d:c,"$1&#160;");e=k.test(T);n.push(T.replace(a,s));r=D}}var i=b.source,o=b.g,l=b.d,n=[],r=0,j=null,q=null,m=0,t=0,p=Y(window.PR_TAB_WIDTH),c=/([\r\n ]) /g,
-d=/(^| ) /gm,a=/\r\n?|\n/g,k=/[ \r\n]$/,e=true,h=window._pr_isIE6();h=h?b.b.tagName==="PRE"?h===6?"&#160;\r\n":h===7?"&#160;<br>\r":"&#160;\r":"&#160;<br />":"<br />";var g=b.b.className.match(/\blinenums\b(?::(\d+))?/),s;if(g){for(var v=[],w=0;w<10;++w)v[w]=h+'</li><li class="L'+w+'">';var F=g[1]&&g[1].length?g[1]-1:0;n.push('<ol class="linenums"><li class="L',F%10,'"');F&&n.push(' value="',F+1,'"');n.push(">");s=function(){var D=v[++F%10];return j?"</span>"+D+'<span class="'+j+'">':D}}else s=h;
-for(;;)if(m<o.length?t<l.length?o[m]<=l[t]:true:false){f(o[m]);if(j){n.push("</span>");j=null}n.push(o[m+1]);m+=2}else if(t<l.length){f(l[t]);q=l[t+1];t+=2}else break;f(i.length);j&&n.push("</span>");g&&n.push("</li></ol>");b.a=n.join("")}function u(b,f){for(var i=f.length;--i>=0;){var o=f[i];if(G.hasOwnProperty(o))"console"in window&&console.warn("cannot override language handler %s",o);else G[o]=b}}function Q(b,f){b&&G.hasOwnProperty(b)||(b=/^\s*</.test(f)?"default-markup":"default-code");return G[b]}
-function U(b){var f=b.f,i=b.e;b.a=f;try{var o,l=f.match(aa);f=[];var n=0,r=[];if(l)for(var j=0,q=l.length;j<q;++j){var m=l[j];if(m.length>1&&m.charAt(0)==="<"){if(!ba.test(m))if(ca.test(m)){f.push(m.substring(9,m.length-3));n+=m.length-12}else if(da.test(m)){f.push("\n");++n}else if(m.indexOf(V)>=0&&m.replace(/\s(\w+)\s*=\s*(?:\"([^\"]*)\"|'([^\']*)'|(\S+))/g,' $1="$2$3$4"').match(/[cC][lL][aA][sS][sS]=\"[^\"]*\bnocode\b/)){var t=m.match(W)[2],p=1,c;c=j+1;a:for(;c<q;++c){var d=l[c].match(W);if(d&&
-d[2]===t)if(d[1]==="/"){if(--p===0)break a}else++p}if(c<q){r.push(n,l.slice(j,c+1).join(""));j=c}else r.push(n,m)}else r.push(n,m)}else{var a;p=m;var k=p.indexOf("&");if(k<0)a=p;else{for(--k;(k=p.indexOf("&#",k+1))>=0;){var e=p.indexOf(";",k);if(e>=0){var h=p.substring(k+3,e),g=10;if(h&&h.charAt(0)==="x"){h=h.substring(1);g=16}var s=parseInt(h,g);isNaN(s)||(p=p.substring(0,k)+String.fromCharCode(s)+p.substring(e+1))}}a=p.replace(ea,"<").replace(fa,">").replace(ga,"'").replace(ha,'"').replace(ia," ").replace(ja,
-"&")}f.push(a);n+=a.length}}o={source:f.join(""),h:r};var v=o.source;b.source=v;b.c=0;b.g=o.h;Q(i,v)(b);$(b)}catch(w){if("console"in window)console.log(w&&w.stack?w.stack:w)}}var A="str",R="kwd",C="com",S="typ",J="lit",E="pun",z="pln",P="src",V="nocode",Z=function(){for(var b=["!","!=","!==","#","%","%=","&","&&","&&=","&=","(","*","*=","+=",",","-=","->","/","/=",":","::",";","<","<<","<<=","<=","=","==","===",">",">=",">>",">>=",">>>",">>>=","?","@","[","^","^=","^^","^^=","{","|","|=","||","||=",
-"~","break","case","continue","delete","do","else","finally","instanceof","return","throw","try","typeof"],f="(?:^^|[+-]",i=0;i<b.length;++i)f+="|"+b[i].replace(/([^=<>:&a-z])/g,"\\$1");f+=")\\s*";return f}(),L=/&/g,M=/</g,N=/>/g,X=/\"/g,ea=/&lt;/g,fa=/&gt;/g,ga=/&apos;/g,ha=/&quot;/g,ja=/&amp;/g,ia=/&nbsp;/g,ka=/[\r\n]/g,K=null,aa=RegExp("[^<]+|<!--[\\s\\S]*?--\>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>|</?[a-zA-Z](?:[^>\"']|'[^']*'|\"[^\"]*\")*>|<","g"),ba=/^<\!--/,ca=/^<!\[CDATA\[/,da=/^<br\b/i,W=/^<(\/?)([a-zA-Z][a-zA-Z0-9]*)/,
-la=x({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:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true}),G={};u(la,["default-code"]);u(B([],[[z,/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],[C,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[E,/^(?:<[%?]|[%?]>)/],["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"]);u(B([[z,/^[\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)))/],[E,/^[=<>\/]+/],["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"]);u(B([],[["atv",/^[\s\S]+/]]),["uq.val"]);u(x({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 ",
-hashComments:true,cStyleComments:true}),["c","cc","cpp","cxx","cyc","m"]);u(x({keywords:"null true false"}),["json"]);u(x({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 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 ",
-hashComments:true,cStyleComments:true,verbatimStrings:true}),["cs"]);u(x({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 abstract boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient ",
-cStyleComments:true}),["java"]);u(x({keywords:"break continue do else for if return while case done elif esac eval fi function in local set then until ",hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);u(x({keywords:"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 ",hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);
-u(x({keywords:"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 ",hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);u(x({keywords:"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 ",hashComments:true,
-multiLineStrings:true,regexLiterals:true}),["rb"]);u(x({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 debugger eval export function get null set undefined var with Infinity NaN ",cStyleComments:true,regexLiterals:true}),["js"]);u(B([],[[A,/^[\s\S]+/]]),
-["regex"]);window.PR_normalizedHtml=H;window.prettyPrintOne=function(b,f){var i={f:b,e:f};U(i);return i.a};window.prettyPrint=function(b){function f(){for(var t=window.PR_SHOULD_USE_CONTINUATION?j.now()+250:Infinity;q<o.length&&j.now()<t;q++){var p=o[q];if(p.className&&p.className.indexOf("prettyprint")>=0){var c=p.className.match(/\blang-(\w+)\b/);if(c)c=c[1];for(var d=false,a=p.parentNode;a;a=a.parentNode)if((a.tagName==="pre"||a.tagName==="code"||a.tagName==="xmp")&&a.className&&a.className.indexOf("prettyprint")>=
-0){d=true;break}if(!d){a=p;if(null===K){d=document.createElement("PRE");d.appendChild(document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />'));K=!/</.test(d.innerHTML)}if(K){d=a.innerHTML;if("XMP"===a.tagName)d=y(d);else{a=a;if("PRE"===a.tagName)a=true;else if(ka.test(d)){var k="";if(a.currentStyle)k=a.currentStyle.whiteSpace;else if(window.getComputedStyle)k=window.getComputedStyle(a,null).whiteSpace;a=!k||k==="pre"}else a=true;a||(d=d.replace(/(<br\s*\/?>)[\r\n]+/g,"$1").replace(/(?:[\r\n]+[ \t]*)+/g,
-" "))}d=d}else{d=[];for(a=a.firstChild;a;a=a.nextSibling)H(a,d);d=d.join("")}d=d.replace(/(?:\r\n?|\n)$/,"");m={f:d,e:c,b:p};U(m);if(p=m.a){c=m.b;if("XMP"===c.tagName){d=document.createElement("PRE");for(a=0;a<c.attributes.length;++a){k=c.attributes[a];if(k.specified)if(k.name.toLowerCase()==="class")d.className=k.value;else d.setAttribute(k.name,k.value)}d.innerHTML=p;c.parentNode.replaceChild(d,c)}else c.innerHTML=p}}}}if(q<o.length)setTimeout(f,250);else b&&b()}for(var i=[document.getElementsByTagName("pre"),
-document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],o=[],l=0;l<i.length;++l)for(var n=0,r=i[l].length;n<r;++n)o.push(i[l][n]);i=null;var j=Date;j.now||(j={now:function(){return(new Date).getTime()}});var q=0,m;f()};window.PR={combinePrefixPatterns:O,createSimpleLexer:B,registerLangHandler:u,sourceDecorator:x,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:C,PR_DECLARATION:"dec",PR_KEYWORD:R,PR_LITERAL:J,PR_NOCODE:V,PR_PLAIN:z,PR_PUNCTUATION:E,PR_SOURCE:P,PR_STRING:A,
-PR_TAG:"tag",PR_TYPE:S}})()
-PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xA0]+/,null,"\t\n\r \u00a0"],["str",/^(?:"(?:[^\"\\]|\\.)*"|'(?:[^\'\\]|\\.)*')/,null,"\"'"]],[["com",/^(?:--[^\r\n]*|\/\*[\s\S]*?(?:\*\/|$))/],["kwd",/^(?:ADD|ALL|ALTER|AND|ANY|AS|ASC|AUTHORIZATION|BACKUP|BEGIN|BETWEEN|BREAK|BROWSE|BULK|BY|CASCADE|CASE|CHECK|CHECKPOINT|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMN|COMMIT|COMPUTE|CONSTRAINT|CONTAINS|CONTAINSTABLE|CONTINUE|CONVERT|CREATE|CROSS|CURRENT|CURRENT_DATE|CURRENT_TIME|CURRENT_TIMESTAMP|CURRENT_USER|CURSOR|DATABASE|DBCC|DEALLOCATE|DECLARE|DEFAULT|DELETE|DENY|DESC|DISK|DISTINCT|DISTRIBUTED|DOUBLE|DROP|DUMMY|DUMP|ELSE|END|ERRLVL|ESCAPE|EXCEPT|EXEC|EXECUTE|EXISTS|EXIT|FETCH|FILE|FILLFACTOR|FOR|FOREIGN|FREETEXT|FREETEXTTABLE|FROM|FULL|FUNCTION|GOTO|GRANT|GROUP|HAVING|HOLDLOCK|IDENTITY|IDENTITYCOL|IDENTITY_INSERT|IF|IN|INDEX|INNER|INSERT|INTERSECT|INTO|IS|JOIN|KEY|KILL|LEFT|LIKE|LINENO|LOAD|NATIONAL|NOCHECK|NONCLUSTERED|NOT|NULL|NULLIF|OF|OFF|OFFSETS|ON|OPEN|OPENDATASOURCE|OPENQUERY|OPENROWSET|OPENXML|OPTION|OR|ORDER|OUTER|OVER|PERCENT|PLAN|PRECISION|PRIMARY|PRINT|PROC|PROCEDURE|PUBLIC|RAISERROR|READ|READTEXT|RECONFIGURE|REFERENCES|REPLICATION|RESTORE|RESTRICT|RETURN|REVOKE|RIGHT|ROLLBACK|ROWCOUNT|ROWGUIDCOL|RULE|SAVE|SCHEMA|SELECT|SESSION_USER|SET|SETUSER|SHUTDOWN|SOME|STATISTICS|SYSTEM_USER|TABLE|TEXTSIZE|THEN|TO|TOP|TRAN|TRANSACTION|TRIGGER|TRUNCATE|TSEQUAL|UNION|UNIQUE|UPDATE|UPDATETEXT|USE|USER|VALUES|VARYING|VIEW|WAITFOR|WHEN|WHERE|WHILE|WITH|WRITETEXT)(?=[^\w-]|$)/i,
-null],["lit",/^[+-]?(?:0x[\da-f]+|(?:(?:\.\d+|\d+(?:\.\d*)?)(?:e[+\-]?\d+)?))/i],["pln",/^[a-z_][\w-]*/i],["pun",/^[^\w\t\n\r \xA0\"\'][^\w\t\n\r \xA0+\-\"\']*/]]),["sql"])
-PR.registerLangHandler(PR.createSimpleLexer([[PR.PR_PLAIN,/^[\t\n\r \xA0]+/,null,'\t\n\r \xA0'],[PR.PR_COMMENT,/^%[^\r\n]*/,null,'%']],[[PR.PR_KEYWORD, /^\\(\\|[^ \r\n{}\[\]=]+)/],[PR.PR_LITERAL,/[+-]?(?:\.\d+|\d+(?:\.\d*)?)(cm|em|ex|in|pc|pt|mm)/i],[PR.PR_PUNCTUATION,/^[{}\[\]=]+/]]),['latex','tex'])
diff --git a/media/prettify-min-20100721/prettify.css b/media/prettify-min-20100721/prettify.css
deleted file mode 100644
index 2925d13..0000000
--- a/media/prettify-min-20100721/prettify.css
+++ /dev/null
@@ -1 +0,0 @@
-.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:none}li.L1,li.L3,li.L5,li.L7,li.L9{background:#eee}@media print{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun{color:#440}.pln{color:#000}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}} \ No newline at end of file
diff --git a/media/prettify-min-20100721/prettify.js b/media/prettify-min-20100721/prettify.js
deleted file mode 100644
index c9161da..0000000
--- a/media/prettify-min-20100721/prettify.js
+++ /dev/null
@@ -1,33 +0,0 @@
-window.PR_SHOULD_USE_CONTINUATION=true;window.PR_TAB_WIDTH=8;window.PR_normalizedHtml=window.PR=window.prettyPrintOne=window.prettyPrint=void 0;window._pr_isIE6=function(){var y=navigator&&navigator.userAgent&&navigator.userAgent.match(/\bMSIE ([678])\./);y=y?+y[1]:false;window._pr_isIE6=function(){return y};return y};
-(function(){function y(b){return b.replace(L,"&amp;").replace(M,"&lt;").replace(N,"&gt;")}function H(b,f,i){switch(b.nodeType){case 1:var o=b.tagName.toLowerCase();f.push("<",o);var l=b.attributes,n=l.length;if(n){if(i){for(var r=[],j=n;--j>=0;)r[j]=l[j];r.sort(function(q,m){return q.name<m.name?-1:q.name===m.name?0:1});l=r}for(j=0;j<n;++j){r=l[j];r.specified&&f.push(" ",r.name.toLowerCase(),'="',r.value.replace(L,"&amp;").replace(M,"&lt;").replace(N,"&gt;").replace(X,"&quot;"),'"')}}f.push(">");
-for(l=b.firstChild;l;l=l.nextSibling)H(l,f,i);if(b.firstChild||!/^(?:br|link|img)$/.test(o))f.push("</",o,">");break;case 3:case 4:f.push(y(b.nodeValue));break}}function O(b){function f(c){if(c.charAt(0)!=="\\")return c.charCodeAt(0);switch(c.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(c.substring(2),16)||c.charCodeAt(1);case "0":case "1":case "2":case "3":case "4":case "5":case "6":case "7":return parseInt(c.substring(1),
-8);default:return c.charCodeAt(1)}}function i(c){if(c<32)return(c<16?"\\x0":"\\x")+c.toString(16);c=String.fromCharCode(c);if(c==="\\"||c==="-"||c==="["||c==="]")c="\\"+c;return c}function o(c){var d=c.substring(1,c.length-1).match(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"));c=[];for(var a=[],k=d[0]==="^",e=k?1:0,h=d.length;e<h;++e){var g=d[e];switch(g){case "\\B":case "\\b":case "\\D":case "\\d":case "\\S":case "\\s":case "\\W":case "\\w":c.push(g);
-continue}g=f(g);var s;if(e+2<h&&"-"===d[e+1]){s=f(d[e+2]);e+=2}else s=g;a.push([g,s]);if(!(s<65||g>122)){s<65||g>90||a.push([Math.max(65,g)|32,Math.min(s,90)|32]);s<97||g>122||a.push([Math.max(97,g)&-33,Math.min(s,122)&-33])}}a.sort(function(v,w){return v[0]-w[0]||w[1]-v[1]});d=[];g=[NaN,NaN];for(e=0;e<a.length;++e){h=a[e];if(h[0]<=g[1]+1)g[1]=Math.max(g[1],h[1]);else d.push(g=h)}a=["["];k&&a.push("^");a.push.apply(a,c);for(e=0;e<d.length;++e){h=d[e];a.push(i(h[0]));if(h[1]>h[0]){h[1]+1>h[0]&&a.push("-");
-a.push(i(h[1]))}}a.push("]");return a.join("")}function l(c){for(var d=c.source.match(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=d.length,k=[],e=0,h=0;e<a;++e){var g=d[e];if(g==="(")++h;else if("\\"===g.charAt(0))if((g=+g.substring(1))&&g<=h)k[g]=-1}for(e=1;e<k.length;++e)if(-1===k[e])k[e]=++n;for(h=e=0;e<a;++e){g=d[e];if(g==="("){++h;if(k[h]===undefined)d[e]="(?:"}else if("\\"===
-g.charAt(0))if((g=+g.substring(1))&&g<=h)d[e]="\\"+k[h]}for(h=e=0;e<a;++e)if("^"===d[e]&&"^"!==d[e+1])d[e]="";if(c.ignoreCase&&r)for(e=0;e<a;++e){g=d[e];c=g.charAt(0);if(g.length>=2&&c==="[")d[e]=o(g);else if(c!=="\\")d[e]=g.replace(/[a-zA-Z]/g,function(s){s=s.charCodeAt(0);return"["+String.fromCharCode(s&-33,s|32)+"]"})}return d.join("")}for(var n=0,r=false,j=false,q=0,m=b.length;q<m;++q){var t=b[q];if(t.ignoreCase)j=true;else if(/[a-z]/i.test(t.source.replace(/\\u[0-9a-f]{4}|\\x[0-9a-f]{2}|\\[^ux]/gi,
-""))){r=true;j=false;break}}var p=[];q=0;for(m=b.length;q<m;++q){t=b[q];if(t.global||t.multiline)throw Error(""+t);p.push("(?:"+l(t)+")")}return RegExp(p.join("|"),j?"gi":"g")}function Y(b){var f=0;return function(i){for(var o=null,l=0,n=0,r=i.length;n<r;++n)switch(i.charAt(n)){case "\t":o||(o=[]);o.push(i.substring(l,n));l=b-f%b;for(f+=l;l>=0;l-=16)o.push(" ".substring(0,l));l=n+1;break;case "\n":f=0;break;default:++f}if(!o)return i;o.push(i.substring(l));return o.join("")}}function I(b,
-f,i,o){if(f){b={source:f,c:b};i(b);o.push.apply(o,b.d)}}function B(b,f){var i={},o;(function(){for(var r=b.concat(f),j=[],q={},m=0,t=r.length;m<t;++m){var p=r[m],c=p[3];if(c)for(var d=c.length;--d>=0;)i[c.charAt(d)]=p;p=p[1];c=""+p;if(!q.hasOwnProperty(c)){j.push(p);q[c]=null}}j.push(/[\0-\uffff]/);o=O(j)})();var l=f.length;function n(r){for(var j=r.c,q=[j,z],m=0,t=r.source.match(o)||[],p={},c=0,d=t.length;c<d;++c){var a=t[c],k=p[a],e=void 0,h;if(typeof k==="string")h=false;else{var g=i[a.charAt(0)];
-if(g){e=a.match(g[1]);k=g[0]}else{for(h=0;h<l;++h){g=f[h];if(e=a.match(g[1])){k=g[0];break}}e||(k=z)}if((h=k.length>=5&&"lang-"===k.substring(0,5))&&!(e&&typeof e[1]==="string")){h=false;k=P}h||(p[a]=k)}g=m;m+=a.length;if(h){h=e[1];var s=a.indexOf(h),v=s+h.length;if(e[2]){v=a.length-e[2].length;s=v-h.length}k=k.substring(5);I(j+g,a.substring(0,s),n,q);I(j+g+s,h,Q(k,h),q);I(j+g+v,a.substring(v),n,q)}else q.push(j+g,k)}r.d=q}return n}function x(b){var f=[],i=[];if(b.tripleQuotedStrings)f.push([A,/^(?:\'\'\'(?:[^\'\\]|\\[\s\S]|\'{1,2}(?=[^\']))*(?:\'\'\'|$)|\"\"\"(?:[^\"\\]|\\[\s\S]|\"{1,2}(?=[^\"]))*(?:\"\"\"|$)|\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$))/,
-null,"'\""]);else b.multiLineStrings?f.push([A,/^(?:\'(?:[^\\\']|\\[\s\S])*(?:\'|$)|\"(?:[^\\\"]|\\[\s\S])*(?:\"|$)|\`(?:[^\\\`]|\\[\s\S])*(?:\`|$))/,null,"'\"`"]):f.push([A,/^(?:\'(?:[^\\\'\r\n]|\\.)*(?:\'|$)|\"(?:[^\\\"\r\n]|\\.)*(?:\"|$))/,null,"\"'"]);b.verbatimStrings&&i.push([A,/^@\"(?:[^\"]|\"\")*(?:\"|$)/,null]);if(b.hashComments)if(b.cStyleComments){f.push([C,/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\r\n]*)/,null,"#"]);i.push([A,/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,
-null])}else f.push([C,/^#[^\r\n]*/,null,"#"]);if(b.cStyleComments){i.push([C,/^\/\/[^\r\n]*/,null]);i.push([C,/^\/\*[\s\S]*?(?:\*\/|$)/,null])}b.regexLiterals&&i.push(["lang-regex",RegExp("^"+Z+"(/(?=[^/*])(?:[^/\\x5B\\x5C]|\\x5C[\\s\\S]|\\x5B(?:[^\\x5C\\x5D]|\\x5C[\\s\\S])*(?:\\x5D|$))+/)")]);b=b.keywords.replace(/^\s+|\s+$/g,"");b.length&&i.push([R,RegExp("^(?:"+b.replace(/\s+/g,"|")+")\\b"),null]);f.push([z,/^\s+/,null," \r\n\t\u00a0"]);i.push([J,/^@[a-z_$][a-z_$@0-9]*/i,null],[S,/^@?[A-Z]+[a-z][A-Za-z_$@0-9]*/,
-null],[z,/^[a-z_$][a-z_$@0-9]*/i,null],[J,/^(?:0x[a-f0-9]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+\-]?\d+)?)[a-z]*/i,null,"0123456789"],[E,/^.[^\s\w\.$@\'\"\`\/\#]*/,null]);return B(f,i)}function $(b){function f(D){if(D>r){if(j&&j!==q){n.push("</span>");j=null}if(!j&&q){j=q;n.push('<span class="',j,'">')}var T=y(p(i.substring(r,D))).replace(e?d:c,"$1&#160;");e=k.test(T);n.push(T.replace(a,s));r=D}}var i=b.source,o=b.g,l=b.d,n=[],r=0,j=null,q=null,m=0,t=0,p=Y(window.PR_TAB_WIDTH),c=/([\r\n ]) /g,
-d=/(^| ) /gm,a=/\r\n?|\n/g,k=/[ \r\n]$/,e=true,h=window._pr_isIE6();h=h?b.b.tagName==="PRE"?h===6?"&#160;\r\n":h===7?"&#160;<br>\r":"&#160;\r":"&#160;<br />":"<br />";var g=b.b.className.match(/\blinenums\b(?::(\d+))?/),s;if(g){for(var v=[],w=0;w<10;++w)v[w]=h+'</li><li class="L'+w+'">';var F=g[1]&&g[1].length?g[1]-1:0;n.push('<ol class="linenums"><li class="L',F%10,'"');F&&n.push(' value="',F+1,'"');n.push(">");s=function(){var D=v[++F%10];return j?"</span>"+D+'<span class="'+j+'">':D}}else s=h;
-for(;;)if(m<o.length?t<l.length?o[m]<=l[t]:true:false){f(o[m]);if(j){n.push("</span>");j=null}n.push(o[m+1]);m+=2}else if(t<l.length){f(l[t]);q=l[t+1];t+=2}else break;f(i.length);j&&n.push("</span>");g&&n.push("</li></ol>");b.a=n.join("")}function u(b,f){for(var i=f.length;--i>=0;){var o=f[i];if(G.hasOwnProperty(o))"console"in window&&console.warn("cannot override language handler %s",o);else G[o]=b}}function Q(b,f){b&&G.hasOwnProperty(b)||(b=/^\s*</.test(f)?"default-markup":"default-code");return G[b]}
-function U(b){var f=b.f,i=b.e;b.a=f;try{var o,l=f.match(aa);f=[];var n=0,r=[];if(l)for(var j=0,q=l.length;j<q;++j){var m=l[j];if(m.length>1&&m.charAt(0)==="<"){if(!ba.test(m))if(ca.test(m)){f.push(m.substring(9,m.length-3));n+=m.length-12}else if(da.test(m)){f.push("\n");++n}else if(m.indexOf(V)>=0&&m.replace(/\s(\w+)\s*=\s*(?:\"([^\"]*)\"|'([^\']*)'|(\S+))/g,' $1="$2$3$4"').match(/[cC][lL][aA][sS][sS]=\"[^\"]*\bnocode\b/)){var t=m.match(W)[2],p=1,c;c=j+1;a:for(;c<q;++c){var d=l[c].match(W);if(d&&
-d[2]===t)if(d[1]==="/"){if(--p===0)break a}else++p}if(c<q){r.push(n,l.slice(j,c+1).join(""));j=c}else r.push(n,m)}else r.push(n,m)}else{var a;p=m;var k=p.indexOf("&");if(k<0)a=p;else{for(--k;(k=p.indexOf("&#",k+1))>=0;){var e=p.indexOf(";",k);if(e>=0){var h=p.substring(k+3,e),g=10;if(h&&h.charAt(0)==="x"){h=h.substring(1);g=16}var s=parseInt(h,g);isNaN(s)||(p=p.substring(0,k)+String.fromCharCode(s)+p.substring(e+1))}}a=p.replace(ea,"<").replace(fa,">").replace(ga,"'").replace(ha,'"').replace(ia," ").replace(ja,
-"&")}f.push(a);n+=a.length}}o={source:f.join(""),h:r};var v=o.source;b.source=v;b.c=0;b.g=o.h;Q(i,v)(b);$(b)}catch(w){if("console"in window)console.log(w&&w.stack?w.stack:w)}}var A="str",R="kwd",C="com",S="typ",J="lit",E="pun",z="pln",P="src",V="nocode",Z=function(){for(var b=["!","!=","!==","#","%","%=","&","&&","&&=","&=","(","*","*=","+=",",","-=","->","/","/=",":","::",";","<","<<","<<=","<=","=","==","===",">",">=",">>",">>=",">>>",">>>=","?","@","[","^","^=","^^","^^=","{","|","|=","||","||=",
-"~","break","case","continue","delete","do","else","finally","instanceof","return","throw","try","typeof"],f="(?:^^|[+-]",i=0;i<b.length;++i)f+="|"+b[i].replace(/([^=<>:&a-z])/g,"\\$1");f+=")\\s*";return f}(),L=/&/g,M=/</g,N=/>/g,X=/\"/g,ea=/&lt;/g,fa=/&gt;/g,ga=/&apos;/g,ha=/&quot;/g,ja=/&amp;/g,ia=/&nbsp;/g,ka=/[\r\n]/g,K=null,aa=RegExp("[^<]+|<!--[\\s\\S]*?--\>|<!\\[CDATA\\[[\\s\\S]*?\\]\\]>|</?[a-zA-Z](?:[^>\"']|'[^']*'|\"[^\"]*\")*>|<","g"),ba=/^<\!--/,ca=/^<!\[CDATA\[/,da=/^<br\b/i,W=/^<(\/?)([a-zA-Z][a-zA-Z0-9]*)/,
-la=x({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:true,cStyleComments:true,multiLineStrings:true,regexLiterals:true}),G={};u(la,["default-code"]);u(B([],[[z,/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],[C,/^<\!--[\s\S]*?(?:-\->|$)/],["lang-",/^<\?([\s\S]+?)(?:\?>|$)/],["lang-",/^<%([\s\S]+?)(?:%>|$)/],[E,/^(?:<[%?]|[%?]>)/],["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"]);u(B([[z,/^[\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)))/],[E,/^[=<>\/]+/],["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"]);u(B([],[["atv",/^[\s\S]+/]]),["uq.val"]);u(x({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 ",
-hashComments:true,cStyleComments:true}),["c","cc","cpp","cxx","cyc","m"]);u(x({keywords:"null true false"}),["json"]);u(x({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 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 ",
-hashComments:true,cStyleComments:true,verbatimStrings:true}),["cs"]);u(x({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 abstract boolean byte extends final finally implements import instanceof null native package strictfp super synchronized throws transient ",
-cStyleComments:true}),["java"]);u(x({keywords:"break continue do else for if return while case done elif esac eval fi function in local set then until ",hashComments:true,multiLineStrings:true}),["bsh","csh","sh"]);u(x({keywords:"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 ",hashComments:true,multiLineStrings:true,tripleQuotedStrings:true}),["cv","py"]);
-u(x({keywords:"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 ",hashComments:true,multiLineStrings:true,regexLiterals:true}),["perl","pl","pm"]);u(x({keywords:"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 ",hashComments:true,
-multiLineStrings:true,regexLiterals:true}),["rb"]);u(x({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 debugger eval export function get null set undefined var with Infinity NaN ",cStyleComments:true,regexLiterals:true}),["js"]);u(B([],[[A,/^[\s\S]+/]]),
-["regex"]);window.PR_normalizedHtml=H;window.prettyPrintOne=function(b,f){var i={f:b,e:f};U(i);return i.a};window.prettyPrint=function(b){function f(){for(var t=window.PR_SHOULD_USE_CONTINUATION?j.now()+250:Infinity;q<o.length&&j.now()<t;q++){var p=o[q];if(p.className&&p.className.indexOf("prettyprint")>=0){var c=p.className.match(/\blang-(\w+)\b/);if(c)c=c[1];for(var d=false,a=p.parentNode;a;a=a.parentNode)if((a.tagName==="pre"||a.tagName==="code"||a.tagName==="xmp")&&a.className&&a.className.indexOf("prettyprint")>=
-0){d=true;break}if(!d){a=p;if(null===K){d=document.createElement("PRE");d.appendChild(document.createTextNode('<!DOCTYPE foo PUBLIC "foo bar">\n<foo />'));K=!/</.test(d.innerHTML)}if(K){d=a.innerHTML;if("XMP"===a.tagName)d=y(d);else{a=a;if("PRE"===a.tagName)a=true;else if(ka.test(d)){var k="";if(a.currentStyle)k=a.currentStyle.whiteSpace;else if(window.getComputedStyle)k=window.getComputedStyle(a,null).whiteSpace;a=!k||k==="pre"}else a=true;a||(d=d.replace(/(<br\s*\/?>)[\r\n]+/g,"$1").replace(/(?:[\r\n]+[ \t]*)+/g,
-" "))}d=d}else{d=[];for(a=a.firstChild;a;a=a.nextSibling)H(a,d);d=d.join("")}d=d.replace(/(?:\r\n?|\n)$/,"");m={f:d,e:c,b:p};U(m);if(p=m.a){c=m.b;if("XMP"===c.tagName){d=document.createElement("PRE");for(a=0;a<c.attributes.length;++a){k=c.attributes[a];if(k.specified)if(k.name.toLowerCase()==="class")d.className=k.value;else d.setAttribute(k.name,k.value)}d.innerHTML=p;c.parentNode.replaceChild(d,c)}else c.innerHTML=p}}}}if(q<o.length)setTimeout(f,250);else b&&b()}for(var i=[document.getElementsByTagName("pre"),
-document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],o=[],l=0;l<i.length;++l)for(var n=0,r=i[l].length;n<r;++n)o.push(i[l][n]);i=null;var j=Date;j.now||(j={now:function(){return(new Date).getTime()}});var q=0,m;f()};window.PR={combinePrefixPatterns:O,createSimpleLexer:B,registerLangHandler:u,sourceDecorator:x,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:C,PR_DECLARATION:"dec",PR_KEYWORD:R,PR_LITERAL:J,PR_NOCODE:V,PR_PLAIN:z,PR_PUNCTUATION:E,PR_SOURCE:P,PR_STRING:A,
-PR_TAG:"tag",PR_TYPE:S}})() \ No newline at end of file
diff --git a/media/prettify-min-20110601/lang-apollo.js b/media/prettify-min-20110601/lang-apollo.js
new file mode 100644
index 0000000..7098baf
--- /dev/null
+++ b/media/prettify-min-20110601/lang-apollo.js
@@ -0,0 +1,2 @@
+PR.registerLangHandler(PR.createSimpleLexer([["com",/^#[^\n\r]*/,null,"#"],["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,null,'"']],[["kwd",/^(?:ADS|AD|AUG|BZF|BZMF|CAE|CAF|CA|CCS|COM|CS|DAS|DCA|DCOM|DCS|DDOUBL|DIM|DOUBLE|DTCB|DTCF|DV|DXCH|EDRUPT|EXTEND|INCR|INDEX|NDX|INHINT|LXCH|MASK|MSK|MP|MSU|NOOP|OVSK|QXCH|RAND|READ|RELINT|RESUME|RETURN|ROR|RXOR|SQUARE|SU|TCR|TCAA|OVSK|TCF|TC|TS|WAND|WOR|WRITE|XCH|XLQ|XXALQ|ZL|ZQ|ADD|ADZ|SUB|SUZ|MPY|MPR|MPZ|DVP|COM|ABS|CLA|CLZ|LDQ|STO|STQ|ALS|LLS|LRS|TRA|TSQ|TMI|TOV|AXT|TIX|DLY|INP|OUT)\s/,
+null],["typ",/^(?:-?GENADR|=MINUS|2BCADR|VN|BOF|MM|-?2CADR|-?[1-6]DNADR|ADRES|BBCON|[ES]?BANK=?|BLOCK|BNKSUM|E?CADR|COUNT\*?|2?DEC\*?|-?DNCHAN|-?DNPTR|EQUALS|ERASE|MEMORY|2?OCT|REMADR|SETLOC|SUBRO|ORG|BSS|BES|SYN|EQU|DEFINE|END)\s/,null],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[!-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["apollo","agc","aea"]);
diff --git a/media/prettify-min-20110601/lang-clj.js b/media/prettify-min-20110601/lang-clj.js
new file mode 100644
index 0000000..542a220
--- /dev/null
+++ b/media/prettify-min-20110601/lang-clj.js
@@ -0,0 +1,18 @@
+/*
+ Copyright (C) 2011 Google Inc.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+*/
+var a=null;
+PR.registerLangHandler(PR.createSimpleLexer([["opn",/^[([{]+/,a,"([{"],["clo",/^[)\]}]+/,a,")]}"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \xa0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:def|if|do|let|quote|var|fn|loop|recur|throw|try|monitor-enter|monitor-exit|defmacro|defn|defn-|macroexpand|macroexpand-1|for|doseq|dosync|dotimes|and|or|when|not|assert|doto|proxy|defstruct|first|rest|cons|defprotocol|deftype|defrecord|reify|defmulti|defmethod|meta|with-meta|ns|in-ns|create-ns|import|intern|refer|alias|namespace|resolve|ref|deref|refset|new|set!|memfn|to-array|into-array|aset|gen-class|reduce|map|filter|find|nil?|empty?|hash-map|hash-set|vec|vector|seq|flatten|reverse|assoc|dissoc|list|list?|disj|get|union|difference|intersection|extend|extend-type|extend-protocol|prn)\b/,a],
+["typ",/^:[\dA-Za-z-]+/]]),["clj"]);
diff --git a/media/prettify-min-20110601/lang-css.js b/media/prettify-min-20110601/lang-css.js
new file mode 100644
index 0000000..041e1f5
--- /dev/null
+++ b/media/prettify-min-20110601/lang-css.js
@@ -0,0 +1,2 @@
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com",
+/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]);
diff --git a/media/prettify-min-20110601/lang-go.js b/media/prettify-min-20110601/lang-go.js
new file mode 100644
index 0000000..fc18dc0
--- /dev/null
+++ b/media/prettify-min-20110601/lang-go.js
@@ -0,0 +1 @@
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["pln",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])+(?:'|$)|`[^`]*(?:`|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\n\r]*|\/\*[\S\s]*?\*\/)/],["pln",/^(?:[^"'/`]|\/(?![*/]))+/]]),["go"]);
diff --git a/media/prettify-min-20110601/lang-hs.js b/media/prettify-min-20110601/lang-hs.js
new file mode 100644
index 0000000..9d77b08
--- /dev/null
+++ b/media/prettify-min-20110601/lang-hs.js
@@ -0,0 +1,2 @@
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t-\r ]+/,null,"\t\n \r "],["str",/^"(?:[^\n\f\r"\\]|\\[\S\s])*(?:"|$)/,null,'"'],["str",/^'(?:[^\n\f\r'\\]|\\[^&])'?/,null,"'"],["lit",/^(?:0o[0-7]+|0x[\da-f]+|\d+(?:\.\d+)?(?:e[+-]?\d+)?)/i,null,"0123456789"]],[["com",/^(?:--+[^\n\f\r]*|{-(?:[^-]|-+[^}-])*-})/],["kwd",/^(?:case|class|data|default|deriving|do|else|if|import|in|infix|infixl|infixr|instance|let|module|newtype|of|then|type|where|_)(?=[^\d'A-Za-z]|$)/,
+null],["pln",/^(?:[A-Z][\w']*\.)*[A-Za-z][\w']*/],["pun",/^[^\d\t-\r "'A-Za-z]+/]]),["hs"]);
diff --git a/media/prettify-min-20110601/lang-lisp.js b/media/prettify-min-20110601/lang-lisp.js
new file mode 100644
index 0000000..02a30e8
--- /dev/null
+++ b/media/prettify-min-20110601/lang-lisp.js
@@ -0,0 +1,3 @@
+var a=null;
+PR.registerLangHandler(PR.createSimpleLexer([["opn",/^\(+/,a,"("],["clo",/^\)+/,a,")"],["com",/^;[^\n\r]*/,a,";"],["pln",/^[\t\n\r \xa0]+/,a,"\t\n\r \xa0"],["str",/^"(?:[^"\\]|\\[\S\s])*(?:"|$)/,a,'"']],[["kwd",/^(?:block|c[ad]+r|catch|con[ds]|def(?:ine|un)|do|eq|eql|equal|equalp|eval-when|flet|format|go|if|labels|lambda|let|load-time-value|locally|macrolet|multiple-value-call|nil|progn|progv|quote|require|return-from|setq|symbol-macrolet|t|tagbody|the|throw|unwind)\b/,a],
+["lit",/^[+-]?(?:[#0]x[\da-f]+|\d+\/\d+|(?:\.\d+|\d+(?:\.\d*)?)(?:[de][+-]?\d+)?)/i],["lit",/^'(?:-*(?:\w|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?)?/],["pln",/^-*(?:[_a-z]|\\[!-~])(?:[\w-]*|\\[!-~])[!=?]?/i],["pun",/^[^\w\t\n\r "'-);\\\xa0]+/]]),["cl","el","lisp","scm"]);
diff --git a/media/prettify-min-20110601/lang-lua.js b/media/prettify-min-20110601/lang-lua.js
new file mode 100644
index 0000000..e83a3c4
--- /dev/null
+++ b/media/prettify-min-20110601/lang-lua.js
@@ -0,0 +1,2 @@
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["str",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$))/,null,"\"'"]],[["com",/^--(?:\[(=*)\[[\S\s]*?(?:]\1]|$)|[^\n\r]*)/],["str",/^\[(=*)\[[\S\s]*?(?:]\1]|$)/],["kwd",/^(?:and|break|do|else|elseif|end|false|for|function|if|in|local|nil|not|or|repeat|return|then|true|until|while)\b/,null],["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],
+["pln",/^[_a-z]\w*/i],["pun",/^[^\w\t\n\r \xa0][^\w\t\n\r "'+=\xa0-]*/]]),["lua"]);
diff --git a/media/prettify-min-20110601/lang-ml.js b/media/prettify-min-20110601/lang-ml.js
new file mode 100644
index 0000000..6df02d7
--- /dev/null
+++ b/media/prettify-min-20110601/lang-ml.js
@@ -0,0 +1,2 @@
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["com",/^#(?:if[\t\n\r \xa0]+(?:[$_a-z][\w']*|``[^\t\n\r`]*(?:``|$))|else|endif|light)/i,null,"#"],["str",/^(?:"(?:[^"\\]|\\[\S\s])*(?:"|$)|'(?:[^'\\]|\\[\S\s])(?:'|$))/,null,"\"'"]],[["com",/^(?:\/\/[^\n\r]*|\(\*[\S\s]*?\*\))/],["kwd",/^(?:abstract|and|as|assert|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|if|in|inherit|inline|interface|internal|lazy|let|match|member|module|mutable|namespace|new|null|of|open|or|override|private|public|rec|return|static|struct|then|to|true|try|type|upcast|use|val|void|when|while|with|yield|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|global|include|method|mixin|object|parallel|process|protected|pure|sealed|trait|virtual|volatile)\b/],
+["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],["pln",/^(?:[_a-z][\w']*[!#?]?|``[^\t\n\r`]*(?:``|$))/i],["pun",/^[^\w\t\n\r "'\xa0]+/]]),["fs","ml"]);
diff --git a/media/prettify-min-20110601/lang-n.js b/media/prettify-min-20110601/lang-n.js
new file mode 100644
index 0000000..6c2e85b
--- /dev/null
+++ b/media/prettify-min-20110601/lang-n.js
@@ -0,0 +1,4 @@
+var a=null;
+PR.registerLangHandler(PR.createSimpleLexer([["str",/^(?:'(?:[^\n\r'\\]|\\.)*'|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,a,'"'],["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,a,"#"],["pln",/^\s+/,a," \r\n\t\xa0"]],[["str",/^@"(?:[^"]|"")*(?:"|$)/,a],["str",/^<#[^#>]*(?:#>|$)/,a],["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,a],["com",/^\/\/[^\n\r]*/,a],["com",/^\/\*[\S\s]*?(?:\*\/|$)/,
+a],["kwd",/^(?:abstract|and|as|base|catch|class|def|delegate|enum|event|extern|false|finally|fun|implements|interface|internal|is|macro|match|matches|module|mutable|namespace|new|null|out|override|params|partial|private|protected|public|ref|sealed|static|struct|syntax|this|throw|true|try|type|typeof|using|variant|virtual|volatile|when|where|with|assert|assert2|async|break|checked|continue|do|else|ensures|for|foreach|if|late|lock|new|nolate|otherwise|regexp|repeat|requires|return|surroundwith|unchecked|unless|using|while|yield)\b/,
+a],["typ",/^(?:array|bool|byte|char|decimal|double|float|int|list|long|object|sbyte|short|string|ulong|uint|ufloat|ulong|ushort|void)\b/,a],["lit",/^@[$_a-z][\w$@]*/i,a],["typ",/^@[A-Z]+[a-z][\w$@]*/,a],["pln",/^'?[$_a-z][\w$@]*/i,a],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,a,"0123456789"],["pun",/^.[^\s\w"-$'./@`]*/,a]]),["n","nemerle"]);
diff --git a/media/prettify-min-20110601/lang-proto.js b/media/prettify-min-20110601/lang-proto.js
new file mode 100644
index 0000000..f006ad8
--- /dev/null
+++ b/media/prettify-min-20110601/lang-proto.js
@@ -0,0 +1 @@
+PR.registerLangHandler(PR.sourceDecorator({keywords:"bytes,default,double,enum,extend,extensions,false,group,import,max,message,option,optional,package,repeated,required,returns,rpc,service,syntax,to,true",types:/^(bool|(double|s?fixed|[su]?int)(32|64)|float|string)\b/,cStyleComments:!0}),["proto"]);
diff --git a/media/prettify-min-20110601/lang-scala.js b/media/prettify-min-20110601/lang-scala.js
new file mode 100644
index 0000000..60d034d
--- /dev/null
+++ b/media/prettify-min-20110601/lang-scala.js
@@ -0,0 +1,2 @@
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["str",/^"(?:""(?:""?(?!")|[^"\\]|\\.)*"{0,3}|(?:[^\n\r"\\]|\\.)*"?)/,null,'"'],["lit",/^`(?:[^\n\r\\`]|\\.)*`?/,null,"`"],["pun",/^[!#%&(--:-@[-^{-~]+/,null,"!#%&()*+,-:;<=>?@[\\]^{|}~"]],[["str",/^'(?:[^\n\r'\\]|\\(?:'|[^\n\r']+))'/],["lit",/^'[$A-Z_a-z][\w$]*(?![\w$'])/],["kwd",/^(?:abstract|case|catch|class|def|do|else|extends|final|finally|for|forSome|if|implicit|import|lazy|match|new|object|override|package|private|protected|requires|return|sealed|super|throw|trait|try|type|val|var|while|with|yield)\b/],
+["lit",/^(?:true|false|null|this)\b/],["lit",/^(?:0(?:[0-7]+|x[\da-f]+)l?|(?:0|[1-9]\d*)(?:(?:\.\d+)?(?:e[+-]?\d+)?f?|l?)|\\.\d+(?:e[+-]?\d+)?f?)/i],["typ",/^[$_]*[A-Z][\d$A-Z_]*[a-z][\w$]*/],["pln",/^[$A-Z_a-z][\w$]*/],["com",/^\/(?:\/.*|\*(?:\/|\**[^*/])*(?:\*+\/?)?)/],["pun",/^(?:\.+|\/)/]]),["scala"]);
diff --git a/media/prettify-min-20110601/lang-sql.js b/media/prettify-min-20110601/lang-sql.js
new file mode 100644
index 0000000..da705b0
--- /dev/null
+++ b/media/prettify-min-20110601/lang-sql.js
@@ -0,0 +1,2 @@
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["str",/^(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/,null,"\"'"]],[["com",/^(?:--[^\n\r]*|\/\*[\S\s]*?(?:\*\/|$))/],["kwd",/^(?:add|all|alter|and|any|as|asc|authorization|backup|begin|between|break|browse|bulk|by|cascade|case|check|checkpoint|close|clustered|coalesce|collate|column|commit|compute|constraint|contains|containstable|continue|convert|create|cross|current|current_date|current_time|current_timestamp|current_user|cursor|database|dbcc|deallocate|declare|default|delete|deny|desc|disk|distinct|distributed|double|drop|dummy|dump|else|end|errlvl|escape|except|exec|execute|exists|exit|fetch|file|fillfactor|for|foreign|freetext|freetexttable|from|full|function|goto|grant|group|having|holdlock|identity|identitycol|identity_insert|if|in|index|inner|insert|intersect|into|is|join|key|kill|left|like|lineno|load|match|merge|national|nocheck|nonclustered|not|null|nullif|of|off|offsets|on|open|opendatasource|openquery|openrowset|openxml|option|or|order|outer|over|percent|plan|precision|primary|print|proc|procedure|public|raiserror|read|readtext|reconfigure|references|replication|restore|restrict|return|revoke|right|rollback|rowcount|rowguidcol|rule|save|schema|select|session_user|set|setuser|shutdown|some|statistics|system_user|table|textsize|then|to|top|tran|transaction|trigger|truncate|tsequal|union|unique|update|updatetext|use|user|using|values|varying|view|waitfor|when|where|while|with|writetext)(?=[^\w-]|$)/i,
+null],["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],["pln",/^[_a-z][\w-]*/i],["pun",/^[^\w\t\n\r "'\xa0][^\w\t\n\r "'+\xa0-]*/]]),["sql"]);
diff --git a/media/prettify-min-20110601/lang-tex.js b/media/prettify-min-20110601/lang-tex.js
new file mode 100644
index 0000000..ce96fbb
--- /dev/null
+++ b/media/prettify-min-20110601/lang-tex.js
@@ -0,0 +1 @@
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["com",/^%[^\n\r]*/,null,"%"]],[["kwd",/^\\[@-Za-z]+/],["kwd",/^\\./],["typ",/^[$&]/],["lit",/[+-]?(?:\.\d+|\d+(?:\.\d*)?)(cm|em|ex|in|pc|pt|bp|mm)/i],["pun",/^[()=[\]{}]+/]]),["latex","tex"]);
diff --git a/media/prettify-min-20110601/lang-vb.js b/media/prettify-min-20110601/lang-vb.js
new file mode 100644
index 0000000..07506b0
--- /dev/null
+++ b/media/prettify-min-20110601/lang-vb.js
@@ -0,0 +1,2 @@
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0\u2028\u2029]+/,null,"\t\n\r Â\xa0

"],["str",/^(?:["\u201c\u201d](?:[^"\u201c\u201d]|["\u201c\u201d]{2})(?:["\u201c\u201d]c|$)|["\u201c\u201d](?:[^"\u201c\u201d]|["\u201c\u201d]{2})*(?:["\u201c\u201d]|$))/i,null,'"“â€'],["com",/^['\u2018\u2019].*/,null,"'‘’"]],[["kwd",/^(?:addhandler|addressof|alias|and|andalso|ansi|as|assembly|auto|boolean|byref|byte|byval|call|case|catch|cbool|cbyte|cchar|cdate|cdbl|cdec|char|cint|class|clng|cobj|const|cshort|csng|cstr|ctype|date|decimal|declare|default|delegate|dim|directcast|do|double|each|else|elseif|end|endif|enum|erase|error|event|exit|finally|for|friend|function|get|gettype|gosub|goto|handles|if|implements|imports|in|inherits|integer|interface|is|let|lib|like|long|loop|me|mod|module|mustinherit|mustoverride|mybase|myclass|namespace|new|next|not|notinheritable|notoverridable|object|on|option|optional|or|orelse|overloads|overridable|overrides|paramarray|preserve|private|property|protected|public|raiseevent|readonly|redim|removehandler|resume|return|select|set|shadows|shared|short|single|static|step|stop|string|structure|sub|synclock|then|throw|to|try|typeof|unicode|until|variant|wend|when|while|with|withevents|writeonly|xor|endif|gosub|let|variant|wend)\b/i,
+null],["com",/^rem.*/i],["lit",/^(?:true\b|false\b|nothing\b|\d+(?:e[+-]?\d+[dfr]?|[dfilrs])?|(?:&h[\da-f]+|&o[0-7]+)[ils]?|\d*\.\d+(?:e[+-]?\d+)?[dfr]?|#\s+(?:\d+[/-]\d+[/-]\d+(?:\s+\d+:\d+(?::\d+)?(\s*(?:am|pm))?)?|\d+:\d+(?::\d+)?(\s*(?:am|pm))?)\s+#)/i],["pln",/^(?:(?:[a-z]|_\w)\w*|\[(?:[a-z]|_\w)\w*])/i],["pun",/^[^\w\t\n\r "'[\]\xa0\u2018\u2019\u201c\u201d\u2028\u2029]+/],["pun",/^(?:\[|])/]]),["vb","vbs"]);
diff --git a/media/prettify-min-20110601/lang-vhdl.js b/media/prettify-min-20110601/lang-vhdl.js
new file mode 100644
index 0000000..128b5b6
--- /dev/null
+++ b/media/prettify-min-20110601/lang-vhdl.js
@@ -0,0 +1,3 @@
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"]],[["str",/^(?:[box]?"(?:[^"]|"")*"|'.')/i],["com",/^--[^\n\r]*/],["kwd",/^(?:abs|access|after|alias|all|and|architecture|array|assert|attribute|begin|block|body|buffer|bus|case|component|configuration|constant|disconnect|downto|else|elsif|end|entity|exit|file|for|function|generate|generic|group|guarded|if|impure|in|inertial|inout|is|label|library|linkage|literal|loop|map|mod|nand|new|next|nor|not|null|of|on|open|or|others|out|package|port|postponed|procedure|process|pure|range|record|register|reject|rem|report|return|rol|ror|select|severity|shared|signal|sla|sll|sra|srl|subtype|then|to|transport|type|unaffected|units|until|use|variable|wait|when|while|with|xnor|xor)(?=[^\w-]|$)/i,
+null],["typ",/^(?:bit|bit_vector|character|boolean|integer|real|time|string|severity_level|positive|natural|signed|unsigned|line|text|std_u?logic(?:_vector)?)(?=[^\w-]|$)/i,null],["typ",/^'(?:active|ascending|base|delayed|driving|driving_value|event|high|image|instance_name|last_active|last_event|last_value|left|leftof|length|low|path_name|pos|pred|quiet|range|reverse_range|right|rightof|simple_name|stable|succ|transaction|val|value)(?=[^\w-]|$)/i,null],["lit",/^\d+(?:_\d+)*(?:#[\w.\\]+#(?:[+-]?\d+(?:_\d+)*)?|(?:\.\d+(?:_\d+)*)?(?:e[+-]?\d+(?:_\d+)*)?)/i],
+["pln",/^(?:[a-z]\w*|\\[^\\]*\\)/i],["pun",/^[^\w\t\n\r "'\xa0][^\w\t\n\r "'\xa0-]*/]]),["vhdl","vhd"]);
diff --git a/media/prettify-min-20110601/lang-wiki.js b/media/prettify-min-20110601/lang-wiki.js
new file mode 100644
index 0000000..9b0b448
--- /dev/null
+++ b/media/prettify-min-20110601/lang-wiki.js
@@ -0,0 +1,2 @@
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\d\t a-gi-z\xa0]+/,null,"\t Â\xa0abcdefgijklmnopqrstuvwxyz0123456789"],["pun",/^[*=[\]^~]+/,null,"=*~^[]"]],[["lang-wiki.meta",/(?:^^|\r\n?|\n)(#[a-z]+)\b/],["lit",/^[A-Z][a-z][\da-z]+[A-Z][a-z][^\W_]+\b/],["lang-",/^{{{([\S\s]+?)}}}/],["lang-",/^`([^\n\r`]+)`/],["str",/^https?:\/\/[^\s#/?]*(?:\/[^\s#?]*)?(?:\?[^\s#]*)?(?:#\S*)?/i],["pln",/^(?:\r\n|[\S\s])[^\n\r#*=A-[^`h{~]*/]]),["wiki"]);
+PR.registerLangHandler(PR.createSimpleLexer([["kwd",/^#[a-z]+/i,null,"#"]],[]),["wiki.meta"]);
diff --git a/media/prettify-min-20110601/lang-xq.js b/media/prettify-min-20110601/lang-xq.js
new file mode 100644
index 0000000..e323ae3
--- /dev/null
+++ b/media/prettify-min-20110601/lang-xq.js
@@ -0,0 +1,3 @@
+PR.registerLangHandler(PR.createSimpleLexer([["var pln",/^\$[\w-]+/,null,"$"]],[["pln",/^[\s=][<>][\s=]/],["lit",/^@[\w-]+/],["tag",/^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["com",/^\(:[\S\s]*?:\)/],["pln",/^[(),/;[\]{}]$/],["str",/^(?:"(?:[^"\\{]|\\[\S\s])*(?:"|$)|'(?:[^'\\{]|\\[\S\s])*(?:'|$))/,null,"\"'"],["kwd",/^(?:xquery|where|version|variable|union|typeswitch|treat|to|then|text|stable|sortby|some|self|schema|satisfies|returns|return|ref|processing-instruction|preceding-sibling|preceding|precedes|parent|only|of|node|namespace|module|let|item|intersect|instance|in|import|if|function|for|follows|following-sibling|following|external|except|every|else|element|descending|descendant-or-self|descendant|define|default|declare|comment|child|cast|case|before|attribute|assert|ascending|as|ancestor-or-self|ancestor|after|eq|order|by|or|and|schema-element|document-node|node|at)\b/],
+["typ",/^(?:xs:yearMonthDuration|xs:unsignedLong|xs:time|xs:string|xs:short|xs:QName|xs:Name|xs:long|xs:integer|xs:int|xs:gYearMonth|xs:gYear|xs:gMonthDay|xs:gDay|xs:float|xs:duration|xs:double|xs:decimal|xs:dayTimeDuration|xs:dateTime|xs:date|xs:byte|xs:boolean|xs:anyURI|xf:yearMonthDuration)\b/,null],["fun pln",/^(?:xp:dereference|xinc:node-expand|xinc:link-references|xinc:link-expand|xhtml:restructure|xhtml:clean|xhtml:add-lists|xdmp:zip-manifest|xdmp:zip-get|xdmp:zip-create|xdmp:xquery-version|xdmp:word-convert|xdmp:with-namespaces|xdmp:version|xdmp:value|xdmp:user-roles|xdmp:user-last-login|xdmp:user|xdmp:url-encode|xdmp:url-decode|xdmp:uri-is-file|xdmp:uri-format|xdmp:uri-content-type|xdmp:unquote|xdmp:unpath|xdmp:triggers-database|xdmp:trace|xdmp:to-json|xdmp:tidy|xdmp:subbinary|xdmp:strftime|xdmp:spawn-in|xdmp:spawn|xdmp:sleep|xdmp:shutdown|xdmp:set-session-field|xdmp:set-response-encoding|xdmp:set-response-content-type|xdmp:set-response-code|xdmp:set-request-time-limit|xdmp:set|xdmp:servers|xdmp:server-status|xdmp:server-name|xdmp:server|xdmp:security-database|xdmp:security-assert|xdmp:schema-database|xdmp:save|xdmp:role-roles|xdmp:role|xdmp:rethrow|xdmp:restart|xdmp:request-timestamp|xdmp:request-status|xdmp:request-cancel|xdmp:request|xdmp:redirect-response|xdmp:random|xdmp:quote|xdmp:query-trace|xdmp:query-meters|xdmp:product-edition|xdmp:privilege-roles|xdmp:privilege|xdmp:pretty-print|xdmp:powerpoint-convert|xdmp:platform|xdmp:permission|xdmp:pdf-convert|xdmp:path|xdmp:octal-to-integer|xdmp:node-uri|xdmp:node-replace|xdmp:node-kind|xdmp:node-insert-child|xdmp:node-insert-before|xdmp:node-insert-after|xdmp:node-delete|xdmp:node-database|xdmp:mul64|xdmp:modules-root|xdmp:modules-database|xdmp:merging|xdmp:merge-cancel|xdmp:merge|xdmp:md5|xdmp:logout|xdmp:login|xdmp:log-level|xdmp:log|xdmp:lock-release|xdmp:lock-acquire|xdmp:load|xdmp:invoke-in|xdmp:invoke|xdmp:integer-to-octal|xdmp:integer-to-hex|xdmp:http-put|xdmp:http-post|xdmp:http-options|xdmp:http-head|xdmp:http-get|xdmp:http-delete|xdmp:hosts|xdmp:host-status|xdmp:host-name|xdmp:host|xdmp:hex-to-integer|xdmp:hash64|xdmp:hash32|xdmp:has-privilege|xdmp:groups|xdmp:group-serves|xdmp:group-servers|xdmp:group-name|xdmp:group-hosts|xdmp:group|xdmp:get-session-field-names|xdmp:get-session-field|xdmp:get-response-encoding|xdmp:get-response-code|xdmp:get-request-username|xdmp:get-request-user|xdmp:get-request-url|xdmp:get-request-protocol|xdmp:get-request-path|xdmp:get-request-method|xdmp:get-request-header-names|xdmp:get-request-header|xdmp:get-request-field-names|xdmp:get-request-field-filename|xdmp:get-request-field-content-type|xdmp:get-request-field|xdmp:get-request-client-certificate|xdmp:get-request-client-address|xdmp:get-request-body|xdmp:get-current-user|xdmp:get-current-roles|xdmp:get|xdmp:function-name|xdmp:function-module|xdmp:function|xdmp:from-json|xdmp:forests|xdmp:forest-status|xdmp:forest-restore|xdmp:forest-restart|xdmp:forest-name|xdmp:forest-delete|xdmp:forest-databases|xdmp:forest-counts|xdmp:forest-clear|xdmp:forest-backup|xdmp:forest|xdmp:filesystem-file|xdmp:filesystem-directory|xdmp:exists|xdmp:excel-convert|xdmp:eval-in|xdmp:eval|xdmp:estimate|xdmp:email|xdmp:element-content-type|xdmp:elapsed-time|xdmp:document-set-quality|xdmp:document-set-property|xdmp:document-set-properties|xdmp:document-set-permissions|xdmp:document-set-collections|xdmp:document-remove-properties|xdmp:document-remove-permissions|xdmp:document-remove-collections|xdmp:document-properties|xdmp:document-locks|xdmp:document-load|xdmp:document-insert|xdmp:document-get-quality|xdmp:document-get-properties|xdmp:document-get-permissions|xdmp:document-get-collections|xdmp:document-get|xdmp:document-forest|xdmp:document-delete|xdmp:document-add-properties|xdmp:document-add-permissions|xdmp:document-add-collections|xdmp:directory-properties|xdmp:directory-locks|xdmp:directory-delete|xdmp:directory-create|xdmp:directory|xdmp:diacritic-less|xdmp:describe|xdmp:default-permissions|xdmp:default-collections|xdmp:databases|xdmp:database-restore-validate|xdmp:database-restore-status|xdmp:database-restore-cancel|xdmp:database-restore|xdmp:database-name|xdmp:database-forests|xdmp:database-backup-validate|xdmp:database-backup-status|xdmp:database-backup-purge|xdmp:database-backup-cancel|xdmp:database-backup|xdmp:database|xdmp:collection-properties|xdmp:collection-locks|xdmp:collection-delete|xdmp:collation-canonical-uri|xdmp:castable-as|xdmp:can-grant-roles|xdmp:base64-encode|xdmp:base64-decode|xdmp:architecture|xdmp:apply|xdmp:amp-roles|xdmp:amp|xdmp:add64|xdmp:add-response-header|xdmp:access|trgr:trigger-set-recursive|trgr:trigger-set-permissions|trgr:trigger-set-name|trgr:trigger-set-module|trgr:trigger-set-event|trgr:trigger-set-description|trgr:trigger-remove-permissions|trgr:trigger-module|trgr:trigger-get-permissions|trgr:trigger-enable|trgr:trigger-disable|trgr:trigger-database-online-event|trgr:trigger-data-event|trgr:trigger-add-permissions|trgr:remove-trigger|trgr:property-content|trgr:pre-commit|trgr:post-commit|trgr:get-trigger-by-id|trgr:get-trigger|trgr:document-scope|trgr:document-content|trgr:directory-scope|trgr:create-trigger|trgr:collection-scope|trgr:any-property-content|thsr:set-entry|thsr:remove-term|thsr:remove-synonym|thsr:remove-entry|thsr:query-lookup|thsr:lookup|thsr:load|thsr:insert|thsr:expand|thsr:add-synonym|spell:suggest-detailed|spell:suggest|spell:remove-word|spell:make-dictionary|spell:load|spell:levenshtein-distance|spell:is-correct|spell:insert|spell:double-metaphone|spell:add-word|sec:users-collection|sec:user-set-roles|sec:user-set-password|sec:user-set-name|sec:user-set-description|sec:user-set-default-permissions|sec:user-set-default-collections|sec:user-remove-roles|sec:user-privileges|sec:user-get-roles|sec:user-get-description|sec:user-get-default-permissions|sec:user-get-default-collections|sec:user-doc-permissions|sec:user-doc-collections|sec:user-add-roles|sec:unprotect-collection|sec:uid-for-name|sec:set-realm|sec:security-version|sec:security-namespace|sec:security-installed|sec:security-collection|sec:roles-collection|sec:role-set-roles|sec:role-set-name|sec:role-set-description|sec:role-set-default-permissions|sec:role-set-default-collections|sec:role-remove-roles|sec:role-privileges|sec:role-get-roles|sec:role-get-description|sec:role-get-default-permissions|sec:role-get-default-collections|sec:role-doc-permissions|sec:role-doc-collections|sec:role-add-roles|sec:remove-user|sec:remove-role-from-users|sec:remove-role-from-role|sec:remove-role-from-privileges|sec:remove-role-from-amps|sec:remove-role|sec:remove-privilege|sec:remove-amp|sec:protect-collection|sec:privileges-collection|sec:privilege-set-roles|sec:privilege-set-name|sec:privilege-remove-roles|sec:privilege-get-roles|sec:privilege-add-roles|sec:priv-doc-permissions|sec:priv-doc-collections|sec:get-user-names|sec:get-unique-elem-id|sec:get-role-names|sec:get-role-ids|sec:get-privilege|sec:get-distinct-permissions|sec:get-collection|sec:get-amp|sec:create-user-with-role|sec:create-user|sec:create-role|sec:create-privilege|sec:create-amp|sec:collections-collection|sec:collection-set-permissions|sec:collection-remove-permissions|sec:collection-get-permissions|sec:collection-add-permissions|sec:check-admin|sec:amps-collection|sec:amp-set-roles|sec:amp-remove-roles|sec:amp-get-roles|sec:amp-doc-permissions|sec:amp-doc-collections|sec:amp-add-roles|search:unparse|search:suggest|search:snippet|search:search|search:resolve-nodes|search:resolve|search:remove-constraint|search:parse|search:get-default-options|search:estimate|search:check-options|prof:value|prof:reset|prof:report|prof:invoke|prof:eval|prof:enable|prof:disable|prof:allowed|ppt:clean|pki:template-set-request|pki:template-set-name|pki:template-set-key-type|pki:template-set-key-options|pki:template-set-description|pki:template-in-use|pki:template-get-version|pki:template-get-request|pki:template-get-name|pki:template-get-key-type|pki:template-get-key-options|pki:template-get-id|pki:template-get-description|pki:need-certificate|pki:is-temporary|pki:insert-trusted-certificates|pki:insert-template|pki:insert-signed-certificates|pki:insert-certificate-revocation-list|pki:get-trusted-certificate-ids|pki:get-template-ids|pki:get-template-certificate-authority|pki:get-template-by-name|pki:get-template|pki:get-pending-certificate-requests-xml|pki:get-pending-certificate-requests-pem|pki:get-pending-certificate-request|pki:get-certificates-for-template-xml|pki:get-certificates-for-template|pki:get-certificates|pki:get-certificate-xml|pki:get-certificate-pem|pki:get-certificate|pki:generate-temporary-certificate-if-necessary|pki:generate-temporary-certificate|pki:generate-template-certificate-authority|pki:generate-certificate-request|pki:delete-template|pki:delete-certificate|pki:create-template|pdf:make-toc|pdf:insert-toc-headers|pdf:get-toc|pdf:clean|p:status-transition|p:state-transition|p:remove|p:pipelines|p:insert|p:get-by-id|p:get|p:execute|p:create|p:condition|p:collection|p:action|ooxml:runs-merge|ooxml:package-uris|ooxml:package-parts-insert|ooxml:package-parts|msword:clean|mcgm:polygon|mcgm:point|mcgm:geospatial-query-from-elements|mcgm:geospatial-query|mcgm:circle|math:tanh|math:tan|math:sqrt|math:sinh|math:sin|math:pow|math:modf|math:log10|math:log|math:ldexp|math:frexp|math:fmod|math:floor|math:fabs|math:exp|math:cosh|math:cos|math:ceil|math:atan2|math:atan|math:asin|math:acos|map:put|map:map|map:keys|map:get|map:delete|map:count|map:clear|lnk:to|lnk:remove|lnk:insert|lnk:get|lnk:from|lnk:create|kml:polygon|kml:point|kml:interior-polygon|kml:geospatial-query-from-elements|kml:geospatial-query|kml:circle|kml:box|gml:polygon|gml:point|gml:interior-polygon|gml:geospatial-query-from-elements|gml:geospatial-query|gml:circle|gml:box|georss:point|georss:geospatial-query|georss:circle|geo:polygon|geo:point|geo:interior-polygon|geo:geospatial-query-from-elements|geo:geospatial-query|geo:circle|geo:box|fn:zero-or-one|fn:years-from-duration|fn:year-from-dateTime|fn:year-from-date|fn:upper-case|fn:unordered|fn:true|fn:translate|fn:trace|fn:tokenize|fn:timezone-from-time|fn:timezone-from-dateTime|fn:timezone-from-date|fn:sum|fn:subtract-dateTimes-yielding-yearMonthDuration|fn:subtract-dateTimes-yielding-dayTimeDuration|fn:substring-before|fn:substring-after|fn:substring|fn:subsequence|fn:string-to-codepoints|fn:string-pad|fn:string-length|fn:string-join|fn:string|fn:static-base-uri|fn:starts-with|fn:seconds-from-time|fn:seconds-from-duration|fn:seconds-from-dateTime|fn:round-half-to-even|fn:round|fn:root|fn:reverse|fn:resolve-uri|fn:resolve-QName|fn:replace|fn:remove|fn:QName|fn:prefix-from-QName|fn:position|fn:one-or-more|fn:number|fn:not|fn:normalize-unicode|fn:normalize-space|fn:node-name|fn:node-kind|fn:nilled|fn:namespace-uri-from-QName|fn:namespace-uri-for-prefix|fn:namespace-uri|fn:name|fn:months-from-duration|fn:month-from-dateTime|fn:month-from-date|fn:minutes-from-time|fn:minutes-from-duration|fn:minutes-from-dateTime|fn:min|fn:max|fn:matches|fn:lower-case|fn:local-name-from-QName|fn:local-name|fn:last|fn:lang|fn:iri-to-uri|fn:insert-before|fn:index-of|fn:in-scope-prefixes|fn:implicit-timezone|fn:idref|fn:id|fn:hours-from-time|fn:hours-from-duration|fn:hours-from-dateTime|fn:floor|fn:false|fn:expanded-QName|fn:exists|fn:exactly-one|fn:escape-uri|fn:escape-html-uri|fn:error|fn:ends-with|fn:encode-for-uri|fn:empty|fn:document-uri|fn:doc-available|fn:doc|fn:distinct-values|fn:distinct-nodes|fn:default-collation|fn:deep-equal|fn:days-from-duration|fn:day-from-dateTime|fn:day-from-date|fn:data|fn:current-time|fn:current-dateTime|fn:current-date|fn:count|fn:contains|fn:concat|fn:compare|fn:collection|fn:codepoints-to-string|fn:codepoint-equal|fn:ceiling|fn:boolean|fn:base-uri|fn:avg|fn:adjust-time-to-timezone|fn:adjust-dateTime-to-timezone|fn:adjust-date-to-timezone|fn:abs|feed:unsubscribe|feed:subscription|feed:subscribe|feed:request|feed:item|feed:description|excel:clean|entity:enrich|dom:set-pipelines|dom:set-permissions|dom:set-name|dom:set-evaluation-context|dom:set-domain-scope|dom:set-description|dom:remove-pipeline|dom:remove-permissions|dom:remove|dom:get|dom:evaluation-context|dom:domains|dom:domain-scope|dom:create|dom:configuration-set-restart-user|dom:configuration-set-permissions|dom:configuration-set-evaluation-context|dom:configuration-set-default-domain|dom:configuration-get|dom:configuration-create|dom:collection|dom:add-pipeline|dom:add-permissions|dls:retention-rules|dls:retention-rule-remove|dls:retention-rule-insert|dls:retention-rule|dls:purge|dls:node-expand|dls:link-references|dls:link-expand|dls:documents-query|dls:document-versions-query|dls:document-version-uri|dls:document-version-query|dls:document-version-delete|dls:document-version-as-of|dls:document-version|dls:document-update|dls:document-unmanage|dls:document-set-quality|dls:document-set-property|dls:document-set-properties|dls:document-set-permissions|dls:document-set-collections|dls:document-retention-rules|dls:document-remove-properties|dls:document-remove-permissions|dls:document-remove-collections|dls:document-purge|dls:document-manage|dls:document-is-managed|dls:document-insert-and-manage|dls:document-include-query|dls:document-history|dls:document-get-permissions|dls:document-extract-part|dls:document-delete|dls:document-checkout-status|dls:document-checkout|dls:document-checkin|dls:document-add-properties|dls:document-add-permissions|dls:document-add-collections|dls:break-checkout|dls:author-query|dls:as-of-query|dbk:convert|dbg:wait|dbg:value|dbg:stopped|dbg:stop|dbg:step|dbg:status|dbg:stack|dbg:out|dbg:next|dbg:line|dbg:invoke|dbg:function|dbg:finish|dbg:expr|dbg:eval|dbg:disconnect|dbg:detach|dbg:continue|dbg:connect|dbg:clear|dbg:breakpoints|dbg:break|dbg:attached|dbg:attach|cvt:save-converted-documents|cvt:part-uri|cvt:destination-uri|cvt:basepath|cvt:basename|cts:words|cts:word-query-weight|cts:word-query-text|cts:word-query-options|cts:word-query|cts:word-match|cts:walk|cts:uris|cts:uri-match|cts:train|cts:tokenize|cts:thresholds|cts:stem|cts:similar-query-weight|cts:similar-query-nodes|cts:similar-query|cts:shortest-distance|cts:search|cts:score|cts:reverse-query-weight|cts:reverse-query-nodes|cts:reverse-query|cts:remainder|cts:registered-query-weight|cts:registered-query-options|cts:registered-query-ids|cts:registered-query|cts:register|cts:query|cts:quality|cts:properties-query-query|cts:properties-query|cts:polygon-vertices|cts:polygon|cts:point-longitude|cts:point-latitude|cts:point|cts:or-query-queries|cts:or-query|cts:not-query-weight|cts:not-query-query|cts:not-query|cts:near-query-weight|cts:near-query-queries|cts:near-query-options|cts:near-query-distance|cts:near-query|cts:highlight|cts:geospatial-co-occurrences|cts:frequency|cts:fitness|cts:field-words|cts:field-word-query-weight|cts:field-word-query-text|cts:field-word-query-options|cts:field-word-query-field-name|cts:field-word-query|cts:field-word-match|cts:entity-highlight|cts:element-words|cts:element-word-query-weight|cts:element-word-query-text|cts:element-word-query-options|cts:element-word-query-element-name|cts:element-word-query|cts:element-word-match|cts:element-values|cts:element-value-ranges|cts:element-value-query-weight|cts:element-value-query-text|cts:element-value-query-options|cts:element-value-query-element-name|cts:element-value-query|cts:element-value-match|cts:element-value-geospatial-co-occurrences|cts:element-value-co-occurrences|cts:element-range-query-weight|cts:element-range-query-value|cts:element-range-query-options|cts:element-range-query-operator|cts:element-range-query-element-name|cts:element-range-query|cts:element-query-query|cts:element-query-element-name|cts:element-query|cts:element-pair-geospatial-values|cts:element-pair-geospatial-value-match|cts:element-pair-geospatial-query-weight|cts:element-pair-geospatial-query-region|cts:element-pair-geospatial-query-options|cts:element-pair-geospatial-query-longitude-name|cts:element-pair-geospatial-query-latitude-name|cts:element-pair-geospatial-query-element-name|cts:element-pair-geospatial-query|cts:element-pair-geospatial-boxes|cts:element-geospatial-values|cts:element-geospatial-value-match|cts:element-geospatial-query-weight|cts:element-geospatial-query-region|cts:element-geospatial-query-options|cts:element-geospatial-query-element-name|cts:element-geospatial-query|cts:element-geospatial-boxes|cts:element-child-geospatial-values|cts:element-child-geospatial-value-match|cts:element-child-geospatial-query-weight|cts:element-child-geospatial-query-region|cts:element-child-geospatial-query-options|cts:element-child-geospatial-query-element-name|cts:element-child-geospatial-query-child-name|cts:element-child-geospatial-query|cts:element-child-geospatial-boxes|cts:element-attribute-words|cts:element-attribute-word-query-weight|cts:element-attribute-word-query-text|cts:element-attribute-word-query-options|cts:element-attribute-word-query-element-name|cts:element-attribute-word-query-attribute-name|cts:element-attribute-word-query|cts:element-attribute-word-match|cts:element-attribute-values|cts:element-attribute-value-ranges|cts:element-attribute-value-query-weight|cts:element-attribute-value-query-text|cts:element-attribute-value-query-options|cts:element-attribute-value-query-element-name|cts:element-attribute-value-query-attribute-name|cts:element-attribute-value-query|cts:element-attribute-value-match|cts:element-attribute-value-geospatial-co-occurrences|cts:element-attribute-value-co-occurrences|cts:element-attribute-range-query-weight|cts:element-attribute-range-query-value|cts:element-attribute-range-query-options|cts:element-attribute-range-query-operator|cts:element-attribute-range-query-element-name|cts:element-attribute-range-query-attribute-name|cts:element-attribute-range-query|cts:element-attribute-pair-geospatial-values|cts:element-attribute-pair-geospatial-value-match|cts:element-attribute-pair-geospatial-query-weight|cts:element-attribute-pair-geospatial-query-region|cts:element-attribute-pair-geospatial-query-options|cts:element-attribute-pair-geospatial-query-longitude-name|cts:element-attribute-pair-geospatial-query-latitude-name|cts:element-attribute-pair-geospatial-query-element-name|cts:element-attribute-pair-geospatial-query|cts:element-attribute-pair-geospatial-boxes|cts:document-query-uris|cts:document-query|cts:distance|cts:directory-query-uris|cts:directory-query-depth|cts:directory-query|cts:destination|cts:deregister|cts:contains|cts:confidence|cts:collections|cts:collection-query-uris|cts:collection-query|cts:collection-match|cts:classify|cts:circle-radius|cts:circle-center|cts:circle|cts:box-west|cts:box-south|cts:box-north|cts:box-east|cts:box|cts:bearing|cts:arc-intersection|cts:and-query-queries|cts:and-query-options|cts:and-query|cts:and-not-query-positive-query|cts:and-not-query-negative-query|cts:and-not-query|css:get|css:convert|cpf:success|cpf:failure|cpf:document-set-state|cpf:document-set-processing-status|cpf:document-set-last-updated|cpf:document-set-error|cpf:document-get-state|cpf:document-get-processing-status|cpf:document-get-last-updated|cpf:document-get-error|cpf:check-transition|alert:spawn-matching-actions|alert:rule-user-id-query|alert:rule-set-user-id|alert:rule-set-query|alert:rule-set-options|alert:rule-set-name|alert:rule-set-description|alert:rule-set-action|alert:rule-remove|alert:rule-name-query|alert:rule-insert|alert:rule-id-query|alert:rule-get-user-id|alert:rule-get-query|alert:rule-get-options|alert:rule-get-name|alert:rule-get-id|alert:rule-get-description|alert:rule-get-action|alert:rule-action-query|alert:remove-triggers|alert:make-rule|alert:make-log-action|alert:make-config|alert:make-action|alert:invoke-matching-actions|alert:get-my-rules|alert:get-all-rules|alert:get-actions|alert:find-matching-rules|alert:create-triggers|alert:config-set-uri|alert:config-set-trigger-ids|alert:config-set-options|alert:config-set-name|alert:config-set-description|alert:config-set-cpf-domain-names|alert:config-set-cpf-domain-ids|alert:config-insert|alert:config-get-uri|alert:config-get-trigger-ids|alert:config-get-options|alert:config-get-name|alert:config-get-id|alert:config-get-description|alert:config-get-cpf-domain-names|alert:config-get-cpf-domain-ids|alert:config-get|alert:config-delete|alert:action-set-options|alert:action-set-name|alert:action-set-module-root|alert:action-set-module-db|alert:action-set-module|alert:action-set-description|alert:action-remove|alert:action-insert|alert:action-get-options|alert:action-get-name|alert:action-get-module-root|alert:action-get-module-db|alert:action-get-module|alert:action-get-description|zero-or-one|years-from-duration|year-from-dateTime|year-from-date|upper-case|unordered|true|translate|trace|tokenize|timezone-from-time|timezone-from-dateTime|timezone-from-date|sum|subtract-dateTimes-yielding-yearMonthDuration|subtract-dateTimes-yielding-dayTimeDuration|substring-before|substring-after|substring|subsequence|string-to-codepoints|string-pad|string-length|string-join|string|static-base-uri|starts-with|seconds-from-time|seconds-from-duration|seconds-from-dateTime|round-half-to-even|round|root|reverse|resolve-uri|resolve-QName|replace|remove|QName|prefix-from-QName|position|one-or-more|number|not|normalize-unicode|normalize-space|node-name|node-kind|nilled|namespace-uri-from-QName|namespace-uri-for-prefix|namespace-uri|name|months-from-duration|month-from-dateTime|month-from-date|minutes-from-time|minutes-from-duration|minutes-from-dateTime|min|max|matches|lower-case|local-name-from-QName|local-name|last|lang|iri-to-uri|insert-before|index-of|in-scope-prefixes|implicit-timezone|idref|id|hours-from-time|hours-from-duration|hours-from-dateTime|floor|false|expanded-QName|exists|exactly-one|escape-uri|escape-html-uri|error|ends-with|encode-for-uri|empty|document-uri|doc-available|doc|distinct-values|distinct-nodes|default-collation|deep-equal|days-from-duration|day-from-dateTime|day-from-date|data|current-time|current-dateTime|current-date|count|contains|concat|compare|collection|codepoints-to-string|codepoint-equal|ceiling|boolean|base-uri|avg|adjust-time-to-timezone|adjust-dateTime-to-timezone|adjust-date-to-timezone|abs)\b/],
+["pln",/^[\w:-]+/],["pln",/^[\t\n\r \xa0]+/]]),["xq","xquery"]);
diff --git a/media/prettify-min-20110601/lang-yaml.js b/media/prettify-min-20110601/lang-yaml.js
new file mode 100644
index 0000000..c38729b
--- /dev/null
+++ b/media/prettify-min-20110601/lang-yaml.js
@@ -0,0 +1,2 @@
+var a=null;
+PR.registerLangHandler(PR.createSimpleLexer([["pun",/^[:>?|]+/,a,":|>?"],["dec",/^%(?:YAML|TAG)[^\n\r#]+/,a,"%"],["typ",/^&\S+/,a,"&"],["typ",/^!\S*/,a,"!"],["str",/^"(?:[^"\\]|\\.)*(?:"|$)/,a,'"'],["str",/^'(?:[^']|'')*(?:'|$)/,a,"'"],["com",/^#[^\n\r]*/,a,"#"],["pln",/^\s+/,a," \t\r\n"]],[["dec",/^(?:---|\.\.\.)(?:[\n\r]|$)/],["pun",/^-/],["kwd",/^\w+:[\n\r ]/],["pln",/^\w+/]]),["yaml","yml"]);
diff --git a/media/prettify-min-20110601/prettify-combined.js b/media/prettify-min-20110601/prettify-combined.js
new file mode 100644
index 0000000..503bdb0
--- /dev/null
+++ b/media/prettify-min-20110601/prettify-combined.js
@@ -0,0 +1,33 @@
+var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
+(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a=
+[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c<i;++c){var j=f[c];if(/\\[bdsw]/i.test(j))a.push(j);else{var j=m(j),d;c+2<i&&"-"===f[c+1]?(d=m(f[c+2]),c+=2):d=j;b.push([j,d]);d<65||j>122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;c<b.length;++c)i=b[c],i[0]<=j[1]+1?j[1]=Math.max(j[1],i[1]):f.push(j=i);b=["["];o&&b.push("^");b.push.apply(b,a);for(c=0;c<
+f.length;++c)i=f[c],b.push(e(i[0])),i[1]>i[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c<b;++c){var j=f[c];j==="("?++i:"\\"===j.charAt(0)&&(j=+j.substring(1))&&j<=i&&(d[j]=-1)}for(c=1;c<d.length;++c)-1===d[c]&&(d[c]=++t);for(i=c=0;c<b;++c)j=f[c],j==="("?(++i,d[i]===void 0&&(f[c]="(?:")):"\\"===j.charAt(0)&&
+(j=+j.substring(1))&&j<=i&&(f[c]="\\"+d[i]);for(i=c=0;c<b;++c)"^"===f[c]&&"^"!==f[c+1]&&(f[c]="");if(a.ignoreCase&&s)for(c=0;c<b;++c)j=f[c],a=j.charAt(0),j.length>=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p<d;++p){var g=a[p];if(g.ignoreCase)l=!0;else if(/[a-z]/i.test(g.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){s=!0;l=!1;break}}for(var r=
+{b:8,t:9,n:10,v:11,f:12,r:13},n=[],p=0,d=a.length;p<d;++p){g=a[p];if(g.global||g.multiline)throw Error(""+g);n.push("(?:"+y(g)+")")}return RegExp(n.join("|"),l?"gi":"g")}function M(a){function m(a){switch(a.nodeType){case 1:if(e.test(a.className))break;for(var g=a.firstChild;g;g=g.nextSibling)m(g);g=a.nodeName;if("BR"===g||"LI"===g)h[s]="\n",t[s<<1]=y++,t[s++<<1|1]=a;break;case 3:case 4:g=a.nodeValue,g.length&&(g=p?g.replace(/\r\n?/g,"\n"):g.replace(/[\t\n\r ]+/g," "),h[s]=g,t[s<<1]=y,y+=g.length,
+t[s++<<1|1]=a)}}var e=/(?:^|\s)nocode(?:\s|$)/,h=[],y=0,t=[],s=0,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=document.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);m(a);return{a:h.join("").replace(/\n$/,""),c:t}}function B(a,m,e,h){m&&(a={a:m,d:a},e(a),h.push.apply(h,a.e))}function x(a,m){function e(a){for(var l=a.d,p=[l,"pln"],d=0,g=a.a.match(y)||[],r={},n=0,z=g.length;n<z;++n){var f=g[n],b=r[f],o=void 0,c;if(typeof b===
+"string")c=!1;else{var i=h[f.charAt(0)];if(i)o=f.match(i[1]),b=i[0];else{for(c=0;c<t;++c)if(i=m[c],o=f.match(i[1])){b=i[0];break}o||(b="pln")}if((c=b.length>=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m),
+l=[],p={},d=0,g=e.length;d<g;++d){var r=e[d],n=r[3];if(n)for(var k=n.length;--k>=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
+q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/,
+q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g,
+"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a),
+a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e}
+for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g<d.length;++g)e(d[g]);m===(m|0)&&d[0].setAttribute("value",
+m);var r=s.createElement("OL");r.className="linenums";for(var n=Math.max(0,m-1|0)||0,g=0,z=d.length;g<z;++g)l=d[g],l.className="L"+(g+n)%10,l.firstChild||l.appendChild(s.createTextNode("\xa0")),r.appendChild(l);a.appendChild(r)}function k(a,m){for(var e=m.length;--e>=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*</.test(m)?"default-markup":"default-code";return A[a]}function E(a){var m=
+a.g;try{var e=M(a.h),h=e.a;a.a=h;a.c=e.c;a.d=0;C(m,h)(a);var k=/\bMSIE\b/.test(navigator.userAgent),m=/\n/g,t=a.a,s=t.length,e=0,l=a.c,p=l.length,h=0,d=a.e,g=d.length,a=0;d[g]=s;var r,n;for(n=r=0;n<g;)d[n]!==d[n+2]?(d[r++]=d[n++],d[r++]=d[n++]):n+=2;g=r;for(n=r=0;n<g;){for(var z=d[n],f=d[n+1],b=n+2;b+2<=g&&d[b+1]===f;)b+=2;d[r++]=z;d[r++]=f;n=b}for(d.length=r;h<p;){var o=l[h+2]||s,c=d[a+2]||s,b=Math.min(o,c),i=l[h+1],j;if(i.nodeType!==1&&(j=t.substring(e,b))){k&&(j=j.replace(m,"\r"));i.nodeValue=
+j;var u=i.ownerDocument,v=u.createElement("SPAN");v.className=d[a+1];var x=i.parentNode;x.replaceChild(v,i);v.appendChild(i);e<o&&(l[h+1]=i=u.createTextNode(t.substring(b,o)),x.insertBefore(i,v.nextSibling))}e=b;e>=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"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"],F=[w,"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,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],
+H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,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"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"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"],
+J=[v,"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"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"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"+
+I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["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"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["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"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),
+["cv","py"]);k(u({keywords:"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",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes",
+hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p<h.length&&l.now()<e;p++){var n=h[p],k=n.className;if(k.indexOf("prettyprint")>=0){var k=k.match(g),f,b;if(b=
+!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p<h.length?setTimeout(m,
+250):a&&a()}for(var e=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],h=[],k=0;k<e.length;++k)for(var t=0,s=e[k].length;t<s;++t)h.push(e[k][t]);var e=q,l=Date;l.now||(l={now:function(){return+new Date}});var p=0,d,g=/\blang(?:uage)?-([\w.]+)(?!\S)/;m()};window.PR={createSimpleLexer:x,registerLangHandler:k,sourceDecorator:u,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",
+PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}})();
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["str",/^(?:"(?:[^"\\]|\\.)*"|'(?:[^'\\]|\\.)*')/,null,"\"'"]],[["com",/^(?:--[^\n\r]*|\/\*[\S\s]*?(?:\*\/|$))/],["kwd",/^(?:add|all|alter|and|any|as|asc|authorization|backup|begin|between|break|browse|bulk|by|cascade|case|check|checkpoint|close|clustered|coalesce|collate|column|commit|compute|constraint|contains|containstable|continue|convert|create|cross|current|current_date|current_time|current_timestamp|current_user|cursor|database|dbcc|deallocate|declare|default|delete|deny|desc|disk|distinct|distributed|double|drop|dummy|dump|else|end|errlvl|escape|except|exec|execute|exists|exit|fetch|file|fillfactor|for|foreign|freetext|freetexttable|from|full|function|goto|grant|group|having|holdlock|identity|identitycol|identity_insert|if|in|index|inner|insert|intersect|into|is|join|key|kill|left|like|lineno|load|match|merge|national|nocheck|nonclustered|not|null|nullif|of|off|offsets|on|open|opendatasource|openquery|openrowset|openxml|option|or|order|outer|over|percent|plan|precision|primary|print|proc|procedure|public|raiserror|read|readtext|reconfigure|references|replication|restore|restrict|return|revoke|right|rollback|rowcount|rowguidcol|rule|save|schema|select|session_user|set|setuser|shutdown|some|statistics|system_user|table|textsize|then|to|top|tran|transaction|trigger|truncate|tsequal|union|unique|update|updatetext|use|user|using|values|varying|view|waitfor|when|where|while|with|writetext)(?=[^\w-]|$)/i,
+null],["lit",/^[+-]?(?:0x[\da-f]+|(?:\.\d+|\d+(?:\.\d*)?)(?:e[+-]?\d+)?)/i],["pln",/^[_a-z][\w-]*/i],["pun",/^[^\w\t\n\r "'\xa0][^\w\t\n\r "'+\xa0-]*/]]),["sql"]);
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\r \xa0]+/,null,"\t\n\r Â\xa0"],["com",/^%[^\n\r]*/,null,"%"]],[["kwd",/^\\[@-Za-z]+/],["kwd",/^\\./],["typ",/^[$&]/],["lit",/[+-]?(?:\.\d+|\d+(?:\.\d*)?)(cm|em|ex|in|pc|pt|bp|mm)/i],["pun",/^[()=[\]{}]+/]]),["latex","tex"]);
+PR.registerLangHandler(PR.createSimpleLexer([["pln",/^[\t\n\f\r ]+/,null," \t\r\n "]],[["str",/^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/,null],["str",/^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/,null],["lang-css-str",/^url\(([^"')]*)\)/i],["kwd",/^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i,null],["lang-css-kw",/^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i],["com",/^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//],["com",
+/^(?:<\!--|--\>)/],["lit",/^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i],["lit",/^#[\da-f]{3,6}/i],["pln",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i],["pun",/^[^\s\w"']+/]]),["css"]);PR.registerLangHandler(PR.createSimpleLexer([],[["kwd",/^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i]]),["css-kw"]);PR.registerLangHandler(PR.createSimpleLexer([],[["str",/^[^"')]+/]]),["css-str"]);
diff --git a/media/prettify-min-20110601/prettify.css b/media/prettify-min-20110601/prettify.css
new file mode 100644
index 0000000..d44b3a2
--- /dev/null
+++ b/media/prettify-min-20110601/prettify.css
@@ -0,0 +1 @@
+.pln{color:#000}@media screen{.str{color:#080}.kwd{color:#008}.com{color:#800}.typ{color:#606}.lit{color:#066}.pun,.opn,.clo{color:#660}.tag{color:#008}.atn{color:#606}.atv{color:#080}.dec,.var{color:#606}.fun{color:red}}@media print,projection{.str{color:#060}.kwd{color:#006;font-weight:bold}.com{color:#600;font-style:italic}.typ{color:#404;font-weight:bold}.lit{color:#044}.pun,.opn,.clo{color:#440}.tag{color:#006;font-weight:bold}.atn{color:#404}.atv{color:#060}}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} \ No newline at end of file
diff --git a/media/prettify-min-20110601/prettify.js b/media/prettify-min-20110601/prettify.js
new file mode 100644
index 0000000..eef5ad7
--- /dev/null
+++ b/media/prettify-min-20110601/prettify.js
@@ -0,0 +1,28 @@
+var q=null;window.PR_SHOULD_USE_CONTINUATION=!0;
+(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a=
+[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c<i;++c){var j=f[c];if(/\\[bdsw]/i.test(j))a.push(j);else{var j=m(j),d;c+2<i&&"-"===f[c+1]?(d=m(f[c+2]),c+=2):d=j;b.push([j,d]);d<65||j>122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;c<b.length;++c)i=b[c],i[0]<=j[1]+1?j[1]=Math.max(j[1],i[1]):f.push(j=i);b=["["];o&&b.push("^");b.push.apply(b,a);for(c=0;c<
+f.length;++c)i=f[c],b.push(e(i[0])),i[1]>i[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c<b;++c){var j=f[c];j==="("?++i:"\\"===j.charAt(0)&&(j=+j.substring(1))&&j<=i&&(d[j]=-1)}for(c=1;c<d.length;++c)-1===d[c]&&(d[c]=++t);for(i=c=0;c<b;++c)j=f[c],j==="("?(++i,d[i]===void 0&&(f[c]="(?:")):"\\"===j.charAt(0)&&
+(j=+j.substring(1))&&j<=i&&(f[c]="\\"+d[i]);for(i=c=0;c<b;++c)"^"===f[c]&&"^"!==f[c+1]&&(f[c]="");if(a.ignoreCase&&s)for(c=0;c<b;++c)j=f[c],a=j.charAt(0),j.length>=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p<d;++p){var g=a[p];if(g.ignoreCase)l=!0;else if(/[a-z]/i.test(g.source.replace(/\\u[\da-f]{4}|\\x[\da-f]{2}|\\[^UXux]/gi,""))){s=!0;l=!1;break}}for(var r=
+{b:8,t:9,n:10,v:11,f:12,r:13},n=[],p=0,d=a.length;p<d;++p){g=a[p];if(g.global||g.multiline)throw Error(""+g);n.push("(?:"+y(g)+")")}return RegExp(n.join("|"),l?"gi":"g")}function M(a){function m(a){switch(a.nodeType){case 1:if(e.test(a.className))break;for(var g=a.firstChild;g;g=g.nextSibling)m(g);g=a.nodeName;if("BR"===g||"LI"===g)h[s]="\n",t[s<<1]=y++,t[s++<<1|1]=a;break;case 3:case 4:g=a.nodeValue,g.length&&(g=p?g.replace(/\r\n?/g,"\n"):g.replace(/[\t\n\r ]+/g," "),h[s]=g,t[s<<1]=y,y+=g.length,
+t[s++<<1|1]=a)}}var e=/(?:^|\s)nocode(?:\s|$)/,h=[],y=0,t=[],s=0,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=document.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);m(a);return{a:h.join("").replace(/\n$/,""),c:t}}function B(a,m,e,h){m&&(a={a:m,d:a},e(a),h.push.apply(h,a.e))}function x(a,m){function e(a){for(var l=a.d,p=[l,"pln"],d=0,g=a.a.match(y)||[],r={},n=0,z=g.length;n<z;++n){var f=g[n],b=r[f],o=void 0,c;if(typeof b===
+"string")c=!1;else{var i=h[f.charAt(0)];if(i)o=f.match(i[1]),b=i[0];else{for(c=0;c<t;++c)if(i=m[c],o=f.match(i[1])){b=i[0];break}o||(b="pln")}if((c=b.length>=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m),
+l=[],p={},d=0,g=e.length;d<g;++d){var r=e[d],n=r[3];if(n)for(var k=n.length;--k>=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/,
+q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/,
+q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g,
+"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a),
+a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e}
+for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g<d.length;++g)e(d[g]);m===(m|0)&&d[0].setAttribute("value",
+m);var r=s.createElement("OL");r.className="linenums";for(var n=Math.max(0,m-1|0)||0,g=0,z=d.length;g<z;++g)l=d[g],l.className="L"+(g+n)%10,l.firstChild||l.appendChild(s.createTextNode("\xa0")),r.appendChild(l);a.appendChild(r)}function k(a,m){for(var e=m.length;--e>=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*</.test(m)?"default-markup":"default-code";return A[a]}function E(a){var m=
+a.g;try{var e=M(a.h),h=e.a;a.a=h;a.c=e.c;a.d=0;C(m,h)(a);var k=/\bMSIE\b/.test(navigator.userAgent),m=/\n/g,t=a.a,s=t.length,e=0,l=a.c,p=l.length,h=0,d=a.e,g=d.length,a=0;d[g]=s;var r,n;for(n=r=0;n<g;)d[n]!==d[n+2]?(d[r++]=d[n++],d[r++]=d[n++]):n+=2;g=r;for(n=r=0;n<g;){for(var z=d[n],f=d[n+1],b=n+2;b+2<=g&&d[b+1]===f;)b+=2;d[r++]=z;d[r++]=f;n=b}for(d.length=r;h<p;){var o=l[h+2]||s,c=d[a+2]||s,b=Math.min(o,c),i=l[h+1],j;if(i.nodeType!==1&&(j=t.substring(e,b))){k&&(j=j.replace(m,"\r"));i.nodeValue=
+j;var u=i.ownerDocument,v=u.createElement("SPAN");v.className=d[a+1];var x=i.parentNode;x.replaceChild(v,i);v.appendChild(i);e<o&&(l[h+1]=i=u.createTextNode(t.substring(b,o)),x.insertBefore(i,v.nextSibling))}e=b;e>=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"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"],F=[w,"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,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"],
+H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,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"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"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"],
+J=[v,"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"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"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"+
+I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^<?]+/],["dec",/^<!\w[^>]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["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"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["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"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}),
+["cv","py"]);k(u({keywords:"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",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes",
+hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p<h.length&&l.now()<e;p++){var n=h[p],k=n.className;if(k.indexOf("prettyprint")>=0){var k=k.match(g),f,b;if(b=
+!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p<h.length?setTimeout(m,
+250):a&&a()}for(var e=[document.getElementsByTagName("pre"),document.getElementsByTagName("code"),document.getElementsByTagName("xmp")],h=[],k=0;k<e.length;++k)for(var t=0,s=e[k].length;t<s;++t)h.push(e[k][t]);var e=q,l=Date;l.now||(l={now:function(){return+new Date}});var p=0,d,g=/\blang(?:uage)?-([\w.]+)(?!\S)/;m()};window.PR={createSimpleLexer:x,registerLangHandler:k,sourceDecorator:u,PR_ATTRIB_NAME:"atn",PR_ATTRIB_VALUE:"atv",PR_COMMENT:"com",PR_DECLARATION:"dec",PR_KEYWORD:"kwd",PR_LITERAL:"lit",
+PR_NOCODE:"nocode",PR_PLAIN:"pln",PR_PUNCTUATION:"pun",PR_SOURCE:"src",PR_STRING:"str",PR_TAG:"tag",PR_TYPE:"typ"}})();
diff --git a/templates/blog/base.html b/templates/blog/base.html
index 25ed0e9..29dbab7 100644
--- a/templates/blog/base.html
+++ b/templates/blog/base.html
@@ -1,14 +1,14 @@
{% extends "base.html" %}
{% block headdata %}
-<link rel="stylesheet" type="text/css" href="/media/prettify-min-20100721/prettify.css" />
+<link rel="stylesheet" type="text/css" href="/media/prettify-min-20110601/prettify.css" />
{% block blogheaddata %}{% endblock %}
{% endblock %}
{% block title %}toofishes.net - {% block subtitle %}Blog{% endblock %}{% endblock %}
{% block moreenddata %}
-<script type="text/javascript" src="/media/prettify-min-20100721/prettify-combined.js"></script>
+<script type="text/javascript" src="/media/prettify-min-20110601/prettify-combined.js"></script>
<script type="text/javascript">
$(document).ready(makePretty);
</script>