'+a.addText+" "),m=b.find("tr:last a")):(d.filter(":last").after('"),m=d.filter(":last").next().find("a"));m.click(function(b){b.preventDefault();b=c("#"+a.prefix+"-empty");var f=b.clone(!0);f.removeClass(a.emptyCssClass).addClass(a.formCssClass).attr("id",
-a.prefix+"-"+l);f.is("tr")?f.children(":last").append('"):f.is("ul")||f.is("ol")?f.append(''+a.deleteText+" "):f.children(":first").append(''+a.deleteText+" ");f.find("*").each(function(){k(this,a.prefix,e.val())});f.insertBefore(c(b));c(e).val(parseInt(e.val(),10)+1);l+=1;""!==g.val()&&0>=g.val()-e.val()&&m.parent().hide();
-f.find("a."+a.deleteCssClass).click(function(b){b.preventDefault();f.remove();--l;a.removed&&a.removed(f);c(document).trigger("formset:removed",[f,a.prefix]);b=c("."+a.formCssClass);c("#id_"+a.prefix+"-TOTAL_FORMS").val(b.length);(""===g.val()||0 1 ) {
- button_bar[0].remove();
- }
-
- // Hack 2! There are no add or remove events triggered by the django
- // so this is workaround to remove Pagedown on removal of inline
- var container = $(this).parents(".inline-related");
- $(container).find(".inline-deletelink").click(function(){
- DjangoPagedown.destroyEditor(el);
- });
- });
- });
- });
-})(django.jQuery);
diff --git a/collectedstatic/admin/js/popup_response.js b/collectedstatic/admin/js/popup_response.js
deleted file mode 100644
index b4a07e7..0000000
--- a/collectedstatic/admin/js/popup_response.js
+++ /dev/null
@@ -1,16 +0,0 @@
-/*global opener */
-(function() {
- 'use strict';
- var initData = JSON.parse(document.getElementById('django-admin-popup-response-constants').dataset.popupResponse);
- switch(initData.action) {
- case 'change':
- opener.dismissChangeRelatedObjectPopup(window, initData.value, initData.obj, initData.new_value);
- break;
- case 'delete':
- opener.dismissDeleteRelatedObjectPopup(window, initData.value);
- break;
- default:
- opener.dismissAddRelatedObjectPopup(window, initData.value, initData.obj);
- break;
- }
-})();
diff --git a/collectedstatic/admin/js/prepopulate.js b/collectedstatic/admin/js/prepopulate.js
deleted file mode 100644
index 5d4b0e8..0000000
--- a/collectedstatic/admin/js/prepopulate.js
+++ /dev/null
@@ -1,42 +0,0 @@
-/*global URLify*/
-(function($) {
- 'use strict';
- $.fn.prepopulate = function(dependencies, maxLength, allowUnicode) {
- /*
- Depends on urlify.js
- Populates a selected field with the values of the dependent fields,
- URLifies and shortens the string.
- dependencies - array of dependent fields ids
- maxLength - maximum length of the URLify'd string
- allowUnicode - Unicode support of the URLify'd string
- */
- return this.each(function() {
- var prepopulatedField = $(this);
-
- var populate = function() {
- // Bail if the field's value has been changed by the user
- if (prepopulatedField.data('_changed')) {
- return;
- }
-
- var values = [];
- $.each(dependencies, function(i, field) {
- field = $(field);
- if (field.val().length > 0) {
- values.push(field.val());
- }
- });
- prepopulatedField.val(URLify(values.join(' '), maxLength, allowUnicode));
- };
-
- prepopulatedField.data('_changed', false);
- prepopulatedField.change(function() {
- prepopulatedField.data('_changed', true);
- });
-
- if (!prepopulatedField.val()) {
- $(dependencies.join(',')).keyup(populate).change(populate).focus(populate);
- }
- });
- };
-})(django.jQuery);
diff --git a/collectedstatic/admin/js/prepopulate.min.js b/collectedstatic/admin/js/prepopulate.min.js
deleted file mode 100644
index 75f3c17..0000000
--- a/collectedstatic/admin/js/prepopulate.min.js
+++ /dev/null
@@ -1 +0,0 @@
-(function(c){c.fn.prepopulate=function(e,f,g){return this.each(function(){var a=c(this),b=function(){if(!a.data("_changed")){var b=[];c.each(e,function(a,d){d=c(d);0= 0 && j < len ? [ this[ j ] ] : [] );
- },
-
- end: function() {
- return this.prevObject || this.constructor();
- },
-
- // For internal use only.
- // Behaves like an Array's method, not like a jQuery method.
- push: push,
- sort: arr.sort,
- splice: arr.splice
-};
-
-jQuery.extend = jQuery.fn.extend = function() {
- var options, name, src, copy, copyIsArray, clone,
- target = arguments[ 0 ] || {},
- i = 1,
- length = arguments.length,
- deep = false;
-
- // Handle a deep copy situation
- if ( typeof target === "boolean" ) {
- deep = target;
-
- // Skip the boolean and the target
- target = arguments[ i ] || {};
- i++;
- }
-
- // Handle case when target is a string or something (possible in deep copy)
- if ( typeof target !== "object" && !jQuery.isFunction( target ) ) {
- target = {};
- }
-
- // Extend jQuery itself if only one argument is passed
- if ( i === length ) {
- target = this;
- i--;
- }
-
- for ( ; i < length; i++ ) {
-
- // Only deal with non-null/undefined values
- if ( ( options = arguments[ i ] ) != null ) {
-
- // Extend the base object
- for ( name in options ) {
- src = target[ name ];
- copy = options[ name ];
-
- // Prevent never-ending loop
- if ( target === copy ) {
- continue;
- }
-
- // Recurse if we're merging plain objects or arrays
- if ( deep && copy && ( jQuery.isPlainObject( copy ) ||
- ( copyIsArray = jQuery.isArray( copy ) ) ) ) {
-
- if ( copyIsArray ) {
- copyIsArray = false;
- clone = src && jQuery.isArray( src ) ? src : [];
-
- } else {
- clone = src && jQuery.isPlainObject( src ) ? src : {};
- }
-
- // Never move original objects, clone them
- target[ name ] = jQuery.extend( deep, clone, copy );
-
- // Don't bring in undefined values
- } else if ( copy !== undefined ) {
- target[ name ] = copy;
- }
- }
- }
- }
-
- // Return the modified object
- return target;
-};
-
-jQuery.extend( {
-
- // Unique for each copy of jQuery on the page
- expando: "jQuery" + ( version + Math.random() ).replace( /\D/g, "" ),
-
- // Assume jQuery is ready without the ready module
- isReady: true,
-
- error: function( msg ) {
- throw new Error( msg );
- },
-
- noop: function() {},
-
- isFunction: function( obj ) {
- return jQuery.type( obj ) === "function";
- },
-
- isArray: Array.isArray,
-
- isWindow: function( obj ) {
- return obj != null && obj === obj.window;
- },
-
- isNumeric: function( obj ) {
-
- // parseFloat NaNs numeric-cast false positives (null|true|false|"")
- // ...but misinterprets leading-number strings, particularly hex literals ("0x...")
- // subtraction forces infinities to NaN
- // adding 1 corrects loss of precision from parseFloat (#15100)
- var realStringObj = obj && obj.toString();
- return !jQuery.isArray( obj ) && ( realStringObj - parseFloat( realStringObj ) + 1 ) >= 0;
- },
-
- isPlainObject: function( obj ) {
- var key;
-
- // Not plain objects:
- // - Any object or value whose internal [[Class]] property is not "[object Object]"
- // - DOM nodes
- // - window
- if ( jQuery.type( obj ) !== "object" || obj.nodeType || jQuery.isWindow( obj ) ) {
- return false;
- }
-
- // Not own constructor property must be Object
- if ( obj.constructor &&
- !hasOwn.call( obj, "constructor" ) &&
- !hasOwn.call( obj.constructor.prototype || {}, "isPrototypeOf" ) ) {
- return false;
- }
-
- // Own properties are enumerated firstly, so to speed up,
- // if last one is own, then all properties are own
- for ( key in obj ) {}
-
- return key === undefined || hasOwn.call( obj, key );
- },
-
- isEmptyObject: function( obj ) {
- var name;
- for ( name in obj ) {
- return false;
- }
- return true;
- },
-
- type: function( obj ) {
- if ( obj == null ) {
- return obj + "";
- }
-
- // Support: Android<4.0, iOS<6 (functionish RegExp)
- return typeof obj === "object" || typeof obj === "function" ?
- class2type[ toString.call( obj ) ] || "object" :
- typeof obj;
- },
-
- // Evaluates a script in a global context
- globalEval: function( code ) {
- var script,
- indirect = eval;
-
- code = jQuery.trim( code );
-
- if ( code ) {
-
- // If the code includes a valid, prologue position
- // strict mode pragma, execute code by injecting a
- // script tag into the document.
- if ( code.indexOf( "use strict" ) === 1 ) {
- script = document.createElement( "script" );
- script.text = code;
- document.head.appendChild( script ).parentNode.removeChild( script );
- } else {
-
- // Otherwise, avoid the DOM node creation, insertion
- // and removal by using an indirect global eval
-
- indirect( code );
- }
- }
- },
-
- // Convert dashed to camelCase; used by the css and data modules
- // Support: IE9-11+
- // Microsoft forgot to hump their vendor prefix (#9572)
- camelCase: function( string ) {
- return string.replace( rmsPrefix, "ms-" ).replace( rdashAlpha, fcamelCase );
- },
-
- nodeName: function( elem, name ) {
- return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase();
- },
-
- each: function( obj, callback ) {
- var length, i = 0;
-
- if ( isArrayLike( obj ) ) {
- length = obj.length;
- for ( ; i < length; i++ ) {
- if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
- break;
- }
- }
- } else {
- for ( i in obj ) {
- if ( callback.call( obj[ i ], i, obj[ i ] ) === false ) {
- break;
- }
- }
- }
-
- return obj;
- },
-
- // Support: Android<4.1
- trim: function( text ) {
- return text == null ?
- "" :
- ( text + "" ).replace( rtrim, "" );
- },
-
- // results is for internal usage only
- makeArray: function( arr, results ) {
- var ret = results || [];
-
- if ( arr != null ) {
- if ( isArrayLike( Object( arr ) ) ) {
- jQuery.merge( ret,
- typeof arr === "string" ?
- [ arr ] : arr
- );
- } else {
- push.call( ret, arr );
- }
- }
-
- return ret;
- },
-
- inArray: function( elem, arr, i ) {
- return arr == null ? -1 : indexOf.call( arr, elem, i );
- },
-
- merge: function( first, second ) {
- var len = +second.length,
- j = 0,
- i = first.length;
-
- for ( ; j < len; j++ ) {
- first[ i++ ] = second[ j ];
- }
-
- first.length = i;
-
- return first;
- },
-
- grep: function( elems, callback, invert ) {
- var callbackInverse,
- matches = [],
- i = 0,
- length = elems.length,
- callbackExpect = !invert;
-
- // Go through the array, only saving the items
- // that pass the validator function
- for ( ; i < length; i++ ) {
- callbackInverse = !callback( elems[ i ], i );
- if ( callbackInverse !== callbackExpect ) {
- matches.push( elems[ i ] );
- }
- }
-
- return matches;
- },
-
- // arg is for internal usage only
- map: function( elems, callback, arg ) {
- var length, value,
- i = 0,
- ret = [];
-
- // Go through the array, translating each of the items to their new values
- if ( isArrayLike( elems ) ) {
- length = elems.length;
- for ( ; i < length; i++ ) {
- value = callback( elems[ i ], i, arg );
-
- if ( value != null ) {
- ret.push( value );
- }
- }
-
- // Go through every key on the object,
- } else {
- for ( i in elems ) {
- value = callback( elems[ i ], i, arg );
-
- if ( value != null ) {
- ret.push( value );
- }
- }
- }
-
- // Flatten any nested arrays
- return concat.apply( [], ret );
- },
-
- // A global GUID counter for objects
- guid: 1,
-
- // Bind a function to a context, optionally partially applying any
- // arguments.
- proxy: function( fn, context ) {
- var tmp, args, proxy;
-
- if ( typeof context === "string" ) {
- tmp = fn[ context ];
- context = fn;
- fn = tmp;
- }
-
- // Quick check to determine if target is callable, in the spec
- // this throws a TypeError, but we will just return undefined.
- if ( !jQuery.isFunction( fn ) ) {
- return undefined;
- }
-
- // Simulated bind
- args = slice.call( arguments, 2 );
- proxy = function() {
- return fn.apply( context || this, args.concat( slice.call( arguments ) ) );
- };
-
- // Set the guid of unique handler to the same of original handler, so it can be removed
- proxy.guid = fn.guid = fn.guid || jQuery.guid++;
-
- return proxy;
- },
-
- now: Date.now,
-
- // jQuery.support is not used in Core but other projects attach their
- // properties to it so it needs to exist.
- support: support
-} );
-
-// JSHint would error on this code due to the Symbol not being defined in ES5.
-// Defining this global in .jshintrc would create a danger of using the global
-// unguarded in another place, it seems safer to just disable JSHint for these
-// three lines.
-/* jshint ignore: start */
-if ( typeof Symbol === "function" ) {
- jQuery.fn[ Symbol.iterator ] = arr[ Symbol.iterator ];
-}
-/* jshint ignore: end */
-
-// Populate the class2type map
-jQuery.each( "Boolean Number String Function Array Date RegExp Object Error Symbol".split( " " ),
-function( i, name ) {
- class2type[ "[object " + name + "]" ] = name.toLowerCase();
-} );
-
-function isArrayLike( obj ) {
-
- // Support: iOS 8.2 (not reproducible in simulator)
- // `in` check used to prevent JIT error (gh-2145)
- // hasOwn isn't used here due to false negatives
- // regarding Nodelist length in IE
- var length = !!obj && "length" in obj && obj.length,
- type = jQuery.type( obj );
-
- if ( type === "function" || jQuery.isWindow( obj ) ) {
- return false;
- }
-
- return type === "array" || length === 0 ||
- typeof length === "number" && length > 0 && ( length - 1 ) in obj;
-}
-var Sizzle =
-/*!
- * Sizzle CSS Selector Engine v2.2.1
- * http://sizzlejs.com/
- *
- * Copyright jQuery Foundation and other contributors
- * Released under the MIT license
- * http://jquery.org/license
- *
- * Date: 2015-10-17
- */
-(function( window ) {
-
-var i,
- support,
- Expr,
- getText,
- isXML,
- tokenize,
- compile,
- select,
- outermostContext,
- sortInput,
- hasDuplicate,
-
- // Local document vars
- setDocument,
- document,
- docElem,
- documentIsHTML,
- rbuggyQSA,
- rbuggyMatches,
- matches,
- contains,
-
- // Instance-specific data
- expando = "sizzle" + 1 * new Date(),
- preferredDoc = window.document,
- dirruns = 0,
- done = 0,
- classCache = createCache(),
- tokenCache = createCache(),
- compilerCache = createCache(),
- sortOrder = function( a, b ) {
- if ( a === b ) {
- hasDuplicate = true;
- }
- return 0;
- },
-
- // General-purpose constants
- MAX_NEGATIVE = 1 << 31,
-
- // Instance methods
- hasOwn = ({}).hasOwnProperty,
- arr = [],
- pop = arr.pop,
- push_native = arr.push,
- push = arr.push,
- slice = arr.slice,
- // Use a stripped-down indexOf as it's faster than native
- // http://jsperf.com/thor-indexof-vs-for/5
- indexOf = function( list, elem ) {
- var i = 0,
- len = list.length;
- for ( ; i < len; i++ ) {
- if ( list[i] === elem ) {
- return i;
- }
- }
- return -1;
- },
-
- booleans = "checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",
-
- // Regular expressions
-
- // http://www.w3.org/TR/css3-selectors/#whitespace
- whitespace = "[\\x20\\t\\r\\n\\f]",
-
- // http://www.w3.org/TR/CSS21/syndata.html#value-def-identifier
- identifier = "(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",
-
- // Attribute selectors: http://www.w3.org/TR/selectors/#attribute-selectors
- attributes = "\\[" + whitespace + "*(" + identifier + ")(?:" + whitespace +
- // Operator (capture 2)
- "*([*^$|!~]?=)" + whitespace +
- // "Attribute values must be CSS identifiers [capture 5] or strings [capture 3 or capture 4]"
- "*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|(" + identifier + "))|)" + whitespace +
- "*\\]",
-
- pseudos = ":(" + identifier + ")(?:\\((" +
- // To reduce the number of selectors needing tokenize in the preFilter, prefer arguments:
- // 1. quoted (capture 3; capture 4 or capture 5)
- "('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|" +
- // 2. simple (capture 6)
- "((?:\\\\.|[^\\\\()[\\]]|" + attributes + ")*)|" +
- // 3. anything else (capture 2)
- ".*" +
- ")\\)|)",
-
- // Leading and non-escaped trailing whitespace, capturing some non-whitespace characters preceding the latter
- rwhitespace = new RegExp( whitespace + "+", "g" ),
- rtrim = new RegExp( "^" + whitespace + "+|((?:^|[^\\\\])(?:\\\\.)*)" + whitespace + "+$", "g" ),
-
- rcomma = new RegExp( "^" + whitespace + "*," + whitespace + "*" ),
- rcombinators = new RegExp( "^" + whitespace + "*([>+~]|" + whitespace + ")" + whitespace + "*" ),
-
- rattributeQuotes = new RegExp( "=" + whitespace + "*([^\\]'\"]*?)" + whitespace + "*\\]", "g" ),
-
- rpseudo = new RegExp( pseudos ),
- ridentifier = new RegExp( "^" + identifier + "$" ),
-
- matchExpr = {
- "ID": new RegExp( "^#(" + identifier + ")" ),
- "CLASS": new RegExp( "^\\.(" + identifier + ")" ),
- "TAG": new RegExp( "^(" + identifier + "|[*])" ),
- "ATTR": new RegExp( "^" + attributes ),
- "PSEUDO": new RegExp( "^" + pseudos ),
- "CHILD": new RegExp( "^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\(" + whitespace +
- "*(even|odd|(([+-]|)(\\d*)n|)" + whitespace + "*(?:([+-]|)" + whitespace +
- "*(\\d+)|))" + whitespace + "*\\)|)", "i" ),
- "bool": new RegExp( "^(?:" + booleans + ")$", "i" ),
- // For use in libraries implementing .is()
- // We use this for POS matching in `select`
- "needsContext": new RegExp( "^" + whitespace + "*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\(" +
- whitespace + "*((?:-\\d)?\\d*)" + whitespace + "*\\)|)(?=[^-]|$)", "i" )
- },
-
- rinputs = /^(?:input|select|textarea|button)$/i,
- rheader = /^h\d$/i,
-
- rnative = /^[^{]+\{\s*\[native \w/,
-
- // Easily-parseable/retrievable ID or TAG or CLASS selectors
- rquickExpr = /^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,
-
- rsibling = /[+~]/,
- rescape = /'|\\/g,
-
- // CSS escapes http://www.w3.org/TR/CSS21/syndata.html#escaped-characters
- runescape = new RegExp( "\\\\([\\da-f]{1,6}" + whitespace + "?|(" + whitespace + ")|.)", "ig" ),
- funescape = function( _, escaped, escapedWhitespace ) {
- var high = "0x" + escaped - 0x10000;
- // NaN means non-codepoint
- // Support: Firefox<24
- // Workaround erroneous numeric interpretation of +"0x"
- return high !== high || escapedWhitespace ?
- escaped :
- high < 0 ?
- // BMP codepoint
- String.fromCharCode( high + 0x10000 ) :
- // Supplemental Plane codepoint (surrogate pair)
- String.fromCharCode( high >> 10 | 0xD800, high & 0x3FF | 0xDC00 );
- },
-
- // Used for iframes
- // See setDocument()
- // Removing the function wrapper causes a "Permission Denied"
- // error in IE
- unloadHandler = function() {
- setDocument();
- };
-
-// Optimize for push.apply( _, NodeList )
-try {
- push.apply(
- (arr = slice.call( preferredDoc.childNodes )),
- preferredDoc.childNodes
- );
- // Support: Android<4.0
- // Detect silently failing push.apply
- arr[ preferredDoc.childNodes.length ].nodeType;
-} catch ( e ) {
- push = { apply: arr.length ?
-
- // Leverage slice if possible
- function( target, els ) {
- push_native.apply( target, slice.call(els) );
- } :
-
- // Support: IE<9
- // Otherwise append directly
- function( target, els ) {
- var j = target.length,
- i = 0;
- // Can't trust NodeList.length
- while ( (target[j++] = els[i++]) ) {}
- target.length = j - 1;
- }
- };
-}
-
-function Sizzle( selector, context, results, seed ) {
- var m, i, elem, nid, nidselect, match, groups, newSelector,
- newContext = context && context.ownerDocument,
-
- // nodeType defaults to 9, since context defaults to document
- nodeType = context ? context.nodeType : 9;
-
- results = results || [];
-
- // Return early from calls with invalid selector or context
- if ( typeof selector !== "string" || !selector ||
- nodeType !== 1 && nodeType !== 9 && nodeType !== 11 ) {
-
- return results;
- }
-
- // Try to shortcut find operations (as opposed to filters) in HTML documents
- if ( !seed ) {
-
- if ( ( context ? context.ownerDocument || context : preferredDoc ) !== document ) {
- setDocument( context );
- }
- context = context || document;
-
- if ( documentIsHTML ) {
-
- // If the selector is sufficiently simple, try using a "get*By*" DOM method
- // (excepting DocumentFragment context, where the methods don't exist)
- if ( nodeType !== 11 && (match = rquickExpr.exec( selector )) ) {
-
- // ID selector
- if ( (m = match[1]) ) {
-
- // Document context
- if ( nodeType === 9 ) {
- if ( (elem = context.getElementById( m )) ) {
-
- // Support: IE, Opera, Webkit
- // TODO: identify versions
- // getElementById can match elements by name instead of ID
- if ( elem.id === m ) {
- results.push( elem );
- return results;
- }
- } else {
- return results;
- }
-
- // Element context
- } else {
-
- // Support: IE, Opera, Webkit
- // TODO: identify versions
- // getElementById can match elements by name instead of ID
- if ( newContext && (elem = newContext.getElementById( m )) &&
- contains( context, elem ) &&
- elem.id === m ) {
-
- results.push( elem );
- return results;
- }
- }
-
- // Type selector
- } else if ( match[2] ) {
- push.apply( results, context.getElementsByTagName( selector ) );
- return results;
-
- // Class selector
- } else if ( (m = match[3]) && support.getElementsByClassName &&
- context.getElementsByClassName ) {
-
- push.apply( results, context.getElementsByClassName( m ) );
- return results;
- }
- }
-
- // Take advantage of querySelectorAll
- if ( support.qsa &&
- !compilerCache[ selector + " " ] &&
- (!rbuggyQSA || !rbuggyQSA.test( selector )) ) {
-
- if ( nodeType !== 1 ) {
- newContext = context;
- newSelector = selector;
-
- // qSA looks outside Element context, which is not what we want
- // Thanks to Andrew Dupont for this workaround technique
- // Support: IE <=8
- // Exclude object elements
- } else if ( context.nodeName.toLowerCase() !== "object" ) {
-
- // Capture the context ID, setting it first if necessary
- if ( (nid = context.getAttribute( "id" )) ) {
- nid = nid.replace( rescape, "\\$&" );
- } else {
- context.setAttribute( "id", (nid = expando) );
- }
-
- // Prefix every selector in the list
- groups = tokenize( selector );
- i = groups.length;
- nidselect = ridentifier.test( nid ) ? "#" + nid : "[id='" + nid + "']";
- while ( i-- ) {
- groups[i] = nidselect + " " + toSelector( groups[i] );
- }
- newSelector = groups.join( "," );
-
- // Expand context for sibling selectors
- newContext = rsibling.test( selector ) && testContext( context.parentNode ) ||
- context;
- }
-
- if ( newSelector ) {
- try {
- push.apply( results,
- newContext.querySelectorAll( newSelector )
- );
- return results;
- } catch ( qsaError ) {
- } finally {
- if ( nid === expando ) {
- context.removeAttribute( "id" );
- }
- }
- }
- }
- }
- }
-
- // All others
- return select( selector.replace( rtrim, "$1" ), context, results, seed );
-}
-
-/**
- * Create key-value caches of limited size
- * @returns {function(string, object)} Returns the Object data after storing it on itself with
- * property name the (space-suffixed) string and (if the cache is larger than Expr.cacheLength)
- * deleting the oldest entry
- */
-function createCache() {
- var keys = [];
-
- function cache( key, value ) {
- // Use (key + " ") to avoid collision with native prototype properties (see Issue #157)
- if ( keys.push( key + " " ) > Expr.cacheLength ) {
- // Only keep the most recent entries
- delete cache[ keys.shift() ];
- }
- return (cache[ key + " " ] = value);
- }
- return cache;
-}
-
-/**
- * Mark a function for special use by Sizzle
- * @param {Function} fn The function to mark
- */
-function markFunction( fn ) {
- fn[ expando ] = true;
- return fn;
-}
-
-/**
- * Support testing using an element
- * @param {Function} fn Passed the created div and expects a boolean result
- */
-function assert( fn ) {
- var div = document.createElement("div");
-
- try {
- return !!fn( div );
- } catch (e) {
- return false;
- } finally {
- // Remove from its parent by default
- if ( div.parentNode ) {
- div.parentNode.removeChild( div );
- }
- // release memory in IE
- div = null;
- }
-}
-
-/**
- * Adds the same handler for all of the specified attrs
- * @param {String} attrs Pipe-separated list of attributes
- * @param {Function} handler The method that will be applied
- */
-function addHandle( attrs, handler ) {
- var arr = attrs.split("|"),
- i = arr.length;
-
- while ( i-- ) {
- Expr.attrHandle[ arr[i] ] = handler;
- }
-}
-
-/**
- * Checks document order of two siblings
- * @param {Element} a
- * @param {Element} b
- * @returns {Number} Returns less than 0 if a precedes b, greater than 0 if a follows b
- */
-function siblingCheck( a, b ) {
- var cur = b && a,
- diff = cur && a.nodeType === 1 && b.nodeType === 1 &&
- ( ~b.sourceIndex || MAX_NEGATIVE ) -
- ( ~a.sourceIndex || MAX_NEGATIVE );
-
- // Use IE sourceIndex if available on both nodes
- if ( diff ) {
- return diff;
- }
-
- // Check if b follows a
- if ( cur ) {
- while ( (cur = cur.nextSibling) ) {
- if ( cur === b ) {
- return -1;
- }
- }
- }
-
- return a ? 1 : -1;
-}
-
-/**
- * Returns a function to use in pseudos for input types
- * @param {String} type
- */
-function createInputPseudo( type ) {
- return function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && elem.type === type;
- };
-}
-
-/**
- * Returns a function to use in pseudos for buttons
- * @param {String} type
- */
-function createButtonPseudo( type ) {
- return function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return (name === "input" || name === "button") && elem.type === type;
- };
-}
-
-/**
- * Returns a function to use in pseudos for positionals
- * @param {Function} fn
- */
-function createPositionalPseudo( fn ) {
- return markFunction(function( argument ) {
- argument = +argument;
- return markFunction(function( seed, matches ) {
- var j,
- matchIndexes = fn( [], seed.length, argument ),
- i = matchIndexes.length;
-
- // Match elements found at the specified indexes
- while ( i-- ) {
- if ( seed[ (j = matchIndexes[i]) ] ) {
- seed[j] = !(matches[j] = seed[j]);
- }
- }
- });
- });
-}
-
-/**
- * Checks a node for validity as a Sizzle context
- * @param {Element|Object=} context
- * @returns {Element|Object|Boolean} The input node if acceptable, otherwise a falsy value
- */
-function testContext( context ) {
- return context && typeof context.getElementsByTagName !== "undefined" && context;
-}
-
-// Expose support vars for convenience
-support = Sizzle.support = {};
-
-/**
- * Detects XML nodes
- * @param {Element|Object} elem An element or a document
- * @returns {Boolean} True iff elem is a non-HTML XML node
- */
-isXML = Sizzle.isXML = function( elem ) {
- // documentElement is verified for cases where it doesn't yet exist
- // (such as loading iframes in IE - #4833)
- var documentElement = elem && (elem.ownerDocument || elem).documentElement;
- return documentElement ? documentElement.nodeName !== "HTML" : false;
-};
-
-/**
- * Sets document-related variables once based on the current document
- * @param {Element|Object} [doc] An element or document object to use to set the document
- * @returns {Object} Returns the current document
- */
-setDocument = Sizzle.setDocument = function( node ) {
- var hasCompare, parent,
- doc = node ? node.ownerDocument || node : preferredDoc;
-
- // Return early if doc is invalid or already selected
- if ( doc === document || doc.nodeType !== 9 || !doc.documentElement ) {
- return document;
- }
-
- // Update global variables
- document = doc;
- docElem = document.documentElement;
- documentIsHTML = !isXML( document );
-
- // Support: IE 9-11, Edge
- // Accessing iframe documents after unload throws "permission denied" errors (jQuery #13936)
- if ( (parent = document.defaultView) && parent.top !== parent ) {
- // Support: IE 11
- if ( parent.addEventListener ) {
- parent.addEventListener( "unload", unloadHandler, false );
-
- // Support: IE 9 - 10 only
- } else if ( parent.attachEvent ) {
- parent.attachEvent( "onunload", unloadHandler );
- }
- }
-
- /* Attributes
- ---------------------------------------------------------------------- */
-
- // Support: IE<8
- // Verify that getAttribute really returns attributes and not properties
- // (excepting IE8 booleans)
- support.attributes = assert(function( div ) {
- div.className = "i";
- return !div.getAttribute("className");
- });
-
- /* getElement(s)By*
- ---------------------------------------------------------------------- */
-
- // Check if getElementsByTagName("*") returns only elements
- support.getElementsByTagName = assert(function( div ) {
- div.appendChild( document.createComment("") );
- return !div.getElementsByTagName("*").length;
- });
-
- // Support: IE<9
- support.getElementsByClassName = rnative.test( document.getElementsByClassName );
-
- // Support: IE<10
- // Check if getElementById returns elements by name
- // The broken getElementById methods don't pick up programatically-set names,
- // so use a roundabout getElementsByName test
- support.getById = assert(function( div ) {
- docElem.appendChild( div ).id = expando;
- return !document.getElementsByName || !document.getElementsByName( expando ).length;
- });
-
- // ID find and filter
- if ( support.getById ) {
- Expr.find["ID"] = function( id, context ) {
- if ( typeof context.getElementById !== "undefined" && documentIsHTML ) {
- var m = context.getElementById( id );
- return m ? [ m ] : [];
- }
- };
- Expr.filter["ID"] = function( id ) {
- var attrId = id.replace( runescape, funescape );
- return function( elem ) {
- return elem.getAttribute("id") === attrId;
- };
- };
- } else {
- // Support: IE6/7
- // getElementById is not reliable as a find shortcut
- delete Expr.find["ID"];
-
- Expr.filter["ID"] = function( id ) {
- var attrId = id.replace( runescape, funescape );
- return function( elem ) {
- var node = typeof elem.getAttributeNode !== "undefined" &&
- elem.getAttributeNode("id");
- return node && node.value === attrId;
- };
- };
- }
-
- // Tag
- Expr.find["TAG"] = support.getElementsByTagName ?
- function( tag, context ) {
- if ( typeof context.getElementsByTagName !== "undefined" ) {
- return context.getElementsByTagName( tag );
-
- // DocumentFragment nodes don't have gEBTN
- } else if ( support.qsa ) {
- return context.querySelectorAll( tag );
- }
- } :
-
- function( tag, context ) {
- var elem,
- tmp = [],
- i = 0,
- // By happy coincidence, a (broken) gEBTN appears on DocumentFragment nodes too
- results = context.getElementsByTagName( tag );
-
- // Filter out possible comments
- if ( tag === "*" ) {
- while ( (elem = results[i++]) ) {
- if ( elem.nodeType === 1 ) {
- tmp.push( elem );
- }
- }
-
- return tmp;
- }
- return results;
- };
-
- // Class
- Expr.find["CLASS"] = support.getElementsByClassName && function( className, context ) {
- if ( typeof context.getElementsByClassName !== "undefined" && documentIsHTML ) {
- return context.getElementsByClassName( className );
- }
- };
-
- /* QSA/matchesSelector
- ---------------------------------------------------------------------- */
-
- // QSA and matchesSelector support
-
- // matchesSelector(:active) reports false when true (IE9/Opera 11.5)
- rbuggyMatches = [];
-
- // qSa(:focus) reports false when true (Chrome 21)
- // We allow this because of a bug in IE8/9 that throws an error
- // whenever `document.activeElement` is accessed on an iframe
- // So, we allow :focus to pass through QSA all the time to avoid the IE error
- // See http://bugs.jquery.com/ticket/13378
- rbuggyQSA = [];
-
- if ( (support.qsa = rnative.test( document.querySelectorAll )) ) {
- // Build QSA regex
- // Regex strategy adopted from Diego Perini
- assert(function( div ) {
- // Select is set to empty string on purpose
- // This is to test IE's treatment of not explicitly
- // setting a boolean content attribute,
- // since its presence should be enough
- // http://bugs.jquery.com/ticket/12359
- docElem.appendChild( div ).innerHTML = " " +
- "" +
- " ";
-
- // Support: IE8, Opera 11-12.16
- // Nothing should be selected when empty strings follow ^= or $= or *=
- // The test attribute must be unknown in Opera but "safe" for WinRT
- // http://msdn.microsoft.com/en-us/library/ie/hh465388.aspx#attribute_section
- if ( div.querySelectorAll("[msallowcapture^='']").length ) {
- rbuggyQSA.push( "[*^$]=" + whitespace + "*(?:''|\"\")" );
- }
-
- // Support: IE8
- // Boolean attributes and "value" are not treated correctly
- if ( !div.querySelectorAll("[selected]").length ) {
- rbuggyQSA.push( "\\[" + whitespace + "*(?:value|" + booleans + ")" );
- }
-
- // Support: Chrome<29, Android<4.4, Safari<7.0+, iOS<7.0+, PhantomJS<1.9.8+
- if ( !div.querySelectorAll( "[id~=" + expando + "-]" ).length ) {
- rbuggyQSA.push("~=");
- }
-
- // Webkit/Opera - :checked should return selected option elements
- // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
- // IE8 throws error here and will not see later tests
- if ( !div.querySelectorAll(":checked").length ) {
- rbuggyQSA.push(":checked");
- }
-
- // Support: Safari 8+, iOS 8+
- // https://bugs.webkit.org/show_bug.cgi?id=136851
- // In-page `selector#id sibing-combinator selector` fails
- if ( !div.querySelectorAll( "a#" + expando + "+*" ).length ) {
- rbuggyQSA.push(".#.+[+~]");
- }
- });
-
- assert(function( div ) {
- // Support: Windows 8 Native Apps
- // The type and name attributes are restricted during .innerHTML assignment
- var input = document.createElement("input");
- input.setAttribute( "type", "hidden" );
- div.appendChild( input ).setAttribute( "name", "D" );
-
- // Support: IE8
- // Enforce case-sensitivity of name attribute
- if ( div.querySelectorAll("[name=d]").length ) {
- rbuggyQSA.push( "name" + whitespace + "*[*^$|!~]?=" );
- }
-
- // FF 3.5 - :enabled/:disabled and hidden elements (hidden elements are still enabled)
- // IE8 throws error here and will not see later tests
- if ( !div.querySelectorAll(":enabled").length ) {
- rbuggyQSA.push( ":enabled", ":disabled" );
- }
-
- // Opera 10-11 does not throw on post-comma invalid pseudos
- div.querySelectorAll("*,:x");
- rbuggyQSA.push(",.*:");
- });
- }
-
- if ( (support.matchesSelector = rnative.test( (matches = docElem.matches ||
- docElem.webkitMatchesSelector ||
- docElem.mozMatchesSelector ||
- docElem.oMatchesSelector ||
- docElem.msMatchesSelector) )) ) {
-
- assert(function( div ) {
- // Check to see if it's possible to do matchesSelector
- // on a disconnected node (IE 9)
- support.disconnectedMatch = matches.call( div, "div" );
-
- // This should fail with an exception
- // Gecko does not error, returns false instead
- matches.call( div, "[s!='']:x" );
- rbuggyMatches.push( "!=", pseudos );
- });
- }
-
- rbuggyQSA = rbuggyQSA.length && new RegExp( rbuggyQSA.join("|") );
- rbuggyMatches = rbuggyMatches.length && new RegExp( rbuggyMatches.join("|") );
-
- /* Contains
- ---------------------------------------------------------------------- */
- hasCompare = rnative.test( docElem.compareDocumentPosition );
-
- // Element contains another
- // Purposefully self-exclusive
- // As in, an element does not contain itself
- contains = hasCompare || rnative.test( docElem.contains ) ?
- function( a, b ) {
- var adown = a.nodeType === 9 ? a.documentElement : a,
- bup = b && b.parentNode;
- return a === bup || !!( bup && bup.nodeType === 1 && (
- adown.contains ?
- adown.contains( bup ) :
- a.compareDocumentPosition && a.compareDocumentPosition( bup ) & 16
- ));
- } :
- function( a, b ) {
- if ( b ) {
- while ( (b = b.parentNode) ) {
- if ( b === a ) {
- return true;
- }
- }
- }
- return false;
- };
-
- /* Sorting
- ---------------------------------------------------------------------- */
-
- // Document order sorting
- sortOrder = hasCompare ?
- function( a, b ) {
-
- // Flag for duplicate removal
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
- }
-
- // Sort on method existence if only one input has compareDocumentPosition
- var compare = !a.compareDocumentPosition - !b.compareDocumentPosition;
- if ( compare ) {
- return compare;
- }
-
- // Calculate position if both inputs belong to the same document
- compare = ( a.ownerDocument || a ) === ( b.ownerDocument || b ) ?
- a.compareDocumentPosition( b ) :
-
- // Otherwise we know they are disconnected
- 1;
-
- // Disconnected nodes
- if ( compare & 1 ||
- (!support.sortDetached && b.compareDocumentPosition( a ) === compare) ) {
-
- // Choose the first element that is related to our preferred document
- if ( a === document || a.ownerDocument === preferredDoc && contains(preferredDoc, a) ) {
- return -1;
- }
- if ( b === document || b.ownerDocument === preferredDoc && contains(preferredDoc, b) ) {
- return 1;
- }
-
- // Maintain original order
- return sortInput ?
- ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
- 0;
- }
-
- return compare & 4 ? -1 : 1;
- } :
- function( a, b ) {
- // Exit early if the nodes are identical
- if ( a === b ) {
- hasDuplicate = true;
- return 0;
- }
-
- var cur,
- i = 0,
- aup = a.parentNode,
- bup = b.parentNode,
- ap = [ a ],
- bp = [ b ];
-
- // Parentless nodes are either documents or disconnected
- if ( !aup || !bup ) {
- return a === document ? -1 :
- b === document ? 1 :
- aup ? -1 :
- bup ? 1 :
- sortInput ?
- ( indexOf( sortInput, a ) - indexOf( sortInput, b ) ) :
- 0;
-
- // If the nodes are siblings, we can do a quick check
- } else if ( aup === bup ) {
- return siblingCheck( a, b );
- }
-
- // Otherwise we need full lists of their ancestors for comparison
- cur = a;
- while ( (cur = cur.parentNode) ) {
- ap.unshift( cur );
- }
- cur = b;
- while ( (cur = cur.parentNode) ) {
- bp.unshift( cur );
- }
-
- // Walk down the tree looking for a discrepancy
- while ( ap[i] === bp[i] ) {
- i++;
- }
-
- return i ?
- // Do a sibling check if the nodes have a common ancestor
- siblingCheck( ap[i], bp[i] ) :
-
- // Otherwise nodes in our document sort first
- ap[i] === preferredDoc ? -1 :
- bp[i] === preferredDoc ? 1 :
- 0;
- };
-
- return document;
-};
-
-Sizzle.matches = function( expr, elements ) {
- return Sizzle( expr, null, null, elements );
-};
-
-Sizzle.matchesSelector = function( elem, expr ) {
- // Set document vars if needed
- if ( ( elem.ownerDocument || elem ) !== document ) {
- setDocument( elem );
- }
-
- // Make sure that attribute selectors are quoted
- expr = expr.replace( rattributeQuotes, "='$1']" );
-
- if ( support.matchesSelector && documentIsHTML &&
- !compilerCache[ expr + " " ] &&
- ( !rbuggyMatches || !rbuggyMatches.test( expr ) ) &&
- ( !rbuggyQSA || !rbuggyQSA.test( expr ) ) ) {
-
- try {
- var ret = matches.call( elem, expr );
-
- // IE 9's matchesSelector returns false on disconnected nodes
- if ( ret || support.disconnectedMatch ||
- // As well, disconnected nodes are said to be in a document
- // fragment in IE 9
- elem.document && elem.document.nodeType !== 11 ) {
- return ret;
- }
- } catch (e) {}
- }
-
- return Sizzle( expr, document, null, [ elem ] ).length > 0;
-};
-
-Sizzle.contains = function( context, elem ) {
- // Set document vars if needed
- if ( ( context.ownerDocument || context ) !== document ) {
- setDocument( context );
- }
- return contains( context, elem );
-};
-
-Sizzle.attr = function( elem, name ) {
- // Set document vars if needed
- if ( ( elem.ownerDocument || elem ) !== document ) {
- setDocument( elem );
- }
-
- var fn = Expr.attrHandle[ name.toLowerCase() ],
- // Don't get fooled by Object.prototype properties (jQuery #13807)
- val = fn && hasOwn.call( Expr.attrHandle, name.toLowerCase() ) ?
- fn( elem, name, !documentIsHTML ) :
- undefined;
-
- return val !== undefined ?
- val :
- support.attributes || !documentIsHTML ?
- elem.getAttribute( name ) :
- (val = elem.getAttributeNode(name)) && val.specified ?
- val.value :
- null;
-};
-
-Sizzle.error = function( msg ) {
- throw new Error( "Syntax error, unrecognized expression: " + msg );
-};
-
-/**
- * Document sorting and removing duplicates
- * @param {ArrayLike} results
- */
-Sizzle.uniqueSort = function( results ) {
- var elem,
- duplicates = [],
- j = 0,
- i = 0;
-
- // Unless we *know* we can detect duplicates, assume their presence
- hasDuplicate = !support.detectDuplicates;
- sortInput = !support.sortStable && results.slice( 0 );
- results.sort( sortOrder );
-
- if ( hasDuplicate ) {
- while ( (elem = results[i++]) ) {
- if ( elem === results[ i ] ) {
- j = duplicates.push( i );
- }
- }
- while ( j-- ) {
- results.splice( duplicates[ j ], 1 );
- }
- }
-
- // Clear input after sorting to release objects
- // See https://github.com/jquery/sizzle/pull/225
- sortInput = null;
-
- return results;
-};
-
-/**
- * Utility function for retrieving the text value of an array of DOM nodes
- * @param {Array|Element} elem
- */
-getText = Sizzle.getText = function( elem ) {
- var node,
- ret = "",
- i = 0,
- nodeType = elem.nodeType;
-
- if ( !nodeType ) {
- // If no nodeType, this is expected to be an array
- while ( (node = elem[i++]) ) {
- // Do not traverse comment nodes
- ret += getText( node );
- }
- } else if ( nodeType === 1 || nodeType === 9 || nodeType === 11 ) {
- // Use textContent for elements
- // innerText usage removed for consistency of new lines (jQuery #11153)
- if ( typeof elem.textContent === "string" ) {
- return elem.textContent;
- } else {
- // Traverse its children
- for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
- ret += getText( elem );
- }
- }
- } else if ( nodeType === 3 || nodeType === 4 ) {
- return elem.nodeValue;
- }
- // Do not include comment or processing instruction nodes
-
- return ret;
-};
-
-Expr = Sizzle.selectors = {
-
- // Can be adjusted by the user
- cacheLength: 50,
-
- createPseudo: markFunction,
-
- match: matchExpr,
-
- attrHandle: {},
-
- find: {},
-
- relative: {
- ">": { dir: "parentNode", first: true },
- " ": { dir: "parentNode" },
- "+": { dir: "previousSibling", first: true },
- "~": { dir: "previousSibling" }
- },
-
- preFilter: {
- "ATTR": function( match ) {
- match[1] = match[1].replace( runescape, funescape );
-
- // Move the given value to match[3] whether quoted or unquoted
- match[3] = ( match[3] || match[4] || match[5] || "" ).replace( runescape, funescape );
-
- if ( match[2] === "~=" ) {
- match[3] = " " + match[3] + " ";
- }
-
- return match.slice( 0, 4 );
- },
-
- "CHILD": function( match ) {
- /* matches from matchExpr["CHILD"]
- 1 type (only|nth|...)
- 2 what (child|of-type)
- 3 argument (even|odd|\d*|\d*n([+-]\d+)?|...)
- 4 xn-component of xn+y argument ([+-]?\d*n|)
- 5 sign of xn-component
- 6 x of xn-component
- 7 sign of y-component
- 8 y of y-component
- */
- match[1] = match[1].toLowerCase();
-
- if ( match[1].slice( 0, 3 ) === "nth" ) {
- // nth-* requires argument
- if ( !match[3] ) {
- Sizzle.error( match[0] );
- }
-
- // numeric x and y parameters for Expr.filter.CHILD
- // remember that false/true cast respectively to 0/1
- match[4] = +( match[4] ? match[5] + (match[6] || 1) : 2 * ( match[3] === "even" || match[3] === "odd" ) );
- match[5] = +( ( match[7] + match[8] ) || match[3] === "odd" );
-
- // other types prohibit arguments
- } else if ( match[3] ) {
- Sizzle.error( match[0] );
- }
-
- return match;
- },
-
- "PSEUDO": function( match ) {
- var excess,
- unquoted = !match[6] && match[2];
-
- if ( matchExpr["CHILD"].test( match[0] ) ) {
- return null;
- }
-
- // Accept quoted arguments as-is
- if ( match[3] ) {
- match[2] = match[4] || match[5] || "";
-
- // Strip excess characters from unquoted arguments
- } else if ( unquoted && rpseudo.test( unquoted ) &&
- // Get excess from tokenize (recursively)
- (excess = tokenize( unquoted, true )) &&
- // advance to the next closing parenthesis
- (excess = unquoted.indexOf( ")", unquoted.length - excess ) - unquoted.length) ) {
-
- // excess is a negative index
- match[0] = match[0].slice( 0, excess );
- match[2] = unquoted.slice( 0, excess );
- }
-
- // Return only captures needed by the pseudo filter method (type and argument)
- return match.slice( 0, 3 );
- }
- },
-
- filter: {
-
- "TAG": function( nodeNameSelector ) {
- var nodeName = nodeNameSelector.replace( runescape, funescape ).toLowerCase();
- return nodeNameSelector === "*" ?
- function() { return true; } :
- function( elem ) {
- return elem.nodeName && elem.nodeName.toLowerCase() === nodeName;
- };
- },
-
- "CLASS": function( className ) {
- var pattern = classCache[ className + " " ];
-
- return pattern ||
- (pattern = new RegExp( "(^|" + whitespace + ")" + className + "(" + whitespace + "|$)" )) &&
- classCache( className, function( elem ) {
- return pattern.test( typeof elem.className === "string" && elem.className || typeof elem.getAttribute !== "undefined" && elem.getAttribute("class") || "" );
- });
- },
-
- "ATTR": function( name, operator, check ) {
- return function( elem ) {
- var result = Sizzle.attr( elem, name );
-
- if ( result == null ) {
- return operator === "!=";
- }
- if ( !operator ) {
- return true;
- }
-
- result += "";
-
- return operator === "=" ? result === check :
- operator === "!=" ? result !== check :
- operator === "^=" ? check && result.indexOf( check ) === 0 :
- operator === "*=" ? check && result.indexOf( check ) > -1 :
- operator === "$=" ? check && result.slice( -check.length ) === check :
- operator === "~=" ? ( " " + result.replace( rwhitespace, " " ) + " " ).indexOf( check ) > -1 :
- operator === "|=" ? result === check || result.slice( 0, check.length + 1 ) === check + "-" :
- false;
- };
- },
-
- "CHILD": function( type, what, argument, first, last ) {
- var simple = type.slice( 0, 3 ) !== "nth",
- forward = type.slice( -4 ) !== "last",
- ofType = what === "of-type";
-
- return first === 1 && last === 0 ?
-
- // Shortcut for :nth-*(n)
- function( elem ) {
- return !!elem.parentNode;
- } :
-
- function( elem, context, xml ) {
- var cache, uniqueCache, outerCache, node, nodeIndex, start,
- dir = simple !== forward ? "nextSibling" : "previousSibling",
- parent = elem.parentNode,
- name = ofType && elem.nodeName.toLowerCase(),
- useCache = !xml && !ofType,
- diff = false;
-
- if ( parent ) {
-
- // :(first|last|only)-(child|of-type)
- if ( simple ) {
- while ( dir ) {
- node = elem;
- while ( (node = node[ dir ]) ) {
- if ( ofType ?
- node.nodeName.toLowerCase() === name :
- node.nodeType === 1 ) {
-
- return false;
- }
- }
- // Reverse direction for :only-* (if we haven't yet done so)
- start = dir = type === "only" && !start && "nextSibling";
- }
- return true;
- }
-
- start = [ forward ? parent.firstChild : parent.lastChild ];
-
- // non-xml :nth-child(...) stores cache data on `parent`
- if ( forward && useCache ) {
-
- // Seek `elem` from a previously-cached index
-
- // ...in a gzip-friendly way
- node = parent;
- outerCache = node[ expando ] || (node[ expando ] = {});
-
- // Support: IE <9 only
- // Defend against cloned attroperties (jQuery gh-1709)
- uniqueCache = outerCache[ node.uniqueID ] ||
- (outerCache[ node.uniqueID ] = {});
-
- cache = uniqueCache[ type ] || [];
- nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
- diff = nodeIndex && cache[ 2 ];
- node = nodeIndex && parent.childNodes[ nodeIndex ];
-
- while ( (node = ++nodeIndex && node && node[ dir ] ||
-
- // Fallback to seeking `elem` from the start
- (diff = nodeIndex = 0) || start.pop()) ) {
-
- // When found, cache indexes on `parent` and break
- if ( node.nodeType === 1 && ++diff && node === elem ) {
- uniqueCache[ type ] = [ dirruns, nodeIndex, diff ];
- break;
- }
- }
-
- } else {
- // Use previously-cached element index if available
- if ( useCache ) {
- // ...in a gzip-friendly way
- node = elem;
- outerCache = node[ expando ] || (node[ expando ] = {});
-
- // Support: IE <9 only
- // Defend against cloned attroperties (jQuery gh-1709)
- uniqueCache = outerCache[ node.uniqueID ] ||
- (outerCache[ node.uniqueID ] = {});
-
- cache = uniqueCache[ type ] || [];
- nodeIndex = cache[ 0 ] === dirruns && cache[ 1 ];
- diff = nodeIndex;
- }
-
- // xml :nth-child(...)
- // or :nth-last-child(...) or :nth(-last)?-of-type(...)
- if ( diff === false ) {
- // Use the same loop as above to seek `elem` from the start
- while ( (node = ++nodeIndex && node && node[ dir ] ||
- (diff = nodeIndex = 0) || start.pop()) ) {
-
- if ( ( ofType ?
- node.nodeName.toLowerCase() === name :
- node.nodeType === 1 ) &&
- ++diff ) {
-
- // Cache the index of each encountered element
- if ( useCache ) {
- outerCache = node[ expando ] || (node[ expando ] = {});
-
- // Support: IE <9 only
- // Defend against cloned attroperties (jQuery gh-1709)
- uniqueCache = outerCache[ node.uniqueID ] ||
- (outerCache[ node.uniqueID ] = {});
-
- uniqueCache[ type ] = [ dirruns, diff ];
- }
-
- if ( node === elem ) {
- break;
- }
- }
- }
- }
- }
-
- // Incorporate the offset, then check against cycle size
- diff -= last;
- return diff === first || ( diff % first === 0 && diff / first >= 0 );
- }
- };
- },
-
- "PSEUDO": function( pseudo, argument ) {
- // pseudo-class names are case-insensitive
- // http://www.w3.org/TR/selectors/#pseudo-classes
- // Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
- // Remember that setFilters inherits from pseudos
- var args,
- fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
- Sizzle.error( "unsupported pseudo: " + pseudo );
-
- // The user may use createPseudo to indicate that
- // arguments are needed to create the filter function
- // just as Sizzle does
- if ( fn[ expando ] ) {
- return fn( argument );
- }
-
- // But maintain support for old signatures
- if ( fn.length > 1 ) {
- args = [ pseudo, pseudo, "", argument ];
- return Expr.setFilters.hasOwnProperty( pseudo.toLowerCase() ) ?
- markFunction(function( seed, matches ) {
- var idx,
- matched = fn( seed, argument ),
- i = matched.length;
- while ( i-- ) {
- idx = indexOf( seed, matched[i] );
- seed[ idx ] = !( matches[ idx ] = matched[i] );
- }
- }) :
- function( elem ) {
- return fn( elem, 0, args );
- };
- }
-
- return fn;
- }
- },
-
- pseudos: {
- // Potentially complex pseudos
- "not": markFunction(function( selector ) {
- // Trim the selector passed to compile
- // to avoid treating leading and trailing
- // spaces as combinators
- var input = [],
- results = [],
- matcher = compile( selector.replace( rtrim, "$1" ) );
-
- return matcher[ expando ] ?
- markFunction(function( seed, matches, context, xml ) {
- var elem,
- unmatched = matcher( seed, null, xml, [] ),
- i = seed.length;
-
- // Match elements unmatched by `matcher`
- while ( i-- ) {
- if ( (elem = unmatched[i]) ) {
- seed[i] = !(matches[i] = elem);
- }
- }
- }) :
- function( elem, context, xml ) {
- input[0] = elem;
- matcher( input, null, xml, results );
- // Don't keep the element (issue #299)
- input[0] = null;
- return !results.pop();
- };
- }),
-
- "has": markFunction(function( selector ) {
- return function( elem ) {
- return Sizzle( selector, elem ).length > 0;
- };
- }),
-
- "contains": markFunction(function( text ) {
- text = text.replace( runescape, funescape );
- return function( elem ) {
- return ( elem.textContent || elem.innerText || getText( elem ) ).indexOf( text ) > -1;
- };
- }),
-
- // "Whether an element is represented by a :lang() selector
- // is based solely on the element's language value
- // being equal to the identifier C,
- // or beginning with the identifier C immediately followed by "-".
- // The matching of C against the element's language value is performed case-insensitively.
- // The identifier C does not have to be a valid language name."
- // http://www.w3.org/TR/selectors/#lang-pseudo
- "lang": markFunction( function( lang ) {
- // lang value must be a valid identifier
- if ( !ridentifier.test(lang || "") ) {
- Sizzle.error( "unsupported lang: " + lang );
- }
- lang = lang.replace( runescape, funescape ).toLowerCase();
- return function( elem ) {
- var elemLang;
- do {
- if ( (elemLang = documentIsHTML ?
- elem.lang :
- elem.getAttribute("xml:lang") || elem.getAttribute("lang")) ) {
-
- elemLang = elemLang.toLowerCase();
- return elemLang === lang || elemLang.indexOf( lang + "-" ) === 0;
- }
- } while ( (elem = elem.parentNode) && elem.nodeType === 1 );
- return false;
- };
- }),
-
- // Miscellaneous
- "target": function( elem ) {
- var hash = window.location && window.location.hash;
- return hash && hash.slice( 1 ) === elem.id;
- },
-
- "root": function( elem ) {
- return elem === docElem;
- },
-
- "focus": function( elem ) {
- return elem === document.activeElement && (!document.hasFocus || document.hasFocus()) && !!(elem.type || elem.href || ~elem.tabIndex);
- },
-
- // Boolean properties
- "enabled": function( elem ) {
- return elem.disabled === false;
- },
-
- "disabled": function( elem ) {
- return elem.disabled === true;
- },
-
- "checked": function( elem ) {
- // In CSS3, :checked should return both checked and selected elements
- // http://www.w3.org/TR/2011/REC-css3-selectors-20110929/#checked
- var nodeName = elem.nodeName.toLowerCase();
- return (nodeName === "input" && !!elem.checked) || (nodeName === "option" && !!elem.selected);
- },
-
- "selected": function( elem ) {
- // Accessing this property makes selected-by-default
- // options in Safari work properly
- if ( elem.parentNode ) {
- elem.parentNode.selectedIndex;
- }
-
- return elem.selected === true;
- },
-
- // Contents
- "empty": function( elem ) {
- // http://www.w3.org/TR/selectors/#empty-pseudo
- // :empty is negated by element (1) or content nodes (text: 3; cdata: 4; entity ref: 5),
- // but not by others (comment: 8; processing instruction: 7; etc.)
- // nodeType < 6 works because attributes (2) do not appear as children
- for ( elem = elem.firstChild; elem; elem = elem.nextSibling ) {
- if ( elem.nodeType < 6 ) {
- return false;
- }
- }
- return true;
- },
-
- "parent": function( elem ) {
- return !Expr.pseudos["empty"]( elem );
- },
-
- // Element/input types
- "header": function( elem ) {
- return rheader.test( elem.nodeName );
- },
-
- "input": function( elem ) {
- return rinputs.test( elem.nodeName );
- },
-
- "button": function( elem ) {
- var name = elem.nodeName.toLowerCase();
- return name === "input" && elem.type === "button" || name === "button";
- },
-
- "text": function( elem ) {
- var attr;
- return elem.nodeName.toLowerCase() === "input" &&
- elem.type === "text" &&
-
- // Support: IE<8
- // New HTML5 attribute values (e.g., "search") appear with elem.type === "text"
- ( (attr = elem.getAttribute("type")) == null || attr.toLowerCase() === "text" );
- },
-
- // Position-in-collection
- "first": createPositionalPseudo(function() {
- return [ 0 ];
- }),
-
- "last": createPositionalPseudo(function( matchIndexes, length ) {
- return [ length - 1 ];
- }),
-
- "eq": createPositionalPseudo(function( matchIndexes, length, argument ) {
- return [ argument < 0 ? argument + length : argument ];
- }),
-
- "even": createPositionalPseudo(function( matchIndexes, length ) {
- var i = 0;
- for ( ; i < length; i += 2 ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "odd": createPositionalPseudo(function( matchIndexes, length ) {
- var i = 1;
- for ( ; i < length; i += 2 ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "lt": createPositionalPseudo(function( matchIndexes, length, argument ) {
- var i = argument < 0 ? argument + length : argument;
- for ( ; --i >= 0; ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- }),
-
- "gt": createPositionalPseudo(function( matchIndexes, length, argument ) {
- var i = argument < 0 ? argument + length : argument;
- for ( ; ++i < length; ) {
- matchIndexes.push( i );
- }
- return matchIndexes;
- })
- }
-};
-
-Expr.pseudos["nth"] = Expr.pseudos["eq"];
-
-// Add button/input type pseudos
-for ( i in { radio: true, checkbox: true, file: true, password: true, image: true } ) {
- Expr.pseudos[ i ] = createInputPseudo( i );
-}
-for ( i in { submit: true, reset: true } ) {
- Expr.pseudos[ i ] = createButtonPseudo( i );
-}
-
-// Easy API for creating new setFilters
-function setFilters() {}
-setFilters.prototype = Expr.filters = Expr.pseudos;
-Expr.setFilters = new setFilters();
-
-tokenize = Sizzle.tokenize = function( selector, parseOnly ) {
- var matched, match, tokens, type,
- soFar, groups, preFilters,
- cached = tokenCache[ selector + " " ];
-
- if ( cached ) {
- return parseOnly ? 0 : cached.slice( 0 );
- }
-
- soFar = selector;
- groups = [];
- preFilters = Expr.preFilter;
-
- while ( soFar ) {
-
- // Comma and first run
- if ( !matched || (match = rcomma.exec( soFar )) ) {
- if ( match ) {
- // Don't consume trailing commas as valid
- soFar = soFar.slice( match[0].length ) || soFar;
- }
- groups.push( (tokens = []) );
- }
-
- matched = false;
-
- // Combinators
- if ( (match = rcombinators.exec( soFar )) ) {
- matched = match.shift();
- tokens.push({
- value: matched,
- // Cast descendant combinators to space
- type: match[0].replace( rtrim, " " )
- });
- soFar = soFar.slice( matched.length );
- }
-
- // Filters
- for ( type in Expr.filter ) {
- if ( (match = matchExpr[ type ].exec( soFar )) && (!preFilters[ type ] ||
- (match = preFilters[ type ]( match ))) ) {
- matched = match.shift();
- tokens.push({
- value: matched,
- type: type,
- matches: match
- });
- soFar = soFar.slice( matched.length );
- }
- }
-
- if ( !matched ) {
- break;
- }
- }
-
- // Return the length of the invalid excess
- // if we're just parsing
- // Otherwise, throw an error or return tokens
- return parseOnly ?
- soFar.length :
- soFar ?
- Sizzle.error( selector ) :
- // Cache the tokens
- tokenCache( selector, groups ).slice( 0 );
-};
-
-function toSelector( tokens ) {
- var i = 0,
- len = tokens.length,
- selector = "";
- for ( ; i < len; i++ ) {
- selector += tokens[i].value;
- }
- return selector;
-}
-
-function addCombinator( matcher, combinator, base ) {
- var dir = combinator.dir,
- checkNonElements = base && dir === "parentNode",
- doneName = done++;
-
- return combinator.first ?
- // Check against closest ancestor/preceding element
- function( elem, context, xml ) {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- return matcher( elem, context, xml );
- }
- }
- } :
-
- // Check against all ancestor/preceding elements
- function( elem, context, xml ) {
- var oldCache, uniqueCache, outerCache,
- newCache = [ dirruns, doneName ];
-
- // We can't set arbitrary data on XML nodes, so they don't benefit from combinator caching
- if ( xml ) {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- if ( matcher( elem, context, xml ) ) {
- return true;
- }
- }
- }
- } else {
- while ( (elem = elem[ dir ]) ) {
- if ( elem.nodeType === 1 || checkNonElements ) {
- outerCache = elem[ expando ] || (elem[ expando ] = {});
-
- // Support: IE <9 only
- // Defend against cloned attroperties (jQuery gh-1709)
- uniqueCache = outerCache[ elem.uniqueID ] || (outerCache[ elem.uniqueID ] = {});
-
- if ( (oldCache = uniqueCache[ dir ]) &&
- oldCache[ 0 ] === dirruns && oldCache[ 1 ] === doneName ) {
-
- // Assign to newCache so results back-propagate to previous elements
- return (newCache[ 2 ] = oldCache[ 2 ]);
- } else {
- // Reuse newcache so results back-propagate to previous elements
- uniqueCache[ dir ] = newCache;
-
- // A match means we're done; a fail means we have to keep checking
- if ( (newCache[ 2 ] = matcher( elem, context, xml )) ) {
- return true;
- }
- }
- }
- }
- }
- };
-}
-
-function elementMatcher( matchers ) {
- return matchers.length > 1 ?
- function( elem, context, xml ) {
- var i = matchers.length;
- while ( i-- ) {
- if ( !matchers[i]( elem, context, xml ) ) {
- return false;
- }
- }
- return true;
- } :
- matchers[0];
-}
-
-function multipleContexts( selector, contexts, results ) {
- var i = 0,
- len = contexts.length;
- for ( ; i < len; i++ ) {
- Sizzle( selector, contexts[i], results );
- }
- return results;
-}
-
-function condense( unmatched, map, filter, context, xml ) {
- var elem,
- newUnmatched = [],
- i = 0,
- len = unmatched.length,
- mapped = map != null;
-
- for ( ; i < len; i++ ) {
- if ( (elem = unmatched[i]) ) {
- if ( !filter || filter( elem, context, xml ) ) {
- newUnmatched.push( elem );
- if ( mapped ) {
- map.push( i );
- }
- }
- }
- }
-
- return newUnmatched;
-}
-
-function setMatcher( preFilter, selector, matcher, postFilter, postFinder, postSelector ) {
- if ( postFilter && !postFilter[ expando ] ) {
- postFilter = setMatcher( postFilter );
- }
- if ( postFinder && !postFinder[ expando ] ) {
- postFinder = setMatcher( postFinder, postSelector );
- }
- return markFunction(function( seed, results, context, xml ) {
- var temp, i, elem,
- preMap = [],
- postMap = [],
- preexisting = results.length,
-
- // Get initial elements from seed or context
- elems = seed || multipleContexts( selector || "*", context.nodeType ? [ context ] : context, [] ),
-
- // Prefilter to get matcher input, preserving a map for seed-results synchronization
- matcherIn = preFilter && ( seed || !selector ) ?
- condense( elems, preMap, preFilter, context, xml ) :
- elems,
-
- matcherOut = matcher ?
- // If we have a postFinder, or filtered seed, or non-seed postFilter or preexisting results,
- postFinder || ( seed ? preFilter : preexisting || postFilter ) ?
-
- // ...intermediate processing is necessary
- [] :
-
- // ...otherwise use results directly
- results :
- matcherIn;
-
- // Find primary matches
- if ( matcher ) {
- matcher( matcherIn, matcherOut, context, xml );
- }
-
- // Apply postFilter
- if ( postFilter ) {
- temp = condense( matcherOut, postMap );
- postFilter( temp, [], context, xml );
-
- // Un-match failing elements by moving them back to matcherIn
- i = temp.length;
- while ( i-- ) {
- if ( (elem = temp[i]) ) {
- matcherOut[ postMap[i] ] = !(matcherIn[ postMap[i] ] = elem);
- }
- }
- }
-
- if ( seed ) {
- if ( postFinder || preFilter ) {
- if ( postFinder ) {
- // Get the final matcherOut by condensing this intermediate into postFinder contexts
- temp = [];
- i = matcherOut.length;
- while ( i-- ) {
- if ( (elem = matcherOut[i]) ) {
- // Restore matcherIn since elem is not yet a final match
- temp.push( (matcherIn[i] = elem) );
- }
- }
- postFinder( null, (matcherOut = []), temp, xml );
- }
-
- // Move matched elements from seed to results to keep them synchronized
- i = matcherOut.length;
- while ( i-- ) {
- if ( (elem = matcherOut[i]) &&
- (temp = postFinder ? indexOf( seed, elem ) : preMap[i]) > -1 ) {
-
- seed[temp] = !(results[temp] = elem);
- }
- }
- }
-
- // Add elements to results, through postFinder if defined
- } else {
- matcherOut = condense(
- matcherOut === results ?
- matcherOut.splice( preexisting, matcherOut.length ) :
- matcherOut
- );
- if ( postFinder ) {
- postFinder( null, results, matcherOut, xml );
- } else {
- push.apply( results, matcherOut );
- }
- }
- });
-}
-
-function matcherFromTokens( tokens ) {
- var checkContext, matcher, j,
- len = tokens.length,
- leadingRelative = Expr.relative[ tokens[0].type ],
- implicitRelative = leadingRelative || Expr.relative[" "],
- i = leadingRelative ? 1 : 0,
-
- // The foundational matcher ensures that elements are reachable from top-level context(s)
- matchContext = addCombinator( function( elem ) {
- return elem === checkContext;
- }, implicitRelative, true ),
- matchAnyContext = addCombinator( function( elem ) {
- return indexOf( checkContext, elem ) > -1;
- }, implicitRelative, true ),
- matchers = [ function( elem, context, xml ) {
- var ret = ( !leadingRelative && ( xml || context !== outermostContext ) ) || (
- (checkContext = context).nodeType ?
- matchContext( elem, context, xml ) :
- matchAnyContext( elem, context, xml ) );
- // Avoid hanging onto element (issue #299)
- checkContext = null;
- return ret;
- } ];
-
- for ( ; i < len; i++ ) {
- if ( (matcher = Expr.relative[ tokens[i].type ]) ) {
- matchers = [ addCombinator(elementMatcher( matchers ), matcher) ];
- } else {
- matcher = Expr.filter[ tokens[i].type ].apply( null, tokens[i].matches );
-
- // Return special upon seeing a positional matcher
- if ( matcher[ expando ] ) {
- // Find the next relative operator (if any) for proper handling
- j = ++i;
- for ( ; j < len; j++ ) {
- if ( Expr.relative[ tokens[j].type ] ) {
- break;
- }
- }
- return setMatcher(
- i > 1 && elementMatcher( matchers ),
- i > 1 && toSelector(
- // If the preceding token was a descendant combinator, insert an implicit any-element `*`
- tokens.slice( 0, i - 1 ).concat({ value: tokens[ i - 2 ].type === " " ? "*" : "" })
- ).replace( rtrim, "$1" ),
- matcher,
- i < j && matcherFromTokens( tokens.slice( i, j ) ),
- j < len && matcherFromTokens( (tokens = tokens.slice( j )) ),
- j < len && toSelector( tokens )
- );
- }
- matchers.push( matcher );
- }
- }
-
- return elementMatcher( matchers );
-}
-
-function matcherFromGroupMatchers( elementMatchers, setMatchers ) {
- var bySet = setMatchers.length > 0,
- byElement = elementMatchers.length > 0,
- superMatcher = function( seed, context, xml, results, outermost ) {
- var elem, j, matcher,
- matchedCount = 0,
- i = "0",
- unmatched = seed && [],
- setMatched = [],
- contextBackup = outermostContext,
- // We must always have either seed elements or outermost context
- elems = seed || byElement && Expr.find["TAG"]( "*", outermost ),
- // Use integer dirruns iff this is the outermost matcher
- dirrunsUnique = (dirruns += contextBackup == null ? 1 : Math.random() || 0.1),
- len = elems.length;
-
- if ( outermost ) {
- outermostContext = context === document || context || outermost;
- }
-
- // Add elements passing elementMatchers directly to results
- // Support: IE<9, Safari
- // Tolerate NodeList properties (IE: "length"; Safari: ) matching elements by id
- for ( ; i !== len && (elem = elems[i]) != null; i++ ) {
- if ( byElement && elem ) {
- j = 0;
- if ( !context && elem.ownerDocument !== document ) {
- setDocument( elem );
- xml = !documentIsHTML;
- }
- while ( (matcher = elementMatchers[j++]) ) {
- if ( matcher( elem, context || document, xml) ) {
- results.push( elem );
- break;
- }
- }
- if ( outermost ) {
- dirruns = dirrunsUnique;
- }
- }
-
- // Track unmatched elements for set filters
- if ( bySet ) {
- // They will have gone through all possible matchers
- if ( (elem = !matcher && elem) ) {
- matchedCount--;
- }
-
- // Lengthen the array for every element, matched or not
- if ( seed ) {
- unmatched.push( elem );
- }
- }
- }
-
- // `i` is now the count of elements visited above, and adding it to `matchedCount`
- // makes the latter nonnegative.
- matchedCount += i;
-
- // Apply set filters to unmatched elements
- // NOTE: This can be skipped if there are no unmatched elements (i.e., `matchedCount`
- // equals `i`), unless we didn't visit _any_ elements in the above loop because we have
- // no element matchers and no seed.
- // Incrementing an initially-string "0" `i` allows `i` to remain a string only in that
- // case, which will result in a "00" `matchedCount` that differs from `i` but is also
- // numerically zero.
- if ( bySet && i !== matchedCount ) {
- j = 0;
- while ( (matcher = setMatchers[j++]) ) {
- matcher( unmatched, setMatched, context, xml );
- }
-
- if ( seed ) {
- // Reintegrate element matches to eliminate the need for sorting
- if ( matchedCount > 0 ) {
- while ( i-- ) {
- if ( !(unmatched[i] || setMatched[i]) ) {
- setMatched[i] = pop.call( results );
- }
- }
- }
-
- // Discard index placeholder values to get only actual matches
- setMatched = condense( setMatched );
- }
-
- // Add matches to results
- push.apply( results, setMatched );
-
- // Seedless set matches succeeding multiple successful matchers stipulate sorting
- if ( outermost && !seed && setMatched.length > 0 &&
- ( matchedCount + setMatchers.length ) > 1 ) {
-
- Sizzle.uniqueSort( results );
- }
- }
-
- // Override manipulation of globals by nested matchers
- if ( outermost ) {
- dirruns = dirrunsUnique;
- outermostContext = contextBackup;
- }
-
- return unmatched;
- };
-
- return bySet ?
- markFunction( superMatcher ) :
- superMatcher;
-}
-
-compile = Sizzle.compile = function( selector, match /* Internal Use Only */ ) {
- var i,
- setMatchers = [],
- elementMatchers = [],
- cached = compilerCache[ selector + " " ];
-
- if ( !cached ) {
- // Generate a function of recursive functions that can be used to check each element
- if ( !match ) {
- match = tokenize( selector );
- }
- i = match.length;
- while ( i-- ) {
- cached = matcherFromTokens( match[i] );
- if ( cached[ expando ] ) {
- setMatchers.push( cached );
- } else {
- elementMatchers.push( cached );
- }
- }
-
- // Cache the compiled function
- cached = compilerCache( selector, matcherFromGroupMatchers( elementMatchers, setMatchers ) );
-
- // Save selector and tokenization
- cached.selector = selector;
- }
- return cached;
-};
-
-/**
- * A low-level selection function that works with Sizzle's compiled
- * selector functions
- * @param {String|Function} selector A selector or a pre-compiled
- * selector function built with Sizzle.compile
- * @param {Element} context
- * @param {Array} [results]
- * @param {Array} [seed] A set of elements to match against
- */
-select = Sizzle.select = function( selector, context, results, seed ) {
- var i, tokens, token, type, find,
- compiled = typeof selector === "function" && selector,
- match = !seed && tokenize( (selector = compiled.selector || selector) );
-
- results = results || [];
-
- // Try to minimize operations if there is only one selector in the list and no seed
- // (the latter of which guarantees us context)
- if ( match.length === 1 ) {
-
- // Reduce context if the leading compound selector is an ID
- tokens = match[0] = match[0].slice( 0 );
- if ( tokens.length > 2 && (token = tokens[0]).type === "ID" &&
- support.getById && context.nodeType === 9 && documentIsHTML &&
- Expr.relative[ tokens[1].type ] ) {
-
- context = ( Expr.find["ID"]( token.matches[0].replace(runescape, funescape), context ) || [] )[0];
- if ( !context ) {
- return results;
-
- // Precompiled matchers will still verify ancestry, so step up a level
- } else if ( compiled ) {
- context = context.parentNode;
- }
-
- selector = selector.slice( tokens.shift().value.length );
- }
-
- // Fetch a seed set for right-to-left matching
- i = matchExpr["needsContext"].test( selector ) ? 0 : tokens.length;
- while ( i-- ) {
- token = tokens[i];
-
- // Abort if we hit a combinator
- if ( Expr.relative[ (type = token.type) ] ) {
- break;
- }
- if ( (find = Expr.find[ type ]) ) {
- // Search, expanding context for leading sibling combinators
- if ( (seed = find(
- token.matches[0].replace( runescape, funescape ),
- rsibling.test( tokens[0].type ) && testContext( context.parentNode ) || context
- )) ) {
-
- // If seed is empty or no tokens remain, we can return early
- tokens.splice( i, 1 );
- selector = seed.length && toSelector( tokens );
- if ( !selector ) {
- push.apply( results, seed );
- return results;
- }
-
- break;
- }
- }
- }
- }
-
- // Compile and execute a filtering function if one is not provided
- // Provide `match` to avoid retokenization if we modified the selector above
- ( compiled || compile( selector, match ) )(
- seed,
- context,
- !documentIsHTML,
- results,
- !context || rsibling.test( selector ) && testContext( context.parentNode ) || context
- );
- return results;
-};
-
-// One-time assignments
-
-// Sort stability
-support.sortStable = expando.split("").sort( sortOrder ).join("") === expando;
-
-// Support: Chrome 14-35+
-// Always assume duplicates if they aren't passed to the comparison function
-support.detectDuplicates = !!hasDuplicate;
-
-// Initialize against the default document
-setDocument();
-
-// Support: Webkit<537.32 - Safari 6.0.3/Chrome 25 (fixed in Chrome 27)
-// Detached nodes confoundingly follow *each other*
-support.sortDetached = assert(function( div1 ) {
- // Should return 1, but returns 4 (following)
- return div1.compareDocumentPosition( document.createElement("div") ) & 1;
-});
-
-// Support: IE<8
-// Prevent attribute/property "interpolation"
-// http://msdn.microsoft.com/en-us/library/ms536429%28VS.85%29.aspx
-if ( !assert(function( div ) {
- div.innerHTML = " ";
- return div.firstChild.getAttribute("href") === "#" ;
-}) ) {
- addHandle( "type|href|height|width", function( elem, name, isXML ) {
- if ( !isXML ) {
- return elem.getAttribute( name, name.toLowerCase() === "type" ? 1 : 2 );
- }
- });
-}
-
-// Support: IE<9
-// Use defaultValue in place of getAttribute("value")
-if ( !support.attributes || !assert(function( div ) {
- div.innerHTML = " ";
- div.firstChild.setAttribute( "value", "" );
- return div.firstChild.getAttribute( "value" ) === "";
-}) ) {
- addHandle( "value", function( elem, name, isXML ) {
- if ( !isXML && elem.nodeName.toLowerCase() === "input" ) {
- return elem.defaultValue;
- }
- });
-}
-
-// Support: IE<9
-// Use getAttributeNode to fetch booleans when getAttribute lies
-if ( !assert(function( div ) {
- return div.getAttribute("disabled") == null;
-}) ) {
- addHandle( booleans, function( elem, name, isXML ) {
- var val;
- if ( !isXML ) {
- return elem[ name ] === true ? name.toLowerCase() :
- (val = elem.getAttributeNode( name )) && val.specified ?
- val.value :
- null;
- }
- });
-}
-
-return Sizzle;
-
-})( window );
-
-
-
-jQuery.find = Sizzle;
-jQuery.expr = Sizzle.selectors;
-jQuery.expr[ ":" ] = jQuery.expr.pseudos;
-jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort;
-jQuery.text = Sizzle.getText;
-jQuery.isXMLDoc = Sizzle.isXML;
-jQuery.contains = Sizzle.contains;
-
-
-
-var dir = function( elem, dir, until ) {
- var matched = [],
- truncate = until !== undefined;
-
- while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) {
- if ( elem.nodeType === 1 ) {
- if ( truncate && jQuery( elem ).is( until ) ) {
- break;
- }
- matched.push( elem );
- }
- }
- return matched;
-};
-
-
-var siblings = function( n, elem ) {
- var matched = [];
-
- for ( ; n; n = n.nextSibling ) {
- if ( n.nodeType === 1 && n !== elem ) {
- matched.push( n );
- }
- }
-
- return matched;
-};
-
-
-var rneedsContext = jQuery.expr.match.needsContext;
-
-var rsingleTag = ( /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/ );
-
-
-
-var risSimple = /^.[^:#\[\.,]*$/;
-
-// Implement the identical functionality for filter and not
-function winnow( elements, qualifier, not ) {
- if ( jQuery.isFunction( qualifier ) ) {
- return jQuery.grep( elements, function( elem, i ) {
- /* jshint -W018 */
- return !!qualifier.call( elem, i, elem ) !== not;
- } );
-
- }
-
- if ( qualifier.nodeType ) {
- return jQuery.grep( elements, function( elem ) {
- return ( elem === qualifier ) !== not;
- } );
-
- }
-
- if ( typeof qualifier === "string" ) {
- if ( risSimple.test( qualifier ) ) {
- return jQuery.filter( qualifier, elements, not );
- }
-
- qualifier = jQuery.filter( qualifier, elements );
- }
-
- return jQuery.grep( elements, function( elem ) {
- return ( indexOf.call( qualifier, elem ) > -1 ) !== not;
- } );
-}
-
-jQuery.filter = function( expr, elems, not ) {
- var elem = elems[ 0 ];
-
- if ( not ) {
- expr = ":not(" + expr + ")";
- }
-
- return elems.length === 1 && elem.nodeType === 1 ?
- jQuery.find.matchesSelector( elem, expr ) ? [ elem ] : [] :
- jQuery.find.matches( expr, jQuery.grep( elems, function( elem ) {
- return elem.nodeType === 1;
- } ) );
-};
-
-jQuery.fn.extend( {
- find: function( selector ) {
- var i,
- len = this.length,
- ret = [],
- self = this;
-
- if ( typeof selector !== "string" ) {
- return this.pushStack( jQuery( selector ).filter( function() {
- for ( i = 0; i < len; i++ ) {
- if ( jQuery.contains( self[ i ], this ) ) {
- return true;
- }
- }
- } ) );
- }
-
- for ( i = 0; i < len; i++ ) {
- jQuery.find( selector, self[ i ], ret );
- }
-
- // Needed because $( selector, context ) becomes $( context ).find( selector )
- ret = this.pushStack( len > 1 ? jQuery.unique( ret ) : ret );
- ret.selector = this.selector ? this.selector + " " + selector : selector;
- return ret;
- },
- filter: function( selector ) {
- return this.pushStack( winnow( this, selector || [], false ) );
- },
- not: function( selector ) {
- return this.pushStack( winnow( this, selector || [], true ) );
- },
- is: function( selector ) {
- return !!winnow(
- this,
-
- // If this is a positional/relative selector, check membership in the returned set
- // so $("p:first").is("p:last") won't return true for a doc with two "p".
- typeof selector === "string" && rneedsContext.test( selector ) ?
- jQuery( selector ) :
- selector || [],
- false
- ).length;
- }
-} );
-
-
-// Initialize a jQuery object
-
-
-// A central reference to the root jQuery(document)
-var rootjQuery,
-
- // A simple way to check for HTML strings
- // Prioritize #id over to avoid XSS via location.hash (#9521)
- // Strict HTML recognition (#11290: must start with <)
- rquickExpr = /^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,
-
- init = jQuery.fn.init = function( selector, context, root ) {
- var match, elem;
-
- // HANDLE: $(""), $(null), $(undefined), $(false)
- if ( !selector ) {
- return this;
- }
-
- // Method init() accepts an alternate rootjQuery
- // so migrate can support jQuery.sub (gh-2101)
- root = root || rootjQuery;
-
- // Handle HTML strings
- if ( typeof selector === "string" ) {
- if ( selector[ 0 ] === "<" &&
- selector[ selector.length - 1 ] === ">" &&
- selector.length >= 3 ) {
-
- // Assume that strings that start and end with <> are HTML and skip the regex check
- match = [ null, selector, null ];
-
- } else {
- match = rquickExpr.exec( selector );
- }
-
- // Match html or make sure no context is specified for #id
- if ( match && ( match[ 1 ] || !context ) ) {
-
- // HANDLE: $(html) -> $(array)
- if ( match[ 1 ] ) {
- context = context instanceof jQuery ? context[ 0 ] : context;
-
- // Option to run scripts is true for back-compat
- // Intentionally let the error be thrown if parseHTML is not present
- jQuery.merge( this, jQuery.parseHTML(
- match[ 1 ],
- context && context.nodeType ? context.ownerDocument || context : document,
- true
- ) );
-
- // HANDLE: $(html, props)
- if ( rsingleTag.test( match[ 1 ] ) && jQuery.isPlainObject( context ) ) {
- for ( match in context ) {
-
- // Properties of context are called as methods if possible
- if ( jQuery.isFunction( this[ match ] ) ) {
- this[ match ]( context[ match ] );
-
- // ...and otherwise set as attributes
- } else {
- this.attr( match, context[ match ] );
- }
- }
- }
-
- return this;
-
- // HANDLE: $(#id)
- } else {
- elem = document.getElementById( match[ 2 ] );
-
- // Support: Blackberry 4.6
- // gEBID returns nodes no longer in the document (#6963)
- if ( elem && elem.parentNode ) {
-
- // Inject the element directly into the jQuery object
- this.length = 1;
- this[ 0 ] = elem;
- }
-
- this.context = document;
- this.selector = selector;
- return this;
- }
-
- // HANDLE: $(expr, $(...))
- } else if ( !context || context.jquery ) {
- return ( context || root ).find( selector );
-
- // HANDLE: $(expr, context)
- // (which is just equivalent to: $(context).find(expr)
- } else {
- return this.constructor( context ).find( selector );
- }
-
- // HANDLE: $(DOMElement)
- } else if ( selector.nodeType ) {
- this.context = this[ 0 ] = selector;
- this.length = 1;
- return this;
-
- // HANDLE: $(function)
- // Shortcut for document ready
- } else if ( jQuery.isFunction( selector ) ) {
- return root.ready !== undefined ?
- root.ready( selector ) :
-
- // Execute immediately if ready is not present
- selector( jQuery );
- }
-
- if ( selector.selector !== undefined ) {
- this.selector = selector.selector;
- this.context = selector.context;
- }
-
- return jQuery.makeArray( selector, this );
- };
-
-// Give the init function the jQuery prototype for later instantiation
-init.prototype = jQuery.fn;
-
-// Initialize central reference
-rootjQuery = jQuery( document );
-
-
-var rparentsprev = /^(?:parents|prev(?:Until|All))/,
-
- // Methods guaranteed to produce a unique set when starting from a unique set
- guaranteedUnique = {
- children: true,
- contents: true,
- next: true,
- prev: true
- };
-
-jQuery.fn.extend( {
- has: function( target ) {
- var targets = jQuery( target, this ),
- l = targets.length;
-
- return this.filter( function() {
- var i = 0;
- for ( ; i < l; i++ ) {
- if ( jQuery.contains( this, targets[ i ] ) ) {
- return true;
- }
- }
- } );
- },
-
- closest: function( selectors, context ) {
- var cur,
- i = 0,
- l = this.length,
- matched = [],
- pos = rneedsContext.test( selectors ) || typeof selectors !== "string" ?
- jQuery( selectors, context || this.context ) :
- 0;
-
- for ( ; i < l; i++ ) {
- for ( cur = this[ i ]; cur && cur !== context; cur = cur.parentNode ) {
-
- // Always skip document fragments
- if ( cur.nodeType < 11 && ( pos ?
- pos.index( cur ) > -1 :
-
- // Don't pass non-elements to Sizzle
- cur.nodeType === 1 &&
- jQuery.find.matchesSelector( cur, selectors ) ) ) {
-
- matched.push( cur );
- break;
- }
- }
- }
-
- return this.pushStack( matched.length > 1 ? jQuery.uniqueSort( matched ) : matched );
- },
-
- // Determine the position of an element within the set
- index: function( elem ) {
-
- // No argument, return index in parent
- if ( !elem ) {
- return ( this[ 0 ] && this[ 0 ].parentNode ) ? this.first().prevAll().length : -1;
- }
-
- // Index in selector
- if ( typeof elem === "string" ) {
- return indexOf.call( jQuery( elem ), this[ 0 ] );
- }
-
- // Locate the position of the desired element
- return indexOf.call( this,
-
- // If it receives a jQuery object, the first element is used
- elem.jquery ? elem[ 0 ] : elem
- );
- },
-
- add: function( selector, context ) {
- return this.pushStack(
- jQuery.uniqueSort(
- jQuery.merge( this.get(), jQuery( selector, context ) )
- )
- );
- },
-
- addBack: function( selector ) {
- return this.add( selector == null ?
- this.prevObject : this.prevObject.filter( selector )
- );
- }
-} );
-
-function sibling( cur, dir ) {
- while ( ( cur = cur[ dir ] ) && cur.nodeType !== 1 ) {}
- return cur;
-}
-
-jQuery.each( {
- parent: function( elem ) {
- var parent = elem.parentNode;
- return parent && parent.nodeType !== 11 ? parent : null;
- },
- parents: function( elem ) {
- return dir( elem, "parentNode" );
- },
- parentsUntil: function( elem, i, until ) {
- return dir( elem, "parentNode", until );
- },
- next: function( elem ) {
- return sibling( elem, "nextSibling" );
- },
- prev: function( elem ) {
- return sibling( elem, "previousSibling" );
- },
- nextAll: function( elem ) {
- return dir( elem, "nextSibling" );
- },
- prevAll: function( elem ) {
- return dir( elem, "previousSibling" );
- },
- nextUntil: function( elem, i, until ) {
- return dir( elem, "nextSibling", until );
- },
- prevUntil: function( elem, i, until ) {
- return dir( elem, "previousSibling", until );
- },
- siblings: function( elem ) {
- return siblings( ( elem.parentNode || {} ).firstChild, elem );
- },
- children: function( elem ) {
- return siblings( elem.firstChild );
- },
- contents: function( elem ) {
- return elem.contentDocument || jQuery.merge( [], elem.childNodes );
- }
-}, function( name, fn ) {
- jQuery.fn[ name ] = function( until, selector ) {
- var matched = jQuery.map( this, fn, until );
-
- if ( name.slice( -5 ) !== "Until" ) {
- selector = until;
- }
-
- if ( selector && typeof selector === "string" ) {
- matched = jQuery.filter( selector, matched );
- }
-
- if ( this.length > 1 ) {
-
- // Remove duplicates
- if ( !guaranteedUnique[ name ] ) {
- jQuery.uniqueSort( matched );
- }
-
- // Reverse order for parents* and prev-derivatives
- if ( rparentsprev.test( name ) ) {
- matched.reverse();
- }
- }
-
- return this.pushStack( matched );
- };
-} );
-var rnotwhite = ( /\S+/g );
-
-
-
-// Convert String-formatted options into Object-formatted ones
-function createOptions( options ) {
- var object = {};
- jQuery.each( options.match( rnotwhite ) || [], function( _, flag ) {
- object[ flag ] = true;
- } );
- return object;
-}
-
-/*
- * Create a callback list using the following parameters:
- *
- * options: an optional list of space-separated options that will change how
- * the callback list behaves or a more traditional option object
- *
- * By default a callback list will act like an event callback list and can be
- * "fired" multiple times.
- *
- * Possible options:
- *
- * once: will ensure the callback list can only be fired once (like a Deferred)
- *
- * memory: will keep track of previous values and will call any callback added
- * after the list has been fired right away with the latest "memorized"
- * values (like a Deferred)
- *
- * unique: will ensure a callback can only be added once (no duplicate in the list)
- *
- * stopOnFalse: interrupt callings when a callback returns false
- *
- */
-jQuery.Callbacks = function( options ) {
-
- // Convert options from String-formatted to Object-formatted if needed
- // (we check in cache first)
- options = typeof options === "string" ?
- createOptions( options ) :
- jQuery.extend( {}, options );
-
- var // Flag to know if list is currently firing
- firing,
-
- // Last fire value for non-forgettable lists
- memory,
-
- // Flag to know if list was already fired
- fired,
-
- // Flag to prevent firing
- locked,
-
- // Actual callback list
- list = [],
-
- // Queue of execution data for repeatable lists
- queue = [],
-
- // Index of currently firing callback (modified by add/remove as needed)
- firingIndex = -1,
-
- // Fire callbacks
- fire = function() {
-
- // Enforce single-firing
- locked = options.once;
-
- // Execute callbacks for all pending executions,
- // respecting firingIndex overrides and runtime changes
- fired = firing = true;
- for ( ; queue.length; firingIndex = -1 ) {
- memory = queue.shift();
- while ( ++firingIndex < list.length ) {
-
- // Run callback and check for early termination
- if ( list[ firingIndex ].apply( memory[ 0 ], memory[ 1 ] ) === false &&
- options.stopOnFalse ) {
-
- // Jump to end and forget the data so .add doesn't re-fire
- firingIndex = list.length;
- memory = false;
- }
- }
- }
-
- // Forget the data if we're done with it
- if ( !options.memory ) {
- memory = false;
- }
-
- firing = false;
-
- // Clean up if we're done firing for good
- if ( locked ) {
-
- // Keep an empty list if we have data for future add calls
- if ( memory ) {
- list = [];
-
- // Otherwise, this object is spent
- } else {
- list = "";
- }
- }
- },
-
- // Actual Callbacks object
- self = {
-
- // Add a callback or a collection of callbacks to the list
- add: function() {
- if ( list ) {
-
- // If we have memory from a past run, we should fire after adding
- if ( memory && !firing ) {
- firingIndex = list.length - 1;
- queue.push( memory );
- }
-
- ( function add( args ) {
- jQuery.each( args, function( _, arg ) {
- if ( jQuery.isFunction( arg ) ) {
- if ( !options.unique || !self.has( arg ) ) {
- list.push( arg );
- }
- } else if ( arg && arg.length && jQuery.type( arg ) !== "string" ) {
-
- // Inspect recursively
- add( arg );
- }
- } );
- } )( arguments );
-
- if ( memory && !firing ) {
- fire();
- }
- }
- return this;
- },
-
- // Remove a callback from the list
- remove: function() {
- jQuery.each( arguments, function( _, arg ) {
- var index;
- while ( ( index = jQuery.inArray( arg, list, index ) ) > -1 ) {
- list.splice( index, 1 );
-
- // Handle firing indexes
- if ( index <= firingIndex ) {
- firingIndex--;
- }
- }
- } );
- return this;
- },
-
- // Check if a given callback is in the list.
- // If no argument is given, return whether or not list has callbacks attached.
- has: function( fn ) {
- return fn ?
- jQuery.inArray( fn, list ) > -1 :
- list.length > 0;
- },
-
- // Remove all callbacks from the list
- empty: function() {
- if ( list ) {
- list = [];
- }
- return this;
- },
-
- // Disable .fire and .add
- // Abort any current/pending executions
- // Clear all callbacks and values
- disable: function() {
- locked = queue = [];
- list = memory = "";
- return this;
- },
- disabled: function() {
- return !list;
- },
-
- // Disable .fire
- // Also disable .add unless we have memory (since it would have no effect)
- // Abort any pending executions
- lock: function() {
- locked = queue = [];
- if ( !memory ) {
- list = memory = "";
- }
- return this;
- },
- locked: function() {
- return !!locked;
- },
-
- // Call all callbacks with the given context and arguments
- fireWith: function( context, args ) {
- if ( !locked ) {
- args = args || [];
- args = [ context, args.slice ? args.slice() : args ];
- queue.push( args );
- if ( !firing ) {
- fire();
- }
- }
- return this;
- },
-
- // Call all the callbacks with the given arguments
- fire: function() {
- self.fireWith( this, arguments );
- return this;
- },
-
- // To know if the callbacks have already been called at least once
- fired: function() {
- return !!fired;
- }
- };
-
- return self;
-};
-
-
-jQuery.extend( {
-
- Deferred: function( func ) {
- var tuples = [
-
- // action, add listener, listener list, final state
- [ "resolve", "done", jQuery.Callbacks( "once memory" ), "resolved" ],
- [ "reject", "fail", jQuery.Callbacks( "once memory" ), "rejected" ],
- [ "notify", "progress", jQuery.Callbacks( "memory" ) ]
- ],
- state = "pending",
- promise = {
- state: function() {
- return state;
- },
- always: function() {
- deferred.done( arguments ).fail( arguments );
- return this;
- },
- then: function( /* fnDone, fnFail, fnProgress */ ) {
- var fns = arguments;
- return jQuery.Deferred( function( newDefer ) {
- jQuery.each( tuples, function( i, tuple ) {
- var fn = jQuery.isFunction( fns[ i ] ) && fns[ i ];
-
- // deferred[ done | fail | progress ] for forwarding actions to newDefer
- deferred[ tuple[ 1 ] ]( function() {
- var returned = fn && fn.apply( this, arguments );
- if ( returned && jQuery.isFunction( returned.promise ) ) {
- returned.promise()
- .progress( newDefer.notify )
- .done( newDefer.resolve )
- .fail( newDefer.reject );
- } else {
- newDefer[ tuple[ 0 ] + "With" ](
- this === promise ? newDefer.promise() : this,
- fn ? [ returned ] : arguments
- );
- }
- } );
- } );
- fns = null;
- } ).promise();
- },
-
- // Get a promise for this deferred
- // If obj is provided, the promise aspect is added to the object
- promise: function( obj ) {
- return obj != null ? jQuery.extend( obj, promise ) : promise;
- }
- },
- deferred = {};
-
- // Keep pipe for back-compat
- promise.pipe = promise.then;
-
- // Add list-specific methods
- jQuery.each( tuples, function( i, tuple ) {
- var list = tuple[ 2 ],
- stateString = tuple[ 3 ];
-
- // promise[ done | fail | progress ] = list.add
- promise[ tuple[ 1 ] ] = list.add;
-
- // Handle state
- if ( stateString ) {
- list.add( function() {
-
- // state = [ resolved | rejected ]
- state = stateString;
-
- // [ reject_list | resolve_list ].disable; progress_list.lock
- }, tuples[ i ^ 1 ][ 2 ].disable, tuples[ 2 ][ 2 ].lock );
- }
-
- // deferred[ resolve | reject | notify ]
- deferred[ tuple[ 0 ] ] = function() {
- deferred[ tuple[ 0 ] + "With" ]( this === deferred ? promise : this, arguments );
- return this;
- };
- deferred[ tuple[ 0 ] + "With" ] = list.fireWith;
- } );
-
- // Make the deferred a promise
- promise.promise( deferred );
-
- // Call given func if any
- if ( func ) {
- func.call( deferred, deferred );
- }
-
- // All done!
- return deferred;
- },
-
- // Deferred helper
- when: function( subordinate /* , ..., subordinateN */ ) {
- var i = 0,
- resolveValues = slice.call( arguments ),
- length = resolveValues.length,
-
- // the count of uncompleted subordinates
- remaining = length !== 1 ||
- ( subordinate && jQuery.isFunction( subordinate.promise ) ) ? length : 0,
-
- // the master Deferred.
- // If resolveValues consist of only a single Deferred, just use that.
- deferred = remaining === 1 ? subordinate : jQuery.Deferred(),
-
- // Update function for both resolve and progress values
- updateFunc = function( i, contexts, values ) {
- return function( value ) {
- contexts[ i ] = this;
- values[ i ] = arguments.length > 1 ? slice.call( arguments ) : value;
- if ( values === progressValues ) {
- deferred.notifyWith( contexts, values );
- } else if ( !( --remaining ) ) {
- deferred.resolveWith( contexts, values );
- }
- };
- },
-
- progressValues, progressContexts, resolveContexts;
-
- // Add listeners to Deferred subordinates; treat others as resolved
- if ( length > 1 ) {
- progressValues = new Array( length );
- progressContexts = new Array( length );
- resolveContexts = new Array( length );
- for ( ; i < length; i++ ) {
- if ( resolveValues[ i ] && jQuery.isFunction( resolveValues[ i ].promise ) ) {
- resolveValues[ i ].promise()
- .progress( updateFunc( i, progressContexts, progressValues ) )
- .done( updateFunc( i, resolveContexts, resolveValues ) )
- .fail( deferred.reject );
- } else {
- --remaining;
- }
- }
- }
-
- // If we're not waiting on anything, resolve the master
- if ( !remaining ) {
- deferred.resolveWith( resolveContexts, resolveValues );
- }
-
- return deferred.promise();
- }
-} );
-
-
-// The deferred used on DOM ready
-var readyList;
-
-jQuery.fn.ready = function( fn ) {
-
- // Add the callback
- jQuery.ready.promise().done( fn );
-
- return this;
-};
-
-jQuery.extend( {
-
- // Is the DOM ready to be used? Set to true once it occurs.
- isReady: false,
-
- // A counter to track how many items to wait for before
- // the ready event fires. See #6781
- readyWait: 1,
-
- // Hold (or release) the ready event
- holdReady: function( hold ) {
- if ( hold ) {
- jQuery.readyWait++;
- } else {
- jQuery.ready( true );
- }
- },
-
- // Handle when the DOM is ready
- ready: function( wait ) {
-
- // Abort if there are pending holds or we're already ready
- if ( wait === true ? --jQuery.readyWait : jQuery.isReady ) {
- return;
- }
-
- // Remember that the DOM is ready
- jQuery.isReady = true;
-
- // If a normal DOM Ready event fired, decrement, and wait if need be
- if ( wait !== true && --jQuery.readyWait > 0 ) {
- return;
- }
-
- // If there are functions bound, to execute
- readyList.resolveWith( document, [ jQuery ] );
-
- // Trigger any bound ready events
- if ( jQuery.fn.triggerHandler ) {
- jQuery( document ).triggerHandler( "ready" );
- jQuery( document ).off( "ready" );
- }
- }
-} );
-
-/**
- * The ready event handler and self cleanup method
- */
-function completed() {
- document.removeEventListener( "DOMContentLoaded", completed );
- window.removeEventListener( "load", completed );
- jQuery.ready();
-}
-
-jQuery.ready.promise = function( obj ) {
- if ( !readyList ) {
-
- readyList = jQuery.Deferred();
-
- // Catch cases where $(document).ready() is called
- // after the browser event has already occurred.
- // Support: IE9-10 only
- // Older IE sometimes signals "interactive" too soon
- if ( document.readyState === "complete" ||
- ( document.readyState !== "loading" && !document.documentElement.doScroll ) ) {
-
- // Handle it asynchronously to allow scripts the opportunity to delay ready
- window.setTimeout( jQuery.ready );
-
- } else {
-
- // Use the handy event callback
- document.addEventListener( "DOMContentLoaded", completed );
-
- // A fallback to window.onload, that will always work
- window.addEventListener( "load", completed );
- }
- }
- return readyList.promise( obj );
-};
-
-// Kick off the DOM ready check even if the user does not
-jQuery.ready.promise();
-
-
-
-
-// Multifunctional method to get and set values of a collection
-// The value/s can optionally be executed if it's a function
-var access = function( elems, fn, key, value, chainable, emptyGet, raw ) {
- var i = 0,
- len = elems.length,
- bulk = key == null;
-
- // Sets many values
- if ( jQuery.type( key ) === "object" ) {
- chainable = true;
- for ( i in key ) {
- access( elems, fn, i, key[ i ], true, emptyGet, raw );
- }
-
- // Sets one value
- } else if ( value !== undefined ) {
- chainable = true;
-
- if ( !jQuery.isFunction( value ) ) {
- raw = true;
- }
-
- if ( bulk ) {
-
- // Bulk operations run against the entire set
- if ( raw ) {
- fn.call( elems, value );
- fn = null;
-
- // ...except when executing function values
- } else {
- bulk = fn;
- fn = function( elem, key, value ) {
- return bulk.call( jQuery( elem ), value );
- };
- }
- }
-
- if ( fn ) {
- for ( ; i < len; i++ ) {
- fn(
- elems[ i ], key, raw ?
- value :
- value.call( elems[ i ], i, fn( elems[ i ], key ) )
- );
- }
- }
- }
-
- return chainable ?
- elems :
-
- // Gets
- bulk ?
- fn.call( elems ) :
- len ? fn( elems[ 0 ], key ) : emptyGet;
-};
-var acceptData = function( owner ) {
-
- // Accepts only:
- // - Node
- // - Node.ELEMENT_NODE
- // - Node.DOCUMENT_NODE
- // - Object
- // - Any
- /* jshint -W018 */
- return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType );
-};
-
-
-
-
-function Data() {
- this.expando = jQuery.expando + Data.uid++;
-}
-
-Data.uid = 1;
-
-Data.prototype = {
-
- register: function( owner, initial ) {
- var value = initial || {};
-
- // If it is a node unlikely to be stringify-ed or looped over
- // use plain assignment
- if ( owner.nodeType ) {
- owner[ this.expando ] = value;
-
- // Otherwise secure it in a non-enumerable, non-writable property
- // configurability must be true to allow the property to be
- // deleted with the delete operator
- } else {
- Object.defineProperty( owner, this.expando, {
- value: value,
- writable: true,
- configurable: true
- } );
- }
- return owner[ this.expando ];
- },
- cache: function( owner ) {
-
- // We can accept data for non-element nodes in modern browsers,
- // but we should not, see #8335.
- // Always return an empty object.
- if ( !acceptData( owner ) ) {
- return {};
- }
-
- // Check if the owner object already has a cache
- var value = owner[ this.expando ];
-
- // If not, create one
- if ( !value ) {
- value = {};
-
- // We can accept data for non-element nodes in modern browsers,
- // but we should not, see #8335.
- // Always return an empty object.
- if ( acceptData( owner ) ) {
-
- // If it is a node unlikely to be stringify-ed or looped over
- // use plain assignment
- if ( owner.nodeType ) {
- owner[ this.expando ] = value;
-
- // Otherwise secure it in a non-enumerable property
- // configurable must be true to allow the property to be
- // deleted when data is removed
- } else {
- Object.defineProperty( owner, this.expando, {
- value: value,
- configurable: true
- } );
- }
- }
- }
-
- return value;
- },
- set: function( owner, data, value ) {
- var prop,
- cache = this.cache( owner );
-
- // Handle: [ owner, key, value ] args
- if ( typeof data === "string" ) {
- cache[ data ] = value;
-
- // Handle: [ owner, { properties } ] args
- } else {
-
- // Copy the properties one-by-one to the cache object
- for ( prop in data ) {
- cache[ prop ] = data[ prop ];
- }
- }
- return cache;
- },
- get: function( owner, key ) {
- return key === undefined ?
- this.cache( owner ) :
- owner[ this.expando ] && owner[ this.expando ][ key ];
- },
- access: function( owner, key, value ) {
- var stored;
-
- // In cases where either:
- //
- // 1. No key was specified
- // 2. A string key was specified, but no value provided
- //
- // Take the "read" path and allow the get method to determine
- // which value to return, respectively either:
- //
- // 1. The entire cache object
- // 2. The data stored at the key
- //
- if ( key === undefined ||
- ( ( key && typeof key === "string" ) && value === undefined ) ) {
-
- stored = this.get( owner, key );
-
- return stored !== undefined ?
- stored : this.get( owner, jQuery.camelCase( key ) );
- }
-
- // When the key is not a string, or both a key and value
- // are specified, set or extend (existing objects) with either:
- //
- // 1. An object of properties
- // 2. A key and value
- //
- this.set( owner, key, value );
-
- // Since the "set" path can have two possible entry points
- // return the expected data based on which path was taken[*]
- return value !== undefined ? value : key;
- },
- remove: function( owner, key ) {
- var i, name, camel,
- cache = owner[ this.expando ];
-
- if ( cache === undefined ) {
- return;
- }
-
- if ( key === undefined ) {
- this.register( owner );
-
- } else {
-
- // Support array or space separated string of keys
- if ( jQuery.isArray( key ) ) {
-
- // If "name" is an array of keys...
- // When data is initially created, via ("key", "val") signature,
- // keys will be converted to camelCase.
- // Since there is no way to tell _how_ a key was added, remove
- // both plain key and camelCase key. #12786
- // This will only penalize the array argument path.
- name = key.concat( key.map( jQuery.camelCase ) );
- } else {
- camel = jQuery.camelCase( key );
-
- // Try the string as a key before any manipulation
- if ( key in cache ) {
- name = [ key, camel ];
- } else {
-
- // If a key with the spaces exists, use it.
- // Otherwise, create an array by matching non-whitespace
- name = camel;
- name = name in cache ?
- [ name ] : ( name.match( rnotwhite ) || [] );
- }
- }
-
- i = name.length;
-
- while ( i-- ) {
- delete cache[ name[ i ] ];
- }
- }
-
- // Remove the expando if there's no more data
- if ( key === undefined || jQuery.isEmptyObject( cache ) ) {
-
- // Support: Chrome <= 35-45+
- // Webkit & Blink performance suffers when deleting properties
- // from DOM nodes, so set to undefined instead
- // https://code.google.com/p/chromium/issues/detail?id=378607
- if ( owner.nodeType ) {
- owner[ this.expando ] = undefined;
- } else {
- delete owner[ this.expando ];
- }
- }
- },
- hasData: function( owner ) {
- var cache = owner[ this.expando ];
- return cache !== undefined && !jQuery.isEmptyObject( cache );
- }
-};
-var dataPriv = new Data();
-
-var dataUser = new Data();
-
-
-
-// Implementation Summary
-//
-// 1. Enforce API surface and semantic compatibility with 1.9.x branch
-// 2. Improve the module's maintainability by reducing the storage
-// paths to a single mechanism.
-// 3. Use the same single mechanism to support "private" and "user" data.
-// 4. _Never_ expose "private" data to user code (TODO: Drop _data, _removeData)
-// 5. Avoid exposing implementation details on user objects (eg. expando properties)
-// 6. Provide a clear path for implementation upgrade to WeakMap in 2014
-
-var rbrace = /^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,
- rmultiDash = /[A-Z]/g;
-
-function dataAttr( elem, key, data ) {
- var name;
-
- // If nothing was found internally, try to fetch any
- // data from the HTML5 data-* attribute
- if ( data === undefined && elem.nodeType === 1 ) {
- name = "data-" + key.replace( rmultiDash, "-$&" ).toLowerCase();
- data = elem.getAttribute( name );
-
- if ( typeof data === "string" ) {
- try {
- data = data === "true" ? true :
- data === "false" ? false :
- data === "null" ? null :
-
- // Only convert to a number if it doesn't change the string
- +data + "" === data ? +data :
- rbrace.test( data ) ? jQuery.parseJSON( data ) :
- data;
- } catch ( e ) {}
-
- // Make sure we set the data so it isn't changed later
- dataUser.set( elem, key, data );
- } else {
- data = undefined;
- }
- }
- return data;
-}
-
-jQuery.extend( {
- hasData: function( elem ) {
- return dataUser.hasData( elem ) || dataPriv.hasData( elem );
- },
-
- data: function( elem, name, data ) {
- return dataUser.access( elem, name, data );
- },
-
- removeData: function( elem, name ) {
- dataUser.remove( elem, name );
- },
-
- // TODO: Now that all calls to _data and _removeData have been replaced
- // with direct calls to dataPriv methods, these can be deprecated.
- _data: function( elem, name, data ) {
- return dataPriv.access( elem, name, data );
- },
-
- _removeData: function( elem, name ) {
- dataPriv.remove( elem, name );
- }
-} );
-
-jQuery.fn.extend( {
- data: function( key, value ) {
- var i, name, data,
- elem = this[ 0 ],
- attrs = elem && elem.attributes;
-
- // Gets all values
- if ( key === undefined ) {
- if ( this.length ) {
- data = dataUser.get( elem );
-
- if ( elem.nodeType === 1 && !dataPriv.get( elem, "hasDataAttrs" ) ) {
- i = attrs.length;
- while ( i-- ) {
-
- // Support: IE11+
- // The attrs elements can be null (#14894)
- if ( attrs[ i ] ) {
- name = attrs[ i ].name;
- if ( name.indexOf( "data-" ) === 0 ) {
- name = jQuery.camelCase( name.slice( 5 ) );
- dataAttr( elem, name, data[ name ] );
- }
- }
- }
- dataPriv.set( elem, "hasDataAttrs", true );
- }
- }
-
- return data;
- }
-
- // Sets multiple values
- if ( typeof key === "object" ) {
- return this.each( function() {
- dataUser.set( this, key );
- } );
- }
-
- return access( this, function( value ) {
- var data, camelKey;
-
- // The calling jQuery object (element matches) is not empty
- // (and therefore has an element appears at this[ 0 ]) and the
- // `value` parameter was not undefined. An empty jQuery object
- // will result in `undefined` for elem = this[ 0 ] which will
- // throw an exception if an attempt to read a data cache is made.
- if ( elem && value === undefined ) {
-
- // Attempt to get data from the cache
- // with the key as-is
- data = dataUser.get( elem, key ) ||
-
- // Try to find dashed key if it exists (gh-2779)
- // This is for 2.2.x only
- dataUser.get( elem, key.replace( rmultiDash, "-$&" ).toLowerCase() );
-
- if ( data !== undefined ) {
- return data;
- }
-
- camelKey = jQuery.camelCase( key );
-
- // Attempt to get data from the cache
- // with the key camelized
- data = dataUser.get( elem, camelKey );
- if ( data !== undefined ) {
- return data;
- }
-
- // Attempt to "discover" the data in
- // HTML5 custom data-* attrs
- data = dataAttr( elem, camelKey, undefined );
- if ( data !== undefined ) {
- return data;
- }
-
- // We tried really hard, but the data doesn't exist.
- return;
- }
-
- // Set the data...
- camelKey = jQuery.camelCase( key );
- this.each( function() {
-
- // First, attempt to store a copy or reference of any
- // data that might've been store with a camelCased key.
- var data = dataUser.get( this, camelKey );
-
- // For HTML5 data-* attribute interop, we have to
- // store property names with dashes in a camelCase form.
- // This might not apply to all properties...*
- dataUser.set( this, camelKey, value );
-
- // *... In the case of properties that might _actually_
- // have dashes, we need to also store a copy of that
- // unchanged property.
- if ( key.indexOf( "-" ) > -1 && data !== undefined ) {
- dataUser.set( this, key, value );
- }
- } );
- }, null, value, arguments.length > 1, null, true );
- },
-
- removeData: function( key ) {
- return this.each( function() {
- dataUser.remove( this, key );
- } );
- }
-} );
-
-
-jQuery.extend( {
- queue: function( elem, type, data ) {
- var queue;
-
- if ( elem ) {
- type = ( type || "fx" ) + "queue";
- queue = dataPriv.get( elem, type );
-
- // Speed up dequeue by getting out quickly if this is just a lookup
- if ( data ) {
- if ( !queue || jQuery.isArray( data ) ) {
- queue = dataPriv.access( elem, type, jQuery.makeArray( data ) );
- } else {
- queue.push( data );
- }
- }
- return queue || [];
- }
- },
-
- dequeue: function( elem, type ) {
- type = type || "fx";
-
- var queue = jQuery.queue( elem, type ),
- startLength = queue.length,
- fn = queue.shift(),
- hooks = jQuery._queueHooks( elem, type ),
- next = function() {
- jQuery.dequeue( elem, type );
- };
-
- // If the fx queue is dequeued, always remove the progress sentinel
- if ( fn === "inprogress" ) {
- fn = queue.shift();
- startLength--;
- }
-
- if ( fn ) {
-
- // Add a progress sentinel to prevent the fx queue from being
- // automatically dequeued
- if ( type === "fx" ) {
- queue.unshift( "inprogress" );
- }
-
- // Clear up the last queue stop function
- delete hooks.stop;
- fn.call( elem, next, hooks );
- }
-
- if ( !startLength && hooks ) {
- hooks.empty.fire();
- }
- },
-
- // Not public - generate a queueHooks object, or return the current one
- _queueHooks: function( elem, type ) {
- var key = type + "queueHooks";
- return dataPriv.get( elem, key ) || dataPriv.access( elem, key, {
- empty: jQuery.Callbacks( "once memory" ).add( function() {
- dataPriv.remove( elem, [ type + "queue", key ] );
- } )
- } );
- }
-} );
-
-jQuery.fn.extend( {
- queue: function( type, data ) {
- var setter = 2;
-
- if ( typeof type !== "string" ) {
- data = type;
- type = "fx";
- setter--;
- }
-
- if ( arguments.length < setter ) {
- return jQuery.queue( this[ 0 ], type );
- }
-
- return data === undefined ?
- this :
- this.each( function() {
- var queue = jQuery.queue( this, type, data );
-
- // Ensure a hooks for this queue
- jQuery._queueHooks( this, type );
-
- if ( type === "fx" && queue[ 0 ] !== "inprogress" ) {
- jQuery.dequeue( this, type );
- }
- } );
- },
- dequeue: function( type ) {
- return this.each( function() {
- jQuery.dequeue( this, type );
- } );
- },
- clearQueue: function( type ) {
- return this.queue( type || "fx", [] );
- },
-
- // Get a promise resolved when queues of a certain type
- // are emptied (fx is the type by default)
- promise: function( type, obj ) {
- var tmp,
- count = 1,
- defer = jQuery.Deferred(),
- elements = this,
- i = this.length,
- resolve = function() {
- if ( !( --count ) ) {
- defer.resolveWith( elements, [ elements ] );
- }
- };
-
- if ( typeof type !== "string" ) {
- obj = type;
- type = undefined;
- }
- type = type || "fx";
-
- while ( i-- ) {
- tmp = dataPriv.get( elements[ i ], type + "queueHooks" );
- if ( tmp && tmp.empty ) {
- count++;
- tmp.empty.add( resolve );
- }
- }
- resolve();
- return defer.promise( obj );
- }
-} );
-var pnum = ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source;
-
-var rcssNum = new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" );
-
-
-var cssExpand = [ "Top", "Right", "Bottom", "Left" ];
-
-var isHidden = function( elem, el ) {
-
- // isHidden might be called from jQuery#filter function;
- // in that case, element will be second argument
- elem = el || elem;
- return jQuery.css( elem, "display" ) === "none" ||
- !jQuery.contains( elem.ownerDocument, elem );
- };
-
-
-
-function adjustCSS( elem, prop, valueParts, tween ) {
- var adjusted,
- scale = 1,
- maxIterations = 20,
- currentValue = tween ?
- function() { return tween.cur(); } :
- function() { return jQuery.css( elem, prop, "" ); },
- initial = currentValue(),
- unit = valueParts && valueParts[ 3 ] || ( jQuery.cssNumber[ prop ] ? "" : "px" ),
-
- // Starting value computation is required for potential unit mismatches
- initialInUnit = ( jQuery.cssNumber[ prop ] || unit !== "px" && +initial ) &&
- rcssNum.exec( jQuery.css( elem, prop ) );
-
- if ( initialInUnit && initialInUnit[ 3 ] !== unit ) {
-
- // Trust units reported by jQuery.css
- unit = unit || initialInUnit[ 3 ];
-
- // Make sure we update the tween properties later on
- valueParts = valueParts || [];
-
- // Iteratively approximate from a nonzero starting point
- initialInUnit = +initial || 1;
-
- do {
-
- // If previous iteration zeroed out, double until we get *something*.
- // Use string for doubling so we don't accidentally see scale as unchanged below
- scale = scale || ".5";
-
- // Adjust and apply
- initialInUnit = initialInUnit / scale;
- jQuery.style( elem, prop, initialInUnit + unit );
-
- // Update scale, tolerating zero or NaN from tween.cur()
- // Break the loop if scale is unchanged or perfect, or if we've just had enough.
- } while (
- scale !== ( scale = currentValue() / initial ) && scale !== 1 && --maxIterations
- );
- }
-
- if ( valueParts ) {
- initialInUnit = +initialInUnit || +initial || 0;
-
- // Apply relative offset (+=/-=) if specified
- adjusted = valueParts[ 1 ] ?
- initialInUnit + ( valueParts[ 1 ] + 1 ) * valueParts[ 2 ] :
- +valueParts[ 2 ];
- if ( tween ) {
- tween.unit = unit;
- tween.start = initialInUnit;
- tween.end = adjusted;
- }
- }
- return adjusted;
-}
-var rcheckableType = ( /^(?:checkbox|radio)$/i );
-
-var rtagName = ( /<([\w:-]+)/ );
-
-var rscriptType = ( /^$|\/(?:java|ecma)script/i );
-
-
-
-// We have to close these tags to support XHTML (#13200)
-var wrapMap = {
-
- // Support: IE9
- option: [ 1, "", " " ],
-
- // XHTML parsers do not magically insert elements in the
- // same way that tag soup parsers do. So we cannot shorten
- // this by omitting or other required elements.
- thead: [ 1, "" ],
- col: [ 2, "" ],
- tr: [ 2, "" ],
- td: [ 3, "" ],
-
- _default: [ 0, "", "" ]
-};
-
-// Support: IE9
-wrapMap.optgroup = wrapMap.option;
-
-wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead;
-wrapMap.th = wrapMap.td;
-
-
-function getAll( context, tag ) {
-
- // Support: IE9-11+
- // Use typeof to avoid zero-argument method invocation on host objects (#15151)
- var ret = typeof context.getElementsByTagName !== "undefined" ?
- context.getElementsByTagName( tag || "*" ) :
- typeof context.querySelectorAll !== "undefined" ?
- context.querySelectorAll( tag || "*" ) :
- [];
-
- return tag === undefined || tag && jQuery.nodeName( context, tag ) ?
- jQuery.merge( [ context ], ret ) :
- ret;
-}
-
-
-// Mark scripts as having already been evaluated
-function setGlobalEval( elems, refElements ) {
- var i = 0,
- l = elems.length;
-
- for ( ; i < l; i++ ) {
- dataPriv.set(
- elems[ i ],
- "globalEval",
- !refElements || dataPriv.get( refElements[ i ], "globalEval" )
- );
- }
-}
-
-
-var rhtml = /<|?\w+;/;
-
-function buildFragment( elems, context, scripts, selection, ignored ) {
- var elem, tmp, tag, wrap, contains, j,
- fragment = context.createDocumentFragment(),
- nodes = [],
- i = 0,
- l = elems.length;
-
- for ( ; i < l; i++ ) {
- elem = elems[ i ];
-
- if ( elem || elem === 0 ) {
-
- // Add nodes directly
- if ( jQuery.type( elem ) === "object" ) {
-
- // Support: Android<4.1, PhantomJS<2
- // push.apply(_, arraylike) throws on ancient WebKit
- jQuery.merge( nodes, elem.nodeType ? [ elem ] : elem );
-
- // Convert non-html into a text node
- } else if ( !rhtml.test( elem ) ) {
- nodes.push( context.createTextNode( elem ) );
-
- // Convert html into DOM nodes
- } else {
- tmp = tmp || fragment.appendChild( context.createElement( "div" ) );
-
- // Deserialize a standard representation
- tag = ( rtagName.exec( elem ) || [ "", "" ] )[ 1 ].toLowerCase();
- wrap = wrapMap[ tag ] || wrapMap._default;
- tmp.innerHTML = wrap[ 1 ] + jQuery.htmlPrefilter( elem ) + wrap[ 2 ];
-
- // Descend through wrappers to the right content
- j = wrap[ 0 ];
- while ( j-- ) {
- tmp = tmp.lastChild;
- }
-
- // Support: Android<4.1, PhantomJS<2
- // push.apply(_, arraylike) throws on ancient WebKit
- jQuery.merge( nodes, tmp.childNodes );
-
- // Remember the top-level container
- tmp = fragment.firstChild;
-
- // Ensure the created nodes are orphaned (#12392)
- tmp.textContent = "";
- }
- }
- }
-
- // Remove wrapper from fragment
- fragment.textContent = "";
-
- i = 0;
- while ( ( elem = nodes[ i++ ] ) ) {
-
- // Skip elements already in the context collection (trac-4087)
- if ( selection && jQuery.inArray( elem, selection ) > -1 ) {
- if ( ignored ) {
- ignored.push( elem );
- }
- continue;
- }
-
- contains = jQuery.contains( elem.ownerDocument, elem );
-
- // Append to fragment
- tmp = getAll( fragment.appendChild( elem ), "script" );
-
- // Preserve script evaluation history
- if ( contains ) {
- setGlobalEval( tmp );
- }
-
- // Capture executables
- if ( scripts ) {
- j = 0;
- while ( ( elem = tmp[ j++ ] ) ) {
- if ( rscriptType.test( elem.type || "" ) ) {
- scripts.push( elem );
- }
- }
- }
- }
-
- return fragment;
-}
-
-
-( function() {
- var fragment = document.createDocumentFragment(),
- div = fragment.appendChild( document.createElement( "div" ) ),
- input = document.createElement( "input" );
-
- // Support: Android 4.0-4.3, Safari<=5.1
- // Check state lost if the name is set (#11217)
- // Support: Windows Web Apps (WWA)
- // `name` and `type` must use .setAttribute for WWA (#14901)
- input.setAttribute( "type", "radio" );
- input.setAttribute( "checked", "checked" );
- input.setAttribute( "name", "t" );
-
- div.appendChild( input );
-
- // Support: Safari<=5.1, Android<4.2
- // Older WebKit doesn't clone checked state correctly in fragments
- support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked;
-
- // Support: IE<=11+
- // Make sure textarea (and checkbox) defaultValue is properly cloned
- div.innerHTML = "";
- support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue;
-} )();
-
-
-var
- rkeyEvent = /^key/,
- rmouseEvent = /^(?:mouse|pointer|contextmenu|drag|drop)|click/,
- rtypenamespace = /^([^.]*)(?:\.(.+)|)/;
-
-function returnTrue() {
- return true;
-}
-
-function returnFalse() {
- return false;
-}
-
-// Support: IE9
-// See #13393 for more info
-function safeActiveElement() {
- try {
- return document.activeElement;
- } catch ( err ) { }
-}
-
-function on( elem, types, selector, data, fn, one ) {
- var origFn, type;
-
- // Types can be a map of types/handlers
- if ( typeof types === "object" ) {
-
- // ( types-Object, selector, data )
- if ( typeof selector !== "string" ) {
-
- // ( types-Object, data )
- data = data || selector;
- selector = undefined;
- }
- for ( type in types ) {
- on( elem, type, selector, data, types[ type ], one );
- }
- return elem;
- }
-
- if ( data == null && fn == null ) {
-
- // ( types, fn )
- fn = selector;
- data = selector = undefined;
- } else if ( fn == null ) {
- if ( typeof selector === "string" ) {
-
- // ( types, selector, fn )
- fn = data;
- data = undefined;
- } else {
-
- // ( types, data, fn )
- fn = data;
- data = selector;
- selector = undefined;
- }
- }
- if ( fn === false ) {
- fn = returnFalse;
- } else if ( !fn ) {
- return elem;
- }
-
- if ( one === 1 ) {
- origFn = fn;
- fn = function( event ) {
-
- // Can use an empty set, since event contains the info
- jQuery().off( event );
- return origFn.apply( this, arguments );
- };
-
- // Use same guid so caller can remove using origFn
- fn.guid = origFn.guid || ( origFn.guid = jQuery.guid++ );
- }
- return elem.each( function() {
- jQuery.event.add( this, types, fn, data, selector );
- } );
-}
-
-/*
- * Helper functions for managing events -- not part of the public interface.
- * Props to Dean Edwards' addEvent library for many of the ideas.
- */
-jQuery.event = {
-
- global: {},
-
- add: function( elem, types, handler, data, selector ) {
-
- var handleObjIn, eventHandle, tmp,
- events, t, handleObj,
- special, handlers, type, namespaces, origType,
- elemData = dataPriv.get( elem );
-
- // Don't attach events to noData or text/comment nodes (but allow plain objects)
- if ( !elemData ) {
- return;
- }
-
- // Caller can pass in an object of custom data in lieu of the handler
- if ( handler.handler ) {
- handleObjIn = handler;
- handler = handleObjIn.handler;
- selector = handleObjIn.selector;
- }
-
- // Make sure that the handler has a unique ID, used to find/remove it later
- if ( !handler.guid ) {
- handler.guid = jQuery.guid++;
- }
-
- // Init the element's event structure and main handler, if this is the first
- if ( !( events = elemData.events ) ) {
- events = elemData.events = {};
- }
- if ( !( eventHandle = elemData.handle ) ) {
- eventHandle = elemData.handle = function( e ) {
-
- // Discard the second event of a jQuery.event.trigger() and
- // when an event is called after a page has unloaded
- return typeof jQuery !== "undefined" && jQuery.event.triggered !== e.type ?
- jQuery.event.dispatch.apply( elem, arguments ) : undefined;
- };
- }
-
- // Handle multiple events separated by a space
- types = ( types || "" ).match( rnotwhite ) || [ "" ];
- t = types.length;
- while ( t-- ) {
- tmp = rtypenamespace.exec( types[ t ] ) || [];
- type = origType = tmp[ 1 ];
- namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
-
- // There *must* be a type, no attaching namespace-only handlers
- if ( !type ) {
- continue;
- }
-
- // If event changes its type, use the special event handlers for the changed type
- special = jQuery.event.special[ type ] || {};
-
- // If selector defined, determine special event api type, otherwise given type
- type = ( selector ? special.delegateType : special.bindType ) || type;
-
- // Update special based on newly reset type
- special = jQuery.event.special[ type ] || {};
-
- // handleObj is passed to all event handlers
- handleObj = jQuery.extend( {
- type: type,
- origType: origType,
- data: data,
- handler: handler,
- guid: handler.guid,
- selector: selector,
- needsContext: selector && jQuery.expr.match.needsContext.test( selector ),
- namespace: namespaces.join( "." )
- }, handleObjIn );
-
- // Init the event handler queue if we're the first
- if ( !( handlers = events[ type ] ) ) {
- handlers = events[ type ] = [];
- handlers.delegateCount = 0;
-
- // Only use addEventListener if the special events handler returns false
- if ( !special.setup ||
- special.setup.call( elem, data, namespaces, eventHandle ) === false ) {
-
- if ( elem.addEventListener ) {
- elem.addEventListener( type, eventHandle );
- }
- }
- }
-
- if ( special.add ) {
- special.add.call( elem, handleObj );
-
- if ( !handleObj.handler.guid ) {
- handleObj.handler.guid = handler.guid;
- }
- }
-
- // Add to the element's handler list, delegates in front
- if ( selector ) {
- handlers.splice( handlers.delegateCount++, 0, handleObj );
- } else {
- handlers.push( handleObj );
- }
-
- // Keep track of which events have ever been used, for event optimization
- jQuery.event.global[ type ] = true;
- }
-
- },
-
- // Detach an event or set of events from an element
- remove: function( elem, types, handler, selector, mappedTypes ) {
-
- var j, origCount, tmp,
- events, t, handleObj,
- special, handlers, type, namespaces, origType,
- elemData = dataPriv.hasData( elem ) && dataPriv.get( elem );
-
- if ( !elemData || !( events = elemData.events ) ) {
- return;
- }
-
- // Once for each type.namespace in types; type may be omitted
- types = ( types || "" ).match( rnotwhite ) || [ "" ];
- t = types.length;
- while ( t-- ) {
- tmp = rtypenamespace.exec( types[ t ] ) || [];
- type = origType = tmp[ 1 ];
- namespaces = ( tmp[ 2 ] || "" ).split( "." ).sort();
-
- // Unbind all events (on this namespace, if provided) for the element
- if ( !type ) {
- for ( type in events ) {
- jQuery.event.remove( elem, type + types[ t ], handler, selector, true );
- }
- continue;
- }
-
- special = jQuery.event.special[ type ] || {};
- type = ( selector ? special.delegateType : special.bindType ) || type;
- handlers = events[ type ] || [];
- tmp = tmp[ 2 ] &&
- new RegExp( "(^|\\.)" + namespaces.join( "\\.(?:.*\\.|)" ) + "(\\.|$)" );
-
- // Remove matching events
- origCount = j = handlers.length;
- while ( j-- ) {
- handleObj = handlers[ j ];
-
- if ( ( mappedTypes || origType === handleObj.origType ) &&
- ( !handler || handler.guid === handleObj.guid ) &&
- ( !tmp || tmp.test( handleObj.namespace ) ) &&
- ( !selector || selector === handleObj.selector ||
- selector === "**" && handleObj.selector ) ) {
- handlers.splice( j, 1 );
-
- if ( handleObj.selector ) {
- handlers.delegateCount--;
- }
- if ( special.remove ) {
- special.remove.call( elem, handleObj );
- }
- }
- }
-
- // Remove generic event handler if we removed something and no more handlers exist
- // (avoids potential for endless recursion during removal of special event handlers)
- if ( origCount && !handlers.length ) {
- if ( !special.teardown ||
- special.teardown.call( elem, namespaces, elemData.handle ) === false ) {
-
- jQuery.removeEvent( elem, type, elemData.handle );
- }
-
- delete events[ type ];
- }
- }
-
- // Remove data and the expando if it's no longer used
- if ( jQuery.isEmptyObject( events ) ) {
- dataPriv.remove( elem, "handle events" );
- }
- },
-
- dispatch: function( event ) {
-
- // Make a writable jQuery.Event from the native event object
- event = jQuery.event.fix( event );
-
- var i, j, ret, matched, handleObj,
- handlerQueue = [],
- args = slice.call( arguments ),
- handlers = ( dataPriv.get( this, "events" ) || {} )[ event.type ] || [],
- special = jQuery.event.special[ event.type ] || {};
-
- // Use the fix-ed jQuery.Event rather than the (read-only) native event
- args[ 0 ] = event;
- event.delegateTarget = this;
-
- // Call the preDispatch hook for the mapped type, and let it bail if desired
- if ( special.preDispatch && special.preDispatch.call( this, event ) === false ) {
- return;
- }
-
- // Determine handlers
- handlerQueue = jQuery.event.handlers.call( this, event, handlers );
-
- // Run delegates first; they may want to stop propagation beneath us
- i = 0;
- while ( ( matched = handlerQueue[ i++ ] ) && !event.isPropagationStopped() ) {
- event.currentTarget = matched.elem;
-
- j = 0;
- while ( ( handleObj = matched.handlers[ j++ ] ) &&
- !event.isImmediatePropagationStopped() ) {
-
- // Triggered event must either 1) have no namespace, or 2) have namespace(s)
- // a subset or equal to those in the bound event (both can have no namespace).
- if ( !event.rnamespace || event.rnamespace.test( handleObj.namespace ) ) {
-
- event.handleObj = handleObj;
- event.data = handleObj.data;
-
- ret = ( ( jQuery.event.special[ handleObj.origType ] || {} ).handle ||
- handleObj.handler ).apply( matched.elem, args );
-
- if ( ret !== undefined ) {
- if ( ( event.result = ret ) === false ) {
- event.preventDefault();
- event.stopPropagation();
- }
- }
- }
- }
- }
-
- // Call the postDispatch hook for the mapped type
- if ( special.postDispatch ) {
- special.postDispatch.call( this, event );
- }
-
- return event.result;
- },
-
- handlers: function( event, handlers ) {
- var i, matches, sel, handleObj,
- handlerQueue = [],
- delegateCount = handlers.delegateCount,
- cur = event.target;
-
- // Support (at least): Chrome, IE9
- // Find delegate handlers
- // Black-hole SVG instance trees (#13180)
- //
- // Support: Firefox<=42+
- // Avoid non-left-click in FF but don't block IE radio events (#3861, gh-2343)
- if ( delegateCount && cur.nodeType &&
- ( event.type !== "click" || isNaN( event.button ) || event.button < 1 ) ) {
-
- for ( ; cur !== this; cur = cur.parentNode || this ) {
-
- // Don't check non-elements (#13208)
- // Don't process clicks on disabled elements (#6911, #8165, #11382, #11764)
- if ( cur.nodeType === 1 && ( cur.disabled !== true || event.type !== "click" ) ) {
- matches = [];
- for ( i = 0; i < delegateCount; i++ ) {
- handleObj = handlers[ i ];
-
- // Don't conflict with Object.prototype properties (#13203)
- sel = handleObj.selector + " ";
-
- if ( matches[ sel ] === undefined ) {
- matches[ sel ] = handleObj.needsContext ?
- jQuery( sel, this ).index( cur ) > -1 :
- jQuery.find( sel, this, null, [ cur ] ).length;
- }
- if ( matches[ sel ] ) {
- matches.push( handleObj );
- }
- }
- if ( matches.length ) {
- handlerQueue.push( { elem: cur, handlers: matches } );
- }
- }
- }
- }
-
- // Add the remaining (directly-bound) handlers
- if ( delegateCount < handlers.length ) {
- handlerQueue.push( { elem: this, handlers: handlers.slice( delegateCount ) } );
- }
-
- return handlerQueue;
- },
-
- // Includes some event props shared by KeyEvent and MouseEvent
- props: ( "altKey bubbles cancelable ctrlKey currentTarget detail eventPhase " +
- "metaKey relatedTarget shiftKey target timeStamp view which" ).split( " " ),
-
- fixHooks: {},
-
- keyHooks: {
- props: "char charCode key keyCode".split( " " ),
- filter: function( event, original ) {
-
- // Add which for key events
- if ( event.which == null ) {
- event.which = original.charCode != null ? original.charCode : original.keyCode;
- }
-
- return event;
- }
- },
-
- mouseHooks: {
- props: ( "button buttons clientX clientY offsetX offsetY pageX pageY " +
- "screenX screenY toElement" ).split( " " ),
- filter: function( event, original ) {
- var eventDoc, doc, body,
- button = original.button;
-
- // Calculate pageX/Y if missing and clientX/Y available
- if ( event.pageX == null && original.clientX != null ) {
- eventDoc = event.target.ownerDocument || document;
- doc = eventDoc.documentElement;
- body = eventDoc.body;
-
- event.pageX = original.clientX +
- ( doc && doc.scrollLeft || body && body.scrollLeft || 0 ) -
- ( doc && doc.clientLeft || body && body.clientLeft || 0 );
- event.pageY = original.clientY +
- ( doc && doc.scrollTop || body && body.scrollTop || 0 ) -
- ( doc && doc.clientTop || body && body.clientTop || 0 );
- }
-
- // Add which for click: 1 === left; 2 === middle; 3 === right
- // Note: button is not normalized, so don't use it
- if ( !event.which && button !== undefined ) {
- event.which = ( button & 1 ? 1 : ( button & 2 ? 3 : ( button & 4 ? 2 : 0 ) ) );
- }
-
- return event;
- }
- },
-
- fix: function( event ) {
- if ( event[ jQuery.expando ] ) {
- return event;
- }
-
- // Create a writable copy of the event object and normalize some properties
- var i, prop, copy,
- type = event.type,
- originalEvent = event,
- fixHook = this.fixHooks[ type ];
-
- if ( !fixHook ) {
- this.fixHooks[ type ] = fixHook =
- rmouseEvent.test( type ) ? this.mouseHooks :
- rkeyEvent.test( type ) ? this.keyHooks :
- {};
- }
- copy = fixHook.props ? this.props.concat( fixHook.props ) : this.props;
-
- event = new jQuery.Event( originalEvent );
-
- i = copy.length;
- while ( i-- ) {
- prop = copy[ i ];
- event[ prop ] = originalEvent[ prop ];
- }
-
- // Support: Cordova 2.5 (WebKit) (#13255)
- // All events should have a target; Cordova deviceready doesn't
- if ( !event.target ) {
- event.target = document;
- }
-
- // Support: Safari 6.0+, Chrome<28
- // Target should not be a text node (#504, #13143)
- if ( event.target.nodeType === 3 ) {
- event.target = event.target.parentNode;
- }
-
- return fixHook.filter ? fixHook.filter( event, originalEvent ) : event;
- },
-
- special: {
- load: {
-
- // Prevent triggered image.load events from bubbling to window.load
- noBubble: true
- },
- focus: {
-
- // Fire native event if possible so blur/focus sequence is correct
- trigger: function() {
- if ( this !== safeActiveElement() && this.focus ) {
- this.focus();
- return false;
- }
- },
- delegateType: "focusin"
- },
- blur: {
- trigger: function() {
- if ( this === safeActiveElement() && this.blur ) {
- this.blur();
- return false;
- }
- },
- delegateType: "focusout"
- },
- click: {
-
- // For checkbox, fire native event so checked state will be right
- trigger: function() {
- if ( this.type === "checkbox" && this.click && jQuery.nodeName( this, "input" ) ) {
- this.click();
- return false;
- }
- },
-
- // For cross-browser consistency, don't fire native .click() on links
- _default: function( event ) {
- return jQuery.nodeName( event.target, "a" );
- }
- },
-
- beforeunload: {
- postDispatch: function( event ) {
-
- // Support: Firefox 20+
- // Firefox doesn't alert if the returnValue field is not set.
- if ( event.result !== undefined && event.originalEvent ) {
- event.originalEvent.returnValue = event.result;
- }
- }
- }
- }
-};
-
-jQuery.removeEvent = function( elem, type, handle ) {
-
- // This "if" is needed for plain objects
- if ( elem.removeEventListener ) {
- elem.removeEventListener( type, handle );
- }
-};
-
-jQuery.Event = function( src, props ) {
-
- // Allow instantiation without the 'new' keyword
- if ( !( this instanceof jQuery.Event ) ) {
- return new jQuery.Event( src, props );
- }
-
- // Event object
- if ( src && src.type ) {
- this.originalEvent = src;
- this.type = src.type;
-
- // Events bubbling up the document may have been marked as prevented
- // by a handler lower down the tree; reflect the correct value.
- this.isDefaultPrevented = src.defaultPrevented ||
- src.defaultPrevented === undefined &&
-
- // Support: Android<4.0
- src.returnValue === false ?
- returnTrue :
- returnFalse;
-
- // Event type
- } else {
- this.type = src;
- }
-
- // Put explicitly provided properties onto the event object
- if ( props ) {
- jQuery.extend( this, props );
- }
-
- // Create a timestamp if incoming event doesn't have one
- this.timeStamp = src && src.timeStamp || jQuery.now();
-
- // Mark it as fixed
- this[ jQuery.expando ] = true;
-};
-
-// jQuery.Event is based on DOM3 Events as specified by the ECMAScript Language Binding
-// http://www.w3.org/TR/2003/WD-DOM-Level-3-Events-20030331/ecma-script-binding.html
-jQuery.Event.prototype = {
- constructor: jQuery.Event,
- isDefaultPrevented: returnFalse,
- isPropagationStopped: returnFalse,
- isImmediatePropagationStopped: returnFalse,
-
- preventDefault: function() {
- var e = this.originalEvent;
-
- this.isDefaultPrevented = returnTrue;
-
- if ( e ) {
- e.preventDefault();
- }
- },
- stopPropagation: function() {
- var e = this.originalEvent;
-
- this.isPropagationStopped = returnTrue;
-
- if ( e ) {
- e.stopPropagation();
- }
- },
- stopImmediatePropagation: function() {
- var e = this.originalEvent;
-
- this.isImmediatePropagationStopped = returnTrue;
-
- if ( e ) {
- e.stopImmediatePropagation();
- }
-
- this.stopPropagation();
- }
-};
-
-// Create mouseenter/leave events using mouseover/out and event-time checks
-// so that event delegation works in jQuery.
-// Do the same for pointerenter/pointerleave and pointerover/pointerout
-//
-// Support: Safari 7 only
-// Safari sends mouseenter too often; see:
-// https://code.google.com/p/chromium/issues/detail?id=470258
-// for the description of the bug (it existed in older Chrome versions as well).
-jQuery.each( {
- mouseenter: "mouseover",
- mouseleave: "mouseout",
- pointerenter: "pointerover",
- pointerleave: "pointerout"
-}, function( orig, fix ) {
- jQuery.event.special[ orig ] = {
- delegateType: fix,
- bindType: fix,
-
- handle: function( event ) {
- var ret,
- target = this,
- related = event.relatedTarget,
- handleObj = event.handleObj;
-
- // For mouseenter/leave call the handler if related is outside the target.
- // NB: No relatedTarget if the mouse left/entered the browser window
- if ( !related || ( related !== target && !jQuery.contains( target, related ) ) ) {
- event.type = handleObj.origType;
- ret = handleObj.handler.apply( this, arguments );
- event.type = fix;
- }
- return ret;
- }
- };
-} );
-
-jQuery.fn.extend( {
- on: function( types, selector, data, fn ) {
- return on( this, types, selector, data, fn );
- },
- one: function( types, selector, data, fn ) {
- return on( this, types, selector, data, fn, 1 );
- },
- off: function( types, selector, fn ) {
- var handleObj, type;
- if ( types && types.preventDefault && types.handleObj ) {
-
- // ( event ) dispatched jQuery.Event
- handleObj = types.handleObj;
- jQuery( types.delegateTarget ).off(
- handleObj.namespace ?
- handleObj.origType + "." + handleObj.namespace :
- handleObj.origType,
- handleObj.selector,
- handleObj.handler
- );
- return this;
- }
- if ( typeof types === "object" ) {
-
- // ( types-object [, selector] )
- for ( type in types ) {
- this.off( type, selector, types[ type ] );
- }
- return this;
- }
- if ( selector === false || typeof selector === "function" ) {
-
- // ( types [, fn] )
- fn = selector;
- selector = undefined;
- }
- if ( fn === false ) {
- fn = returnFalse;
- }
- return this.each( function() {
- jQuery.event.remove( this, types, fn, selector );
- } );
- }
-} );
-
-
-var
- rxhtmlTag = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,
-
- // Support: IE 10-11, Edge 10240+
- // In IE/Edge using regex groups here causes severe slowdowns.
- // See https://connect.microsoft.com/IE/feedback/details/1736512/
- rnoInnerhtml = /
- ```
-
-- `tabReplace` and `useBR` that were used in different places are also unified
- into the global options object and are to be set using `configure(options)`.
- This function is documented in our [API docs][]. Also note that these
- parameters are gone from `highlightBlock` and `fixMarkup` which are now also
- rely on `configure`.
-
-- We removed public-facing (though undocumented) object `hljs.LANGUAGES` which
- was used to register languages with the library in favor of two new methods:
- `registerLanguage` and `getLanguage`. Both are documented in our [API docs][].
-
-- Result returned from `highlight` and `highlightAuto` no longer contains two
- separate attributes contributing to relevance score, `relevance` and
- `keyword_count`. They are now unified in `relevance`.
-
-Another technically compatible change that nonetheless might need attention:
-
-- The structure of the NPM package was refactored, so if you had installed it
- locally, you'll have to update your paths. The usual `require('highlight.js')`
- works as before. This is contributed by [Dmitry Smolin][].
-
-New features:
-
-- Languages now can be recognized by multiple names like "js" for JavaScript or
- "html" for, well, HTML (which earlier insisted on calling it "xml"). These
- aliases can be specified in the class attribute of the code container in your
- HTML as well as in various API calls. For now there are only a few very common
- aliases but we'll expand it in the future. All of them are listed in the
- [class reference][cr].
-
-- Language detection can now be restricted to a subset of languages relevant in
- a given context — a web page or even a single highlighting call. This is
- especially useful for node.js build that includes all the known languages.
- Another example is a StackOverflow-style site where users specify languages
- as tags rather than in the markdown-formatted code snippets. This is
- documented in the [API reference][] (see methods `highlightAuto` and
- `configure`).
-
-- Language definition syntax streamlined with [variants][] and
- [beginKeywords][].
-
-New languages and styles:
-
-- *Oxygene* by [Carlo Kok][]
-- *Mathematica* by [Daniel Kvasnička][]
-- *Autohotkey* by [Seongwon Lee][]
-- *Atelier* family of styles in 10 variants by [Bram de Haan][]
-- *Paraíso* styles by [Jan T. Sott][]
-
-Miscellaneous improvements:
-
-- Highlighting `=>` prompts in Clojure.
-- [Jeremy Hull][] fixed a lot of styles for consistency.
-- Finally, highlighting PHP and HTML [mixed in peculiar ways][php-html].
-- Objective C and C# now properly highlight titles in method definition.
-- Big overhaul of relevance counting for a number of languages. Please do report
- bugs about mis-detection of non-trivial code snippets!
-
-[API reference]: http://highlightjs.readthedocs.org/en/latest/api.html
-
-[cr]: http://highlightjs.readthedocs.org/en/latest/css-classes-reference.html
-[api docs]: http://highlightjs.readthedocs.org/en/latest/api.html
-[variants]: https://groups.google.com/d/topic/highlightjs/VoGC9-1p5vk/discussion
-[beginKeywords]: https://github.com/isagalaev/highlight.js/commit/6c7fdea002eb3949577a85b3f7930137c7c3038d
-[php-html]: https://twitter.com/highlightjs/status/408890903017689088
-
-[Carlo Kok]: https://github.com/carlokok
-[Bram de Haan]: https://github.com/atelierbram
-[Daniel Kvasnička]: https://github.com/dkvasnicka
-[Dmitry Smolin]: https://github.com/dimsmol
-[Jeremy Hull]: https://github.com/sourrust
-[Seongwon Lee]: https://github.com/dlimpid
-[Jan T. Sott]: https://github.com/idleberg
-
-
-## Version 7.5
-
-A catch-up release dealing with some of the accumulated contributions. This one
-is probably will be the last before the 8.0 which will be slightly backwards
-incompatible regarding some advanced use-cases.
-
-One outstanding change in this version is the addition of 6 languages to the
-[hosted script][d]: Markdown, ObjectiveC, CoffeeScript, Apache, Nginx and
-Makefile. It now weighs about 6K more but we're going to keep it under 30K.
-
-New languages:
-
-- OCaml by [Mehdi Dogguy][mehdid] and [Nicolas Braud-Santoni][nbraud]
-- [LiveCode Server][lcs] by [Ralf Bitter][revig]
-- Scilab by [Sylvestre Ledru][sylvestre]
-- basic support for Makefile by [Ivan Sagalaev][isagalaev]
-
-Improvements:
-
-- Ruby's got support for characters like `?A`, `?1`, `?\012` etc. and `%r{..}`
- regexps.
-- Clojure now allows a function call in the beginning of s-expressions
- `(($filter "myCount") (arr 1 2 3 4 5))`.
-- Haskell's got new keywords and now recognizes more things like pragmas,
- preprocessors, modules, containers, FFIs etc. Thanks to [Zena Treep][treep]
- for the implementation and to [Jeremy Hull][sourrust] for guiding it.
-- Miscellaneous fixes in PHP, Brainfuck, SCSS, Asciidoc, CMake, Python and F#.
-
-[mehdid]: https://github.com/mehdid
-[nbraud]: https://github.com/nbraud
-[revig]: https://github.com/revig
-[lcs]: http://livecode.com/developers/guides/server/
-[sylvestre]: https://github.com/sylvestre
-[isagalaev]: https://github.com/isagalaev
-[treep]: https://github.com/treep
-[sourrust]: https://github.com/sourrust
-[d]: http://highlightjs.org/download/
-
-
-## New core developers
-
-The latest long period of almost complete inactivity in the project coincided
-with growing interest to it led to a decision that now seems completely obvious:
-we need more core developers.
-
-So without further ado let me welcome to the core team two long-time
-contributors: [Jeremy Hull][] and [Oleg
-Efimov][].
-
-Hope now we'll be able to work through stuff faster!
-
-P.S. The historical commit is [here][1] for the record.
-
-[Jeremy Hull]: https://github.com/sourrust
-[Oleg Efimov]: https://github.com/sannis
-[1]: https://github.com/isagalaev/highlight.js/commit/f3056941bda56d2b72276b97bc0dd5f230f2473f
-
-
-## Version 7.4
-
-This long overdue version is a snapshot of the current source tree with all the
-changes that happened during the past year. Sorry for taking so long!
-
-Along with the changes in code highlight.js has finally got its new home at
- , moving from its cradle on Software Maniacs which it
-outgrew a long time ago. Be sure to report any bugs about the site to
-.
-
-On to what's new…
-
-New languages:
-
-- Handlebars templates by [Robin Ward][]
-- Oracle Rules Language by [Jason Jacobson][]
-- F# by [Joans Follesø][]
-- AsciiDoc and Haml by [Dan Allen][]
-- Lasso by [Eric Knibbe][]
-- SCSS by [Kurt Emch][]
-- VB.NET by [Poren Chiang][]
-- Mizar by [Kelley van Evert][]
-
-[Robin Ward]: https://github.com/eviltrout
-[Jason Jacobson]: https://github.com/jayce7
-[Joans Follesø]: https://github.com/follesoe
-[Dan Allen]: https://github.com/mojavelinux
-[Eric Knibbe]: https://github.com/EricFromCanada
-[Kurt Emch]: https://github.com/kemch
-[Poren Chiang]: https://github.com/rschiang
-[Kelley van Evert]: https://github.com/kelleyvanevert
-
-New style themes:
-
-- Monokai Sublime by [noformnocontent][]
-- Railscasts by [Damien White][]
-- Obsidian by [Alexander Marenin][]
-- Docco by [Simon Madine][]
-- Mono Blue by [Ivan Sagalaev][] (uses a single color hue for everything)
-- Foundation by [Dan Allen][]
-
-[noformnocontent]: http://nn.mit-license.org/
-[Damien White]: https://github.com/visoft
-[Alexander Marenin]: https://github.com/ioncreature
-[Simon Madine]: https://github.com/thingsinjars
-[Ivan Sagalaev]: https://github.com/isagalaev
-
-Other notable changes:
-
-- Corrected many corner cases in CSS.
-- Dropped Python 2 version of the build tool.
-- Implemented building for the AMD format.
-- Updated Rust keywords (thanks to [Dmitry Medvinsky][]).
-- Literal regexes can now be used in language definitions.
-- CoffeeScript highlighting is now significantly more robust and rich due to
- input from [Cédric Néhémie][].
-
-[Dmitry Medvinsky]: https://github.com/dmedvinsky
-[Cédric Néhémie]: https://github.com/abe33
-
-
-## Version 7.3
-
-- Since this version highlight.js no longer works in IE version 8 and older.
- It's made it possible to reduce the library size and dramatically improve code
- readability and made it easier to maintain. Time to go forward!
-
-- New languages: AppleScript (by [Nathan Grigg][ng] and [Dr. Drang][dd]) and
- Brainfuck (by [Evgeny Stepanischev][bolk]).
-
-- Improvements to existing languages:
-
- - interpreter prompt in Python (`>>>` and `...`)
- - @-properties and classes in CoffeeScript
- - E4X in JavaScript (by [Oleg Efimov][oe])
- - new keywords in Perl (by [Kirk Kimmel][kk])
- - big Ruby syntax update (by [Vasily Polovnyov][vast])
- - small fixes in Bash
-
-- Also Oleg Efimov did a great job of moving all the docs for language and style
- developers and contributors from the old wiki under the source code in the
- "docs" directory. Now these docs are nicely presented at
- .
-
-[ng]: https://github.com/nathan11g
-[dd]: https://github.com/drdrang
-[bolk]: https://github.com/bolknote
-[oe]: https://github.com/Sannis
-[kk]: https://github.com/kimmel
-[vast]: https://github.com/vast
-
-
-## Version 7.2
-
-A regular bug-fix release without any significant new features. Enjoy!
-
-
-## Version 7.1
-
-A Summer crop:
-
-- [Marc Fornos][mf] made the definition for Clojure along with the matching
- style Rainbow (which, of course, works for other languages too).
-- CoffeeScript support continues to improve getting support for regular
- expressions.
-- Yoshihide Jimbo ported to highlight.js [five Tomorrow styles][tm] from the
- [project by Chris Kempson][tm0].
-- Thanks to [Casey Duncun][cd] the library can now be built in the popular
- [AMD format][amd].
-- And last but not least, we've got a fair number of correctness and consistency
- fixes, including a pretty significant refactoring of Ruby.
-
-[mf]: https://github.com/mfornos
-[tm]: http://jmblog.github.com/color-themes-for-highlightjs/
-[tm0]: https://github.com/ChrisKempson/Tomorrow-Theme
-[cd]: https://github.com/caseman
-[amd]: http://requirejs.org/docs/whyamd.html
-
-
-## Version 7.0
-
-The reason for the new major version update is a global change of keyword syntax
-which resulted in the library getting smaller once again. For example, the
-hosted build is 2K less than at the previous version while supporting two new
-languages.
-
-Notable changes:
-
-- The library now works not only in a browser but also with [node.js][]. It is
- installable with `npm install highlight.js`. [API][] docs are available on our
- wiki.
-
-- The new unique feature (apparently) among syntax highlighters is highlighting
- *HTTP* headers and an arbitrary language in the request body. The most useful
- languages here are *XML* and *JSON* both of which highlight.js does support.
- Here's [the detailed post][p] about the feature.
-
-- Two new style themes: a dark "south" *[Pojoaque][]* by Jason Tate and an
- emulation of*XCode* IDE by [Angel Olloqui][ao].
-
-- Three new languages: *D* by [Aleksandar Ružičić][ar], *R* by [Joe Cheng][jc]
- and *GLSL* by [Sergey Tikhomirov][st].
-
-- *Nginx* syntax has become a million times smaller and more universal thanks to
- remaking it in a more generic manner that doesn't require listing all the
- directives in the known universe.
-
-- Function titles are now highlighted in *PHP*.
-
-- *Haskell* and *VHDL* were significantly reworked to be more rich and correct
- by their respective maintainers [Jeremy Hull][sr] and [Igor Kalnitsky][ik].
-
-And last but not least, many bugs have been fixed around correctness and
-language detection.
-
-Overall highlight.js currently supports 51 languages and 20 style themes.
-
-[node.js]: http://nodejs.org/
-[api]: http://softwaremaniacs.org/wiki/doku.php/highlight.js:api
-[p]: http://softwaremaniacs.org/blog/2012/05/10/http-and-json-in-highlight-js/en/
-[pojoaque]: http://web-cms-designs.com/ftopict-10-pojoaque-style-for-highlight-js-code-highlighter.html
-[ao]: https://github.com/angelolloqui
-[ar]: https://github.com/raleksandar
-[jc]: https://github.com/jcheng5
-[st]: https://github.com/tikhomirov
-[sr]: https://github.com/sourrust
-[ik]: https://github.com/ikalnitsky
-
-
-## Version 6.2
-
-A lot of things happened in highlight.js since the last version! We've got nine
-new contributors, the discussion group came alive, and the main branch on GitHub
-now counts more than 350 followers. Here are most significant results coming
-from all this activity:
-
-- 5 (five!) new languages: Rust, ActionScript, CoffeeScript, MatLab and
- experimental support for markdown. Thanks go to [Andrey Vlasovskikh][av],
- [Alexander Myadzel][am], [Dmytrii Nagirniak][dn], [Oleg Efimov][oe], [Denis
- Bardadym][db] and [John Crepezzi][jc].
-
-- 2 new style themes: Monokai by [Luigi Maselli][lm] and stylistic imitation of
- another well-known highlighter Google Code Prettify by [Aahan Krish][ak].
-
-- A vast number of [correctness fixes and code refactorings][log], mostly made
- by [Oleg Efimov][oe] and [Evgeny Stepanischev][es].
-
-[av]: https://github.com/vlasovskikh
-[am]: https://github.com/myadzel
-[dn]: https://github.com/dnagir
-[oe]: https://github.com/Sannis
-[db]: https://github.com/btd
-[jc]: https://github.com/seejohnrun
-[lm]: http://grigio.org/
-[ak]: https://github.com/geekpanth3r
-[es]: https://github.com/bolknote
-[log]: https://github.com/isagalaev/highlight.js/commits/
-
-
-## Version 6.1 — Solarized
-
-[Jeremy Hull][jh] has implemented my dream feature — a port of [Solarized][]
-style theme famous for being based on the intricate color theory to achieve
-correct contrast and color perception. It is now available for highlight.js in
-both variants — light and dark.
-
-This version also adds a new original style Arta. Its author pumbur maintains a
-[heavily modified fork of highlight.js][pb] on GitHub.
-
-[jh]: https://github.com/sourrust
-[solarized]: http://ethanschoonover.com/solarized
-[pb]: https://github.com/pumbur/highlight.js
-
-
-## Version 6.0
-
-New major version of the highlighter has been built on a significantly
-refactored syntax. Due to this it's even smaller than the previous one while
-supporting more languages!
-
-New languages are:
-
-- Haskell by [Jeremy Hull][sourrust]
-- Erlang in two varieties — module and REPL — made collectively by [Nikolay
- Zakharov][desh], [Dmitry Kovega][arhibot] and [Sergey Ignatov][ignatov]
-- Objective C by [Valerii Hiora][vhbit]
-- Vala by [Antono Vasiljev][antono]
-- Go by [Stephan Kountso][steplg]
-
-[sourrust]: https://github.com/sourrust
-[desh]: http://desh.su/
-[arhibot]: https://github.com/arhibot
-[ignatov]: https://github.com/ignatov
-[vhbit]: https://github.com/vhbit
-[antono]: https://github.com/antono
-[steplg]: https://github.com/steplg
-
-Also this version is marginally faster and fixes a number of small long-standing
-bugs.
-
-Developer overview of the new language syntax is available in a [blog post about
-recent beta release][beta].
-
-[beta]: http://softwaremaniacs.org/blog/2011/04/25/highlight-js-60-beta/en/
-
-P.S. New version is not yet available on a Yandex CDN, so for now you have to
-download [your own copy][d].
-
-[d]: /soft/highlight/en/download/
-
-
-## Version 5.14
-
-Fixed bugs in HTML/XML detection and relevance introduced in previous
-refactoring.
-
-Also test.html now shows the second best result of language detection by
-relevance.
-
-
-## Version 5.13
-
-Past weekend began with a couple of simple additions for existing languages but
-ended up in a big code refactoring bringing along nice improvements for language
-developers.
-
-### For users
-
-- Description of C++ has got new keywords from the upcoming [C++ 0x][] standard.
-- Description of HTML has got new tags from [HTML 5][].
-- CSS-styles have been unified to use consistent padding and also have lost
- pop-outs with names of detected languages.
-- [Igor Kalnitsky][ik] has sent two new language descriptions: CMake & VHDL.
-
-This makes total number of languages supported by highlight.js to reach 35.
-
-Bug fixes:
-
-- Custom classes on `` tags are not being overridden anymore
-- More correct highlighting of code blocks inside non-`` containers:
- highlighter now doesn't insist on replacing them with its own container and
- just replaces the contents.
-- Small fixes in browser compatibility and heuristics.
-
-[c++ 0x]: http://ru.wikipedia.org/wiki/C%2B%2B0x
-[html 5]: http://en.wikipedia.org/wiki/HTML5
-[ik]: http://kalnitsky.org.ua/
-
-### For developers
-
-The most significant change is the ability to include language submodes right
-under `contains` instead of defining explicit named submodes in the main array:
-
- contains: [
- 'string',
- 'number',
- {begin: '\\n', end: hljs.IMMEDIATE_RE}
- ]
-
-This is useful for auxiliary modes needed only in one place to define parsing.
-Note that such modes often don't have `className` and hence won't generate a
-separate `` in the resulting markup. This is similar in effect to
-`noMarkup: true`. All existing languages have been refactored accordingly.
-
-Test file test.html has at last become a real test. Now it not only puts the
-detected language name under the code snippet but also tests if it matches the
-expected one. Test summary is displayed right above all language snippets.
-
-
-## CDN
-
-Fine people at [Yandex][] agreed to host highlight.js on their big fast servers.
-[Link up][l]!
-
-[yandex]: http://yandex.com/
-[l]: http://softwaremaniacs.org/soft/highlight/en/download/
-
-
-## Version 5.10 — "Paris".
-
-Though I'm on a vacation in Paris, I decided to release a new version with a
-couple of small fixes:
-
-- Tomas Vitvar discovered that TAB replacement doesn't always work when used
- with custom markup in code
-- SQL parsing is even more rigid now and doesn't step over SmallTalk in tests
-
-
-## Version 5.9
-
-A long-awaited version is finally released.
-
-New languages:
-
-- Andrew Fedorov made a definition for Lua
-- a long-time highlight.js contributor [Peter Leonov][pl] made a definition for
- Nginx config
-- [Vladimir Moskva][vm] made a definition for TeX
-
-[pl]: http://kung-fu-tzu.ru/
-[vm]: http://fulc.ru/
-
-Fixes for existing languages:
-
-- [Loren Segal][ls] reworked the Ruby definition and added highlighting for
- [YARD][] inline documentation
-- the definition of SQL has become more solid and now it shouldn't be overly
- greedy when it comes to language detection
-
-[ls]: http://gnuu.org/
-[yard]: http://yardoc.org/
-
-The highlighter has become more usable as a library allowing to do highlighting
-from initialization code of JS frameworks and in ajax methods (see.
-readme.eng.txt).
-
-Also this version drops support for the [WordPress][wp] plugin. Everyone is
-welcome to [pick up its maintenance][p] if needed.
-
-[wp]: http://wordpress.org/
-[p]: http://bazaar.launchpad.net/~isagalaev/+junk/highlight/annotate/342/src/wp_highlight.js.php
-
-
-## Version 5.8
-
-- Jan Berkel has contributed a definition for Scala. +1 to hotness!
-- All CSS-styles are rewritten to work only inside `` tags to avoid
- conflicts with host site styles.
-
-
-## Version 5.7.
-
-Fixed escaping of quotes in VBScript strings.
-
-
-## Version 5.5
-
-This version brings a small change: now .ini-files allow digits, underscores and
-square brackets in key names.
-
-
-## Version 5.4
-
-Fixed small but upsetting bug in the packer which caused incorrect highlighting
-of explicitly specified languages. Thanks to Andrew Fedorov for precise
-diagnostics!
-
-
-## Version 5.3
-
-The version to fulfil old promises.
-
-The most significant change is that highlight.js now preserves custom user
-markup in code along with its own highlighting markup. This means that now it's
-possible to use, say, links in code. Thanks to [Vladimir Dolzhenko][vd] for the
-[initial proposal][1] and for making a proof-of-concept patch.
-
-Also in this version:
-
-- [Vasily Polovnyov][vp] has sent a GitHub-like style and has implemented
- support for CSS @-rules and Ruby symbols.
-- Yura Zaripov has sent two styles: Brown Paper and School Book.
-- Oleg Volchkov has sent a definition for [Parser 3][p3].
-
-[1]: http://softwaremaniacs.org/forum/highlightjs/6612/
-[p3]: http://www.parser.ru/
-[vp]: http://vasily.polovnyov.ru/
-[vd]: http://dolzhenko.blogspot.com/
-
-
-## Version 5.2
-
-- at last it's possible to replace indentation TABs with something sensible
- (e.g. 2 or 4 spaces)
-- new keywords and built-ins for 1C by Sergey Baranov
-- a couple of small fixes to Apache highlighting
-
-
-## Version 5.1
-
-This is one of those nice version consisting entirely of new and shiny
-contributions!
-
-- [Vladimir Ermakov][vooon] created highlighting for AVR Assembler
-- [Ruslan Keba][rukeba] created highlighting for Apache config file. Also his
- original visual style for it is now available for all highlight.js languages
- under the name "Magula".
-- [Shuen-Huei Guan][drake] (aka Drake) sent new keywords for RenderMan
- languages. Also thanks go to [Konstantin Evdokimenko][ke] for his advice on
- the matter.
-
-[vooon]: http://vehq.ru/about/
-[rukeba]: http://rukeba.com/
-[drake]: http://drakeguan.org/
-[ke]: http://k-evdokimenko.moikrug.ru/
-
-
-## Version 5.0
-
-The main change in the new major version of highlight.js is a mechanism for
-packing several languages along with the library itself into a single compressed
-file. Now sites using several languages will load considerably faster because
-the library won't dynamically include additional files while loading.
-
-Also this version fixes a long-standing bug with Javascript highlighting that
-couldn't distinguish between regular expressions and division operations.
-
-And as usually there were a couple of minor correctness fixes.
-
-Great thanks to all contributors! Keep using highlight.js.
-
-
-## Version 4.3
-
-This version comes with two contributions from [Jason Diamond][jd]:
-
-- language definition for C# (yes! it was a long-missed thing!)
-- Visual Studio-like highlighting style
-
-Plus there are a couple of minor bug fixes for parsing HTML and XML attributes.
-
-[jd]: http://jason.diamond.name/weblog/
-
-
-## Version 4.2
-
-The biggest news is highlighting for Lisp, courtesy of Vasily Polovnyov. It's
-somewhat experimental meaning that for highlighting "keywords" it doesn't use
-any pre-defined set of a Lisp dialect. Instead it tries to highlight first word
-in parentheses wherever it makes sense. I'd like to ask people programming in
-Lisp to confirm if it's a good idea and send feedback to [the forum][f].
-
-Other changes:
-
-- Smalltalk was excluded from DEFAULT_LANGUAGES to save traffic
-- [Vladimir Epifanov][voldmar] has implemented javascript style switcher for
- test.html
-- comments now allowed inside Ruby function definition
-- [MEL][] language from [Shuen-Huei Guan][drake]
-- whitespace now allowed between `` and ``
-- better auto-detection of C++ and PHP
-- HTML allows embedded VBScript (`<% .. %>`)
-
-[f]: http://softwaremaniacs.org/forum/highlightjs/
-[voldmar]: http://voldmar.ya.ru/
-[mel]: http://en.wikipedia.org/wiki/Maya_Embedded_Language
-[drake]: http://drakeguan.org/
-
-
-## Version 4.1
-
-Languages:
-
-- Bash from Vah
-- DOS bat-files from Alexander Makarov (Sam)
-- Diff files from Vasily Polovnyov
-- Ini files from myself though initial idea was from Sam
-
-Styles:
-
-- Zenburn from Vladimir Epifanov, this is an imitation of a
- [well-known theme for Vim][zenburn].
-- Ascetic from myself, as a realization of ideals of non-flashy highlighting:
- just one color in only three gradations :-)
-
-In other news. [One small bug][bug] was fixed, built-in keywords were added for
-Python and C++ which improved auto-detection for the latter (it was shame that
-[my wife's blog][alenacpp] had issues with it from time to time). And lastly
-thanks go to Sam for getting rid of my stylistic comments in code that were
-getting in the way of [JSMin][].
-
-[zenburn]: http://en.wikipedia.org/wiki/Zenburn
-[alenacpp]: http://alenacpp.blogspot.com/
-[bug]: http://softwaremaniacs.org/forum/viewtopic.php?id=1823
-[jsmin]: http://code.google.com/p/jsmin-php/
-
-
-## Version 4.0
-
-New major version is a result of vast refactoring and of many contributions.
-
-Visible new features:
-
-- Highlighting of embedded languages. Currently is implemented highlighting of
- Javascript and CSS inside HTML.
-- Bundled 5 ready-made style themes!
-
-Invisible new features:
-
-- Highlight.js no longer pollutes global namespace. Only one object and one
- function for backward compatibility.
-- Performance is further increased by about 15%.
-
-Changing of a major version number caused by a new format of language definition
-files. If you use some third-party language files they should be updated.
-
-
-## Version 3.5
-
-A very nice version in my opinion fixing a number of small bugs and slightly
-increased speed in a couple of corner cases. Thanks to everybody who reports
-bugs in he [forum][f] and by email!
-
-There is also a new language — XML. A custom XML formerly was detected as HTML
-and didn't highlight custom tags. In this version I tried to make custom XML to
-be detected and highlighted by its own rules. Which by the way include such
-things as CDATA sections and processing instructions (` ... ?>`).
-
-[f]: http://softwaremaniacs.org/forum/viewforum.php?id=6
-
-
-## Version 3.3
-
-[Vladimir Gubarkov][xonix] has provided an interesting and useful addition.
-File export.html contains a little program that shows and allows to copy and
-paste an HTML code generated by the highlighter for any code snippet. This can
-be useful in situations when one can't use the script itself on a site.
-
-
-[xonix]: http://xonixx.blogspot.com/
-
-
-## Version 3.2 consists completely of contributions:
-
-- Vladimir Gubarkov has described SmallTalk
-- Yuri Ivanov has described 1C
-- Peter Leonov has packaged the highlighter as a Firefox extension
-- Vladimir Ermakov has compiled a mod for phpBB
-
-Many thanks to you all!
-
-
-## Version 3.1
-
-Three new languages are available: Django templates, SQL and Axapta. The latter
-two are sent by [Dmitri Roudakov][1]. However I've almost entirely rewrote an
-SQL definition but I'd never started it be it from the ground up :-)
-
-The engine itself has got a long awaited feature of grouping keywords
-("keyword", "built-in function", "literal"). No more hacks!
-
-[1]: http://roudakov.ru/
-
-
-## Version 3.0
-
-It is major mainly because now highlight.js has grown large and has become
-modular. Now when you pass it a list of languages to highlight it will
-dynamically load into a browser only those languages.
-
-Also:
-
-- Konstantin Evdokimenko of [RibKit][] project has created a highlighting for
- RenderMan Shading Language and RenderMan Interface Bytestream. Yay for more
- languages!
-- Heuristics for C++ and HTML got better.
-- I've implemented (at last) a correct handling of backslash escapes in C-like
- languages.
-
-There is also a small backwards incompatible change in the new version. The
-function initHighlighting that was used to initialize highlighting instead of
-initHighlightingOnLoad a long time ago no longer works. If you by chance still
-use it — replace it with the new one.
-
-[RibKit]: http://ribkit.sourceforge.net/
-
-
-## Version 2.9
-
-Highlight.js is a parser, not just a couple of regular expressions. That said
-I'm glad to announce that in the new version 2.9 has support for:
-
-- in-string substitutions for Ruby -- `#{...}`
-- strings from from numeric symbol codes (like #XX) for Delphi
-
-
-## Version 2.8
-
-A maintenance release with more tuned heuristics. Fully backwards compatible.
-
-
-## Version 2.7
-
-- Nikita Ledyaev presents highlighting for VBScript, yay!
-- A couple of bugs with escaping in strings were fixed thanks to Mickle
-- Ongoing tuning of heuristics
-
-Fixed bugs were rather unpleasant so I encourage everyone to upgrade!
-
-
-## Version 2.4
-
-- Peter Leonov provides another improved highlighting for Perl
-- Javascript gets a new kind of keywords — "literals". These are the words
- "true", "false" and "null"
-
-Also highlight.js homepage now lists sites that use the library. Feel free to
-add your site by [dropping me a message][mail] until I find the time to build a
-submit form.
-
-[mail]: mailto:Maniac@SoftwareManiacs.Org
-
-
-## Version 2.3
-
-This version fixes IE breakage in previous version. My apologies to all who have
-already downloaded that one!
-
-
-## Version 2.2
-
-- added highlighting for Javascript
-- at last fixed parsing of Delphi's escaped apostrophes in strings
-- in Ruby fixed highlighting of keywords 'def' and 'class', same for 'sub' in
- Perl
-
-
-## Version 2.0
-
-- Ruby support by [Anton Kovalyov][ak]
-- speed increased by orders of magnitude due to new way of parsing
-- this same way allows now correct highlighting of keywords in some tricky
- places (like keyword "End" at the end of Delphi classes)
-
-[ak]: http://anton.kovalyov.net/
-
-
-## Version 1.0
-
-Version 1.0 of javascript syntax highlighter is released!
-
-It's the first version available with English description. Feel free to post
-your comments and question to [highlight.js forum][forum]. And don't be afraid
-if you find there some fancy Cyrillic letters -- it's for Russian users too :-)
-
-[forum]: http://softwaremaniacs.org/forum/viewforum.php?id=6
diff --git a/collectedstatic/highlight/LICENSE b/collectedstatic/highlight/LICENSE
deleted file mode 100644
index 422deb7..0000000
--- a/collectedstatic/highlight/LICENSE
+++ /dev/null
@@ -1,24 +0,0 @@
-Copyright (c) 2006, Ivan Sagalaev
-All rights reserved.
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions are met:
-
- * Redistributions of source code must retain the above copyright
- notice, this list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright
- notice, this list of conditions and the following disclaimer in the
- documentation and/or other materials provided with the distribution.
- * Neither the name of highlight.js nor the names of its contributors
- may be used to endorse or promote products derived from this software
- without specific prior written permission.
-
-THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND ANY
-EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
-WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
-DISCLAIMED. IN NO EVENT SHALL THE REGENTS AND CONTRIBUTORS BE LIABLE FOR ANY
-DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
-(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
-LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
-ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/collectedstatic/highlight/README.md b/collectedstatic/highlight/README.md
deleted file mode 100644
index 9f76e6b..0000000
--- a/collectedstatic/highlight/README.md
+++ /dev/null
@@ -1,150 +0,0 @@
-# Highlight.js
-
-[](https://travis-ci.org/isagalaev/highlight.js)
-
-Highlight.js is a syntax highlighter written in JavaScript. It works in
-the browser as well as on the server. It works with pretty much any
-markup, doesn’t depend on any framework and has automatic language
-detection.
-
-## Getting Started
-
-The bare minimum for using highlight.js on a web page is linking to the
-library along with one of the styles and calling
-[`initHighlightingOnLoad`][1]:
-
-```html
-
-
-
-```
-
-This will find and highlight code inside of `` tags; it tries
-to detect the language automatically. If automatic detection doesn’t
-work for you, you can specify the language in the `class` attribute:
-
-```html
-...
-```
-
-The list of supported language classes is available in the [class
-reference][2]. Classes can also be prefixed with either `language-` or
-`lang-`.
-
-To disable highlighting altogether use the `nohighlight` class:
-
-```html
-...
-```
-
-## Custom Initialization
-
-When you need a bit more control over the initialization of
-highlight.js, you can use the [`highlightBlock`][3] and [`configure`][4]
-functions. This allows you to control *what* to highlight and *when*.
-
-Here’s an equivalent way to calling [`initHighlightingOnLoad`][1] using
-jQuery:
-
-```javascript
-$(document).ready(function() {
- $('pre code').each(function(i, block) {
- hljs.highlightBlock(block);
- });
-});
-```
-
-You can use any tags instead of `` to mark up your code. If
-you don't use a container that preserve line breaks you will need to
-configure highlight.js to use the ` ` tag:
-
-```javascript
-hljs.configure({useBR: true});
-
-$('div.code').each(function(i, block) {
- hljs.highlightBlock(block);
-});
-```
-
-For other options refer to the documentation for [`configure`][4].
-
-
-## Web Workers
-
-You can run highlighting inside a web worker to avoid freezing the browser
-window while dealing with very big chunks of code.
-
-In your main script:
-
-```javascript
-addEventListener('load', function() {
- var code = document.querySelector('#code');
- var worker = new Worker('worker.js');
- worker.onmessage = function(event) { code.innerHTML = event.data; }
- worker.postMessage(code.textContent);
-})
-```
-
-In worker.js:
-
-```javascript
-onmessage = function(event) {
- importScripts('/highlight.pack.js');
- var result = self.hljs.highlightAuto(event.data);
- postMessage(result.value);
-}
-```
-
-
-## Getting the Library
-
-You can get highlight.js as a hosted, or custom-build, browser script or
-as a server module. Right out of the box the browser script supports
-both AMD and CommonJS, so if you wish you can use RequireJS or
-Browserify without having to build from source. The server module also
-works perfectly fine with Browserify, but there is the option to use a
-build specific to browsers rather than something meant for a server.
-Head over to the [download page][5] for all the options.
-
-**Don't link to GitHub directly.** The library is not supposed to work straight
-from the source, it requires building. If none of the pre-packaged options
-work for you refer to the [building documentation][6].
-
-**The CDN-hosted package doesn't have all the languages.** Otherwise it'd be
-too big. If you don't see the language you need in the ["Common" section][5],
-it can be added manually:
-
-```html
-
-```
-
-**On Almond.** You need to use the optimizer to give the module a name. For
-example:
-
-```
-r.js -o name=hljs paths.hljs=/path/to/highlight out=highlight.js
-```
-
-
-## License
-
-Highlight.js is released under the BSD License. See [LICENSE][7] file
-for details.
-
-## Links
-
-The official site for the library is at .
-
-Further in-depth documentation for the API and other topics is at
- .
-
-Authors and contributors are listed in the [AUTHORS.en.txt][8] file.
-
-[1]: http://highlightjs.readthedocs.io/en/latest/api.html#inithighlightingonload
-[2]: http://highlightjs.readthedocs.io/en/latest/css-classes-reference.html
-[3]: http://highlightjs.readthedocs.io/en/latest/api.html#highlightblock-block
-[4]: http://highlightjs.readthedocs.io/en/latest/api.html#configure-options
-[5]: https://highlightjs.org/download/
-[6]: http://highlightjs.readthedocs.io/en/latest/building-testing.html
-[7]: https://github.com/isagalaev/highlight.js/blob/master/LICENSE
-[8]: https://github.com/isagalaev/highlight.js/blob/master/AUTHORS.en.txt
diff --git a/collectedstatic/highlight/README.ru.md b/collectedstatic/highlight/README.ru.md
deleted file mode 100644
index ac481d0..0000000
--- a/collectedstatic/highlight/README.ru.md
+++ /dev/null
@@ -1,142 +0,0 @@
-# Highlight.js
-
-Highlight.js — это инструмент для подсветки синтаксиса, написанный на JavaScript. Он работает
-и в браузере, и на сервере. Он работает с практически любой HTML разметкой, не
-зависит от каких-либо фреймворков и умеет автоматически определять язык.
-
-
-## Начало работы
-
-Минимум, что нужно сделать для использования highlight.js на веб-странице — это
-подключить библиотеку, CSS-стили и вызывать [`initHighlightingOnLoad`][1]:
-
-```html
-
-
-
-```
-
-Библиотека найдёт и раскрасит код внутри тегов ``, попытавшись
-автоматически определить язык. Когда автоопределение не срабатывает, можно явно
-указать язык в атрибуте class:
-
-```html
-...
-```
-
-Список поддерживаемых классов языков доступен в [справочнике по классам][2].
-Класс также можно предварить префиксами `language-` или `lang-`.
-
-Чтобы отключить подсветку для какого-то блока, используйте класс `nohighlight`:
-
-```html
-...
-```
-
-## Инициализация вручную
-
-Чтобы иметь чуть больше контроля за инициализацией подсветки, вы можете
-использовать функции [`highlightBlock`][3] и [`configure`][4]. Таким образом
-можно управлять тем, *что* и *когда* подсвечивать.
-
-Вот пример инициализации, эквивалентной вызову [`initHighlightingOnLoad`][1], но
-с использованием jQuery:
-
-```javascript
-$(document).ready(function() {
- $('pre code').each(function(i, block) {
- hljs.highlightBlock(block);
- });
-});
-```
-
-Вы можете использовать любые теги разметки вместо ``. Если
-используете контейнер, не сохраняющий переводы строк, вам нужно сказать
-highlight.js использовать для них тег ` `:
-
-```javascript
-hljs.configure({useBR: true});
-
-$('div.code').each(function(i, block) {
- hljs.highlightBlock(block);
-});
-```
-
-Другие опции можно найти в документации функции [`configure`][4].
-
-
-## Web Workers
-
-Подсветку можно запустить внутри web worker'а, чтобы окно
-браузера не подтормаживало при работе с большими кусками кода.
-
-В основном скрипте:
-
-```javascript
-addEventListener('load', function() {
- var code = document.querySelector('#code');
- var worker = new Worker('worker.js');
- worker.onmessage = function(event) { code.innerHTML = event.data; }
- worker.postMessage(code.textContent);
-})
-```
-
-В worker.js:
-
-```javascript
-onmessage = function(event) {
- importScripts('/highlight.pack.js');
- var result = self.hljs.highlightAuto(event.data);
- postMessage(result.value);
-}
-```
-
-
-## Установка библиотеки
-
-Highlight.js можно использовать в браузере прямо с CDN хостинга или скачать
-индивидуальную сборку, а также установив модуль на сервере. На
-[странице загрузки][5] подробно описаны все варианты.
-
-**Не подключайте GitHub напрямую.** Библиотека не предназначена для
-использования в виде исходного кода, а требует отдельной сборки. Если вам не
-подходит ни один из готовых вариантов, читайте [документацию по сборке][6].
-
-**Файл на CDN содержит не все языки.** Иначе он будет слишком большого размера.
-Если нужного вам языка нет в [категории "Common"][5], можно дообавить его
-вручную:
-
-```html
-
-```
-
-**Про Almond.** Нужно задать имя модуля в оптимизаторе, например:
-
-```
-r.js -o name=hljs paths.hljs=/path/to/highlight out=highlight.js
-```
-
-
-## Лицензия
-
-Highlight.js распространяется под лицензией BSD. Подробнее читайте файл
-[LICENSE][7].
-
-
-## Ссылки
-
-Официальный сайт билиотеки расположен по адресу .
-
-Более подробная документация по API и другим темам расположена на
- .
-
-Авторы и контрибьюторы перечислены в файле [AUTHORS.ru.txt][8] file.
-
-[1]: http://highlightjs.readthedocs.io/en/latest/api.html#inithighlightingonload
-[2]: http://highlightjs.readthedocs.io/en/latest/css-classes-reference.html
-[3]: http://highlightjs.readthedocs.io/en/latest/api.html#highlightblock-block
-[4]: http://highlightjs.readthedocs.io/en/latest/api.html#configure-options
-[5]: https://highlightjs.org/download/
-[6]: http://highlightjs.readthedocs.io/en/latest/building-testing.html
-[7]: https://github.com/isagalaev/highlight.js/blob/master/LICENSE
-[8]: https://github.com/isagalaev/highlight.js/blob/master/AUTHORS.ru.txt
diff --git a/collectedstatic/highlight/highlight.pack.js b/collectedstatic/highlight/highlight.pack.js
deleted file mode 100644
index e70a496..0000000
--- a/collectedstatic/highlight/highlight.pack.js
+++ /dev/null
@@ -1,2 +0,0 @@
-/*! highlight.js v9.8.0 | BSD3 License | git.io/hljslicense */
-!function(e){var n="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):n&&(n.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return n.hljs}))}(function(e){function n(e){return e.replace(/[&<>]/gm,function(e){return I[e]})}function t(e){return e.nodeName.toLowerCase()}function r(e,n){var t=e&&e.exec(n);return t&&0===t.index}function a(e){return k.test(e)}function i(e){var n,t,r,i,o=e.className+" ";if(o+=e.parentNode?e.parentNode.className:"",t=B.exec(o))return R(t[1])?t[1]:"no-highlight";for(o=o.split(/\s+/),n=0,r=o.length;r>n;n++)if(i=o[n],a(i)||R(i))return i}function o(e,n){var t,r={};for(t in e)r[t]=e[t];if(n)for(t in n)r[t]=n[t];return r}function u(e){var n=[];return function r(e,a){for(var i=e.firstChild;i;i=i.nextSibling)3===i.nodeType?a+=i.nodeValue.length:1===i.nodeType&&(n.push({event:"start",offset:a,node:i}),a=r(i,a),t(i).match(/br|hr|img|input/)||n.push({event:"stop",offset:a,node:i}));return a}(e,0),n}function c(e,r,a){function i(){return e.length&&r.length?e[0].offset!==r[0].offset?e[0].offset"}function u(e){l+=""+t(e)+">"}function c(e){("start"===e.event?o:u)(e.node)}for(var s=0,l="",f=[];e.length||r.length;){var g=i();if(l+=n(a.substr(s,g[0].offset-s)),s=g[0].offset,g===e){f.reverse().forEach(u);do c(g.splice(0,1)[0]),g=i();while(g===e&&g.length&&g[0].offset===s);f.reverse().forEach(o)}else"start"===g[0].event?f.push(g[0].node):f.pop(),c(g.splice(0,1)[0])}return l+n(a.substr(s))}function s(e){function n(e){return e&&e.source||e}function t(t,r){return new RegExp(n(t),"m"+(e.cI?"i":"")+(r?"g":""))}function r(a,i){if(!a.compiled){if(a.compiled=!0,a.k=a.k||a.bK,a.k){var u={},c=function(n,t){e.cI&&(t=t.toLowerCase()),t.split(" ").forEach(function(e){var t=e.split("|");u[t[0]]=[n,t[1]?Number(t[1]):1]})};"string"==typeof a.k?c("keyword",a.k):E(a.k).forEach(function(e){c(e,a.k[e])}),a.k=u}a.lR=t(a.l||/\w+/,!0),i&&(a.bK&&(a.b="\\b("+a.bK.split(" ").join("|")+")\\b"),a.b||(a.b=/\B|\b/),a.bR=t(a.b),a.e||a.eW||(a.e=/\B|\b/),a.e&&(a.eR=t(a.e)),a.tE=n(a.e)||"",a.eW&&i.tE&&(a.tE+=(a.e?"|":"")+i.tE)),a.i&&(a.iR=t(a.i)),null==a.r&&(a.r=1),a.c||(a.c=[]);var s=[];a.c.forEach(function(e){e.v?e.v.forEach(function(n){s.push(o(e,n))}):s.push("self"===e?a:e)}),a.c=s,a.c.forEach(function(e){r(e,a)}),a.starts&&r(a.starts,i);var l=a.c.map(function(e){return e.bK?"\\.?("+e.b+")\\.?":e.b}).concat([a.tE,a.i]).map(n).filter(Boolean);a.t=l.length?t(l.join("|"),!0):{exec:function(){return null}}}}r(e)}function l(e,t,a,i){function o(e,n){var t,a;for(t=0,a=n.c.length;a>t;t++)if(r(n.c[t].bR,e))return n.c[t]}function u(e,n){if(r(e.eR,n)){for(;e.endsParent&&e.parent;)e=e.parent;return e}return e.eW?u(e.parent,n):void 0}function c(e,n){return!a&&r(n.iR,e)}function g(e,n){var t=N.cI?n[0].toLowerCase():n[0];return e.k.hasOwnProperty(t)&&e.k[t]}function h(e,n,t,r){var a=r?"":y.classPrefix,i='',i+n+o}function p(){var e,t,r,a;if(!E.k)return n(B);for(a="",t=0,E.lR.lastIndex=0,r=E.lR.exec(B);r;)a+=n(B.substr(t,r.index-t)),e=g(E,r),e?(M+=e[1],a+=h(e[0],n(r[0]))):a+=n(r[0]),t=E.lR.lastIndex,r=E.lR.exec(B);return a+n(B.substr(t))}function d(){var e="string"==typeof E.sL;if(e&&!x[E.sL])return n(B);var t=e?l(E.sL,B,!0,L[E.sL]):f(B,E.sL.length?E.sL:void 0);return E.r>0&&(M+=t.r),e&&(L[E.sL]=t.top),h(t.language,t.value,!1,!0)}function b(){k+=null!=E.sL?d():p(),B=""}function v(e){k+=e.cN?h(e.cN,"",!0):"",E=Object.create(e,{parent:{value:E}})}function m(e,n){if(B+=e,null==n)return b(),0;var t=o(n,E);if(t)return t.skip?B+=n:(t.eB&&(B+=n),b(),t.rB||t.eB||(B=n)),v(t,n),t.rB?0:n.length;var r=u(E,n);if(r){var a=E;a.skip?B+=n:(a.rE||a.eE||(B+=n),b(),a.eE&&(B=n));do E.cN&&(k+=C),E.skip||(M+=E.r),E=E.parent;while(E!==r.parent);return r.starts&&v(r.starts,""),a.rE?0:n.length}if(c(n,E))throw new Error('Illegal lexeme "'+n+'" for mode "'+(E.cN||"")+'"');return B+=n,n.length||1}var N=R(e);if(!N)throw new Error('Unknown language: "'+e+'"');s(N);var w,E=i||N,L={},k="";for(w=E;w!==N;w=w.parent)w.cN&&(k=h(w.cN,"",!0)+k);var B="",M=0;try{for(var I,j,O=0;;){if(E.t.lastIndex=O,I=E.t.exec(t),!I)break;j=m(t.substr(O,I.index-O),I[0]),O=I.index+j}for(m(t.substr(O)),w=E;w.parent;w=w.parent)w.cN&&(k+=C);return{r:M,value:k,language:e,top:E}}catch(T){if(T.message&&-1!==T.message.indexOf("Illegal"))return{r:0,value:n(t)};throw T}}function f(e,t){t=t||y.languages||E(x);var r={r:0,value:n(e)},a=r;return t.filter(R).forEach(function(n){var t=l(n,e,!1);t.language=n,t.r>a.r&&(a=t),t.r>r.r&&(a=r,r=t)}),a.language&&(r.second_best=a),r}function g(e){return y.tabReplace||y.useBR?e.replace(M,function(e,n){return y.useBR&&"\n"===e?" ":y.tabReplace?n.replace(/\t/g,y.tabReplace):void 0}):e}function h(e,n,t){var r=n?L[n]:t,a=[e.trim()];return e.match(/\bhljs\b/)||a.push("hljs"),-1===e.indexOf(r)&&a.push(r),a.join(" ").trim()}function p(e){var n,t,r,o,s,p=i(e);a(p)||(y.useBR?(n=document.createElementNS("http://www.w3.org/1999/xhtml","div"),n.innerHTML=e.innerHTML.replace(/\n/g,"").replace(/ /g,"\n")):n=e,s=n.textContent,r=p?l(p,s,!0):f(s),t=u(n),t.length&&(o=document.createElementNS("http://www.w3.org/1999/xhtml","div"),o.innerHTML=r.value,r.value=c(t,u(o),s)),r.value=g(r.value),e.innerHTML=r.value,e.className=h(e.className,p,r.language),e.result={language:r.language,re:r.r},r.second_best&&(e.second_best={language:r.second_best.language,re:r.second_best.r}))}function d(e){y=o(y,e)}function b(){if(!b.called){b.called=!0;var e=document.querySelectorAll("pre code");w.forEach.call(e,p)}}function v(){addEventListener("DOMContentLoaded",b,!1),addEventListener("load",b,!1)}function m(n,t){var r=x[n]=t(e);r.aliases&&r.aliases.forEach(function(e){L[e]=n})}function N(){return E(x)}function R(e){return e=(e||"").toLowerCase(),x[e]||x[L[e]]}var w=[],E=Object.keys,x={},L={},k=/^(no-?highlight|plain|text)$/i,B=/\blang(?:uage)?-([\w-]+)\b/i,M=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,C=" ",y={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},I={"&":"&","<":"<",">":">"};return e.highlight=l,e.highlightAuto=f,e.fixMarkup=g,e.highlightBlock=p,e.configure=d,e.initHighlighting=b,e.initHighlightingOnLoad=v,e.registerLanguage=m,e.listLanguages=N,e.getLanguage=R,e.inherit=o,e.IR="[a-zA-Z]\\w*",e.UIR="[a-zA-Z_]\\w*",e.NR="\\b\\d+(\\.\\d+)?",e.CNR="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",e.BNR="\\b(0b[01]+)",e.RSR="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",e.BE={b:"\\\\[\\s\\S]",r:0},e.ASM={cN:"string",b:"'",e:"'",i:"\\n",c:[e.BE]},e.QSM={cN:"string",b:'"',e:'"',i:"\\n",c:[e.BE]},e.PWM={b:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|like)\b/},e.C=function(n,t,r){var a=e.inherit({cN:"comment",b:n,e:t,c:[]},r||{});return a.c.push(e.PWM),a.c.push({cN:"doctag",b:"(?:TODO|FIXME|NOTE|BUG|XXX):",r:0}),a},e.CLCM=e.C("//","$"),e.CBCM=e.C("/\\*","\\*/"),e.HCM=e.C("#","$"),e.NM={cN:"number",b:e.NR,r:0},e.CNM={cN:"number",b:e.CNR,r:0},e.BNM={cN:"number",b:e.BNR,r:0},e.CSSNM={cN:"number",b:e.NR+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",r:0},e.RM={cN:"regexp",b:/\//,e:/\/[gimuy]*/,i:/\n/,c:[e.BE,{b:/\[/,e:/\]/,r:0,c:[e.BE]}]},e.TM={cN:"title",b:e.IR,r:0},e.UTM={cN:"title",b:e.UIR,r:0},e.METHOD_GUARD={b:"\\.\\s*"+e.UIR,r:0},e});hljs.registerLanguage("sql",function(e){var t=e.C("--","$");return{cI:!0,i:/[<>{}*#]/,c:[{bK:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke comment",e:/;/,eW:!0,l:/[\w\.]+/,k:{keyword:"abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound buffer_cache buffer_pool build bulk by byte byteordermark bytes cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain export export_set extended extent external external_1 external_2 externally extract failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour http id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists keep keep_duplicates key keys kill language large last last_day last_insert_id last_value lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second section securefile security seed segment select self sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime table tables tablespace tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text varchar varying void"},c:[{cN:"string",b:"'",e:"'",c:[e.BE,{b:"''"}]},{cN:"string",b:'"',e:'"',c:[e.BE,{b:'""'}]},{cN:"string",b:"`",e:"`",c:[e.BE]},e.CNM,e.CBCM,t]},e.CBCM,t]}});hljs.registerLanguage("xml",function(s){var e="[A-Za-z0-9\\._:-]+",t={eW:!0,i:/,r:0,c:[{cN:"attr",b:e,r:0},{b:/=\s*/,r:0,c:[{cN:"string",endsParent:!0,v:[{b:/"/,e:/"/},{b:/'/,e:/'/},{b:/[^\s"'=<>`]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist"],cI:!0,c:[{cN:"meta",b:"",r:10,c:[{b:"\\[",e:"\\]"}]},s.C("",{r:10}),{b:"<\\!\\[CDATA\\[",e:"\\]\\]>",r:10},{b:/<\?(php)?/,e:/\?>/,sL:"php",c:[{b:"/\\*",e:"\\*/",skip:!0}]},{cN:"tag",b:"",rE:!0,sL:["css","xml"]}},{cN:"tag",b:"",rE:!0,sL:["actionscript","javascript","handlebars","xml"]}},{cN:"meta",v:[{b:/<\?xml/,e:/\?>/,r:10},{b:/<\?\w+/,e:/\?>/}]},{cN:"tag",b:"?",e:"/?>",c:[{cN:"name",b:/[^\/><\s]+/,r:0},t]}]}});hljs.registerLanguage("python",function(e){var r={cN:"meta",b:/^(>>>|\.\.\.) /},b={cN:"string",c:[e.BE],v:[{b:/(u|b)?r?'''/,e:/'''/,c:[r],r:10},{b:/(u|b)?r?"""/,e:/"""/,c:[r],r:10},{b:/(u|r|ur)'/,e:/'/,r:10},{b:/(u|r|ur)"/,e:/"/,r:10},{b:/(b|br)'/,e:/'/},{b:/(b|br)"/,e:/"/},e.ASM,e.QSM]},a={cN:"number",r:0,v:[{b:e.BNR+"[lLjJ]?"},{b:"\\b(0o[0-7]+)[lLjJ]?"},{b:e.CNR+"[lLjJ]?"}]},l={cN:"params",b:/\(/,e:/\)/,c:["self",r,a,b]};return{aliases:["py","gyp"],k:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},i:/(<\/|->|\?)|=>/,c:[r,a,b,e.HCM,{v:[{cN:"function",bK:"def"},{cN:"class",bK:"class"}],e:/:/,i:/[${=;\n,]/,c:[e.UTM,l,{b:/->/,eW:!0,k:"None"}]},{cN:"meta",b:/^[\t ]*@/,e:/$/},{b:/\b(print|exec)\(/}]}});hljs.registerLanguage("makefile",function(e){var a={cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]};return{aliases:["mk","mak"],c:[e.HCM,{b:/^\w+\s*\W*=/,rB:!0,r:0,starts:{e:/\s*\W*=/,eE:!0,starts:{e:/$/,r:0,c:[a]}}},{cN:"section",b:/^[\w]+:\s*$/},{cN:"meta",b:/^\.PHONY:/,e:/$/,k:{"meta-keyword":".PHONY"},l:/[\.\w]+/},{b:/^\t+/,e:/$/,r:0,c:[e.QSM,a]}]}});hljs.registerLanguage("cpp",function(t){var e={cN:"keyword",b:"\\b[a-z\\d_]*_t\\b"},r={cN:"string",v:[{b:'(u8?|U)?L?"',e:'"',i:"\\n",c:[t.BE]},{b:'(u8?|U)?R"',e:'"',c:[t.BE]},{b:"'\\\\?.",e:"'",i:"."}]},s={cN:"number",v:[{b:"\\b(0b[01']+)"},{b:"\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{b:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],r:0},i={cN:"meta",b:/#\s*[a-z]+\b/,e:/$/,k:{"meta-keyword":"if else elif endif define undef warning error line pragma ifdef ifndef include"},c:[{b:/\\\n/,r:0},t.inherit(r,{cN:"meta-string"}),{cN:"meta-string",b:"<",e:">",i:"\\n"},t.CLCM,t.CBCM]},a=t.IR+"\\s*\\(",c={keyword:"int float while private char catch import module export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignof constexpr decltype noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong new throw return",built_in:"std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr",literal:"true false nullptr NULL"},n=[e,t.CLCM,t.CBCM,s,r];return{aliases:["c","cc","h","c++","h++","hpp"],k:c,i:"",c:n.concat([i,{b:"\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",e:">",k:c,c:["self",e]},{b:t.IR+"::",k:c},{v:[{b:/=/,e:/;/},{b:/\(/,e:/\)/},{bK:"new throw return else",e:/;/}],k:c,c:n.concat([{b:/\(/,e:/\)/,k:c,c:n.concat(["self"]),r:0}]),r:0},{cN:"function",b:"("+t.IR+"[\\*&\\s]+)+"+a,rB:!0,e:/[{;=]/,eE:!0,k:c,i:/[^\w\s\*&]/,c:[{b:a,rB:!0,c:[t.TM],r:0},{cN:"params",b:/\(/,e:/\)/,k:c,r:0,c:[t.CLCM,t.CBCM,r,s,e]},t.CLCM,t.CBCM,i]}]),exports:{preprocessor:i,strings:r,k:c}}});hljs.registerLanguage("nginx",function(e){var r={cN:"variable",v:[{b:/\$\d+/},{b:/\$\{/,e:/}/},{b:"[\\$\\@]"+e.UIR}]},b={eW:!0,l:"[a-z/_]+",k:{literal:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},r:0,i:"=>",c:[e.HCM,{cN:"string",c:[e.BE,r],v:[{b:/"/,e:/"/},{b:/'/,e:/'/}]},{b:"([a-z]+):/",e:"\\s",eW:!0,eE:!0,c:[r]},{cN:"regexp",c:[e.BE,r],v:[{b:"\\s\\^",e:"\\s|{|;",rE:!0},{b:"~\\*?\\s+",e:"\\s|{|;",rE:!0},{b:"\\*(\\.[a-z\\-]+)+"},{b:"([a-z\\-]+\\.)+\\*"}]},{cN:"number",b:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{cN:"number",b:"\\b\\d+[kKmMgGdshdwy]*\\b",r:0},r]};return{aliases:["nginxconf"],c:[e.HCM,{b:e.UIR+"\\s+{",rB:!0,e:"{",c:[{cN:"section",b:e.UIR}],r:0},{b:e.UIR+"\\s",e:";|{",rB:!0,c:[{cN:"attribute",b:e.UIR,starts:b}],r:0}],i:"[^\\s\\}]"}});hljs.registerLanguage("ruby",function(e){var b="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",r={keyword:"and then defined module in return redo if BEGIN retry end for self when next until do begin unless END rescue else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",literal:"true false nil"},c={cN:"doctag",b:"@[A-Za-z]+"},a={b:"#<",e:">"},s=[e.C("#","$",{c:[c]}),e.C("^\\=begin","^\\=end",{c:[c],r:10}),e.C("^__END__","\\n$")],n={cN:"subst",b:"#\\{",e:"}",k:r},t={cN:"string",c:[e.BE,n],v:[{b:/'/,e:/'/},{b:/"/,e:/"/},{b:/`/,e:/`/},{b:"%[qQwWx]?\\(",e:"\\)"},{b:"%[qQwWx]?\\[",e:"\\]"},{b:"%[qQwWx]?{",e:"}"},{b:"%[qQwWx]?<",e:">"},{b:"%[qQwWx]?/",e:"/"},{b:"%[qQwWx]?%",e:"%"},{b:"%[qQwWx]?-",e:"-"},{b:"%[qQwWx]?\\|",e:"\\|"},{b:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/},{b:/<<(-?)\w+$/,e:/^\s*\w+$/}]},i={cN:"params",b:"\\(",e:"\\)",endsParent:!0,k:r},d=[t,a,{cN:"class",bK:"class module",e:"$|;",i:/=/,c:[e.inherit(e.TM,{b:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{b:"<\\s*",c:[{b:"("+e.IR+"::)?"+e.IR}]}].concat(s)},{cN:"function",bK:"def",e:"$|;",c:[e.inherit(e.TM,{b:b}),i].concat(s)},{b:e.IR+"::"},{cN:"symbol",b:e.UIR+"(\\!|\\?)?:",r:0},{cN:"symbol",b:":(?!\\s)",c:[t,{b:b}],r:0},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{cN:"params",b:/\|/,e:/\|/,k:r},{b:"("+e.RSR+")\\s*",c:[a,{cN:"regexp",c:[e.BE,n],i:/\n/,v:[{b:"/",e:"/[a-z]*"},{b:"%r{",e:"}[a-z]*"},{b:"%r\\(",e:"\\)[a-z]*"},{b:"%r!",e:"![a-z]*"},{b:"%r\\[",e:"\\][a-z]*"}]}].concat(s),r:0}].concat(s);n.c=d,i.c=d;var l="[>?]>",o="[\\w#]+\\(\\w+\\):\\d+:\\d+>",w="(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>",u=[{b:/^\s*=>/,starts:{e:"$",c:d}},{cN:"meta",b:"^("+l+"|"+o+"|"+w+")",starts:{e:"$",c:d}}];return{aliases:["rb","gemspec","podspec","thor","irb"],k:r,i:/\/\*/,c:s.concat(u).concat(d)}});hljs.registerLanguage("perl",function(e){var t="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when",r={cN:"subst",b:"[$@]\\{",e:"\\}",k:t},s={b:"->{",e:"}"},n={v:[{b:/\$\d/},{b:/[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/},{b:/[\$%@][^\s\w{]/,r:0}]},i=[e.BE,r,n],o=[n,e.HCM,e.C("^\\=\\w","\\=cut",{eW:!0}),s,{cN:"string",c:i,v:[{b:"q[qwxr]?\\s*\\(",e:"\\)",r:5},{b:"q[qwxr]?\\s*\\[",e:"\\]",r:5},{b:"q[qwxr]?\\s*\\{",e:"\\}",r:5},{b:"q[qwxr]?\\s*\\|",e:"\\|",r:5},{b:"q[qwxr]?\\s*\\<",e:"\\>",r:5},{b:"qw\\s+q",e:"q",r:5},{b:"'",e:"'",c:[e.BE]},{b:'"',e:'"'},{b:"`",e:"`",c:[e.BE]},{b:"{\\w+}",c:[],r:0},{b:"-?\\w+\\s*\\=\\>",c:[],r:0}]},{cN:"number",b:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",r:0},{b:"(\\/\\/|"+e.RSR+"|\\b(split|return|print|reverse|grep)\\b)\\s*",k:"split return print reverse grep",r:0,c:[e.HCM,{cN:"regexp",b:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",r:10},{cN:"regexp",b:"(m|qr)?/",e:"/[a-z]*",c:[e.BE],r:0}]},{cN:"function",bK:"sub",e:"(\\s*\\(.*?\\))?[;{]",eE:!0,r:5,c:[e.TM]},{b:"-\\w\\b",r:0},{b:"^__DATA__$",e:"^__END__$",sL:"mojolicious",c:[{b:"^@@.*",e:"$",cN:"comment"}]}];return r.c=o,s.c=o,{aliases:["pl","pm"],l:/[\w\.]+/,k:t,c:o}});hljs.registerLanguage("cs",function(e){var i={keyword:"abstract as base bool break byte case catch char checked const continue decimal default delegate do double else enum event explicit extern finally fixed float for foreach goto if implicit in int interface internal is lock long object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this try typeof uint ulong unchecked unsafe ushort using virtual void volatile while nameof add alias ascending async await by descending dynamic equals from get global group into join let on orderby partial remove select set value var where yield",literal:"null false true"},r={cN:"string",b:'@"',e:'"',c:[{b:'""'}]},t=e.inherit(r,{i:/\n/}),a={cN:"subst",b:"{",e:"}",k:i},n=e.inherit(a,{i:/\n/}),c={cN:"string",b:/\$"/,e:'"',i:/\n/,c:[{b:"{{"},{b:"}}"},e.BE,n]},s={cN:"string",b:/\$@"/,e:'"',c:[{b:"{{"},{b:"}}"},{b:'""'},a]},o=e.inherit(s,{i:/\n/,c:[{b:"{{"},{b:"}}"},{b:'""'},n]});a.c=[s,c,r,e.ASM,e.QSM,e.CNM,e.CBCM],n.c=[o,c,t,e.ASM,e.QSM,e.CNM,e.inherit(e.CBCM,{i:/\n/})];var l={v:[s,c,r,e.ASM,e.QSM]},b=e.IR+"(<"+e.IR+"(\\s*,\\s*"+e.IR+")*>)?(\\[\\])?";return{aliases:["csharp"],k:i,i:/::/,c:[e.C("///","$",{rB:!0,c:[{cN:"doctag",v:[{b:"///",r:0},{b:""},{b:"?",e:">"}]}]}),e.CLCM,e.CBCM,{cN:"meta",b:"#",e:"$",k:{"meta-keyword":"if else elif endif define undef warning error line region endregion pragma checksum"}},l,e.CNM,{bK:"class interface",e:/[{;=]/,i:/[^\s:]/,c:[e.TM,e.CLCM,e.CBCM]},{bK:"namespace",e:/[{;=]/,i:/[^\s:]/,c:[e.inherit(e.TM,{b:"[a-zA-Z](\\.?\\w)*"}),e.CLCM,e.CBCM]},{bK:"new return throw await",r:0},{cN:"function",b:"("+b+"\\s+)+"+e.IR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:i,c:[{b:e.IR+"\\s*\\(",rB:!0,c:[e.TM],r:0},{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,k:i,r:0,c:[l,e.CNM,e.CBCM]},e.CLCM,e.CBCM]}]}});hljs.registerLanguage("php",function(e){var c={b:"\\$+[a-zA-Z_-ÿ][a-zA-Z0-9_-ÿ]*"},i={cN:"meta",b:/<\?(php)?|\?>/},t={cN:"string",c:[e.BE,i],v:[{b:'b"',e:'"'},{b:"b'",e:"'"},e.inherit(e.ASM,{i:null}),e.inherit(e.QSM,{i:null})]},a={v:[e.BNM,e.CNM]};return{aliases:["php3","php4","php5","php6"],cI:!0,k:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",c:[e.HCM,e.C("//","$",{c:[i]}),e.C("/\\*","\\*/",{c:[{cN:"doctag",b:"@[A-Za-z]+"}]}),e.C("__halt_compiler.+?;",!1,{eW:!0,k:"__halt_compiler",l:e.UIR}),{cN:"string",b:/<<<['"]?\w+['"]?$/,e:/^\w+;?$/,c:[e.BE,{cN:"subst",v:[{b:/\$\w+/},{b:/\{\$/,e:/\}/}]}]},i,{cN:"keyword",b:/\$this\b/},c,{b:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{cN:"function",bK:"function",e:/[;{]/,eE:!0,i:"\\$|\\[|%",c:[e.UTM,{cN:"params",b:"\\(",e:"\\)",c:["self",c,e.CBCM,t,a]}]},{cN:"class",bK:"class interface",e:"{",eE:!0,i:/[:\(\$"]/,c:[{bK:"extends implements"},e.UTM]},{bK:"namespace",e:";",i:/[\.']/,c:[e.UTM]},{bK:"use",e:";",c:[e.UTM]},{b:"=>"},t,a]}});hljs.registerLanguage("json",function(e){var i={literal:"true false null"},n=[e.QSM,e.CNM],r={e:",",eW:!0,eE:!0,c:n,k:i},t={b:"{",e:"}",c:[{cN:"attr",b:/"/,e:/"/,c:[e.BE],i:"\\n"},e.inherit(r,{b:/:/})],i:"\\S"},c={b:"\\[",e:"\\]",c:[e.inherit(r)],i:"\\S"};return n.splice(n.length,0,t,c),{c:n,k:i,i:"\\S"}});hljs.registerLanguage("javascript",function(e){var r="[A-Za-z$_][0-9A-Za-z$_]*",t={keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await static import from as",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},a={cN:"number",v:[{b:"\\b(0[bB][01]+)"},{b:"\\b(0[oO][0-7]+)"},{b:e.CNR}],r:0},n={cN:"subst",b:"\\$\\{",e:"\\}",k:t,c:[]},c={cN:"string",b:"`",e:"`",c:[e.BE,n]};n.c=[e.ASM,e.QSM,c,a,e.RM];var s=n.c.concat([e.CBCM,e.CLCM]);return{aliases:["js","jsx"],k:t,c:[{cN:"meta",r:10,b:/^\s*['"]use (strict|asm)['"]/},{cN:"meta",b:/^#!/,e:/$/},e.ASM,e.QSM,c,e.CLCM,e.CBCM,a,{b:/[{,]\s*/,r:0,c:[{b:r+"\\s*:",rB:!0,r:0,c:[{cN:"attr",b:r,r:0}]}]},{b:"("+e.RSR+"|\\b(case|return|throw)\\b)\\s*",k:"return throw case",c:[e.CLCM,e.CBCM,e.RM,{cN:"function",b:"(\\(.*?\\)|"+r+")\\s*=>",rB:!0,e:"\\s*=>",c:[{cN:"params",v:[{b:r},{b:/\(\s*\)/},{b:/\(/,e:/\)/,eB:!0,eE:!0,k:t,c:s}]}]},{b:/,e:/(\/\w+|\w+\/)>/,sL:"xml",c:[{b:/<\w+\s*\/>/,skip:!0},{b:/<\w+/,e:/(\/\w+|\w+\/)>/,skip:!0,c:[{b:/<\w+\s*\/>/,skip:!0},"self"]}]}],r:0},{cN:"function",bK:"function",e:/\{/,eE:!0,c:[e.inherit(e.TM,{b:r}),{cN:"params",b:/\(/,e:/\)/,eB:!0,eE:!0,c:s}],i:/\[|%/},{b:/\$[(.]/},e.METHOD_GUARD,{cN:"class",bK:"class",e:/[{;=]/,eE:!0,i:/[:"\[\]]/,c:[{bK:"extends"},e.UTM]},{bK:"constructor",e:/\{/,eE:!0}],i:/#(?!!)/}});hljs.registerLanguage("ini",function(e){var b={cN:"string",c:[e.BE],v:[{b:"'''",e:"'''",r:10},{b:'"""',e:'"""',r:10},{b:'"',e:'"'},{b:"'",e:"'"}]};return{aliases:["toml"],cI:!0,i:/\S/,c:[e.C(";","$"),e.HCM,{cN:"section",b:/^\s*\[+/,e:/\]+/},{b:/^[a-z0-9\[\]_-]+\s*=\s*/,e:"$",rB:!0,c:[{cN:"attr",b:/[a-z0-9\[\]_-]+/},{b:/=/,eW:!0,r:0,c:[{cN:"literal",b:/\bon|off|true|false|yes|no\b/},{cN:"variable",v:[{b:/\$[\w\d"][\w\d_]*/},{b:/\$\{(.*?)}/}]},b,{cN:"number",b:/([\+\-]+)?[\d]+_[\d_]+/},e.NM]}]}]}});hljs.registerLanguage("diff",function(e){return{aliases:["patch"],c:[{cN:"meta",r:10,v:[{b:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{b:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{b:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{cN:"comment",v:[{b:/Index: /,e:/$/},{b:/={3,}/,e:/$/},{b:/^\-{3}/,e:/$/},{b:/^\*{3} /,e:/$/},{b:/^\+{3}/,e:/$/},{b:/\*{5}/,e:/\*{5}$/}]},{cN:"addition",b:"^\\+",e:"$"},{cN:"deletion",b:"^\\-",e:"$"},{cN:"addition",b:"^\\!",e:"$"}]}});hljs.registerLanguage("coffeescript",function(e){var c={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",built_in:"npm require console print module global window document"},n="[A-Za-z$_][0-9A-Za-z$_]*",r={cN:"subst",b:/#\{/,e:/}/,k:c},s=[e.BNM,e.inherit(e.CNM,{starts:{e:"(\\s*/)?",r:0}}),{cN:"string",v:[{b:/'''/,e:/'''/,c:[e.BE]},{b:/'/,e:/'/,c:[e.BE]},{b:/"""/,e:/"""/,c:[e.BE,r]},{b:/"/,e:/"/,c:[e.BE,r]}]},{cN:"regexp",v:[{b:"///",e:"///",c:[r,e.HCM]},{b:"//[gim]*",r:0},{b:/\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/}]},{b:"@"+n},{b:"`",e:"`",eB:!0,eE:!0,sL:"javascript"}];r.c=s;var i=e.inherit(e.TM,{b:n}),t="(\\(.*\\))?\\s*\\B[-=]>",o={cN:"params",b:"\\([^\\(]",rB:!0,c:[{b:/\(/,e:/\)/,k:c,c:["self"].concat(s)}]};return{aliases:["coffee","cson","iced"],k:c,i:/\/\*/,c:s.concat([e.C("###","###"),e.HCM,{cN:"function",b:"^\\s*"+n+"\\s*=\\s*"+t,e:"[-=]>",rB:!0,c:[i,o]},{b:/[:\(,=]\s*/,r:0,c:[{cN:"function",b:t,e:"[-=]>",rB:!0,c:[o]}]},{cN:"class",bK:"class",e:"$",i:/[:="\[\]]/,c:[{bK:"extends",eW:!0,i:/[:="\[\]]/,c:[i]},i]},{b:n+":",e:":",rB:!0,rE:!0,r:0}])}});hljs.registerLanguage("objectivec",function(e){var t={cN:"built_in",b:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},_={keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required @encode @package @import @defs @compatibility_alias __bridge __bridge_transfer __bridge_retained __bridge_retain __covariant __contravariant __kindof _Nonnull _Nullable _Null_unspecified __FUNCTION__ __PRETTY_FUNCTION__ __attribute__ getter setter retain unsafe_unretained nonnull nullable null_unspecified null_resettable class instancetype NS_DESIGNATED_INITIALIZER NS_UNAVAILABLE NS_REQUIRES_SUPER NS_RETURNS_INNER_POINTER NS_INLINE NS_AVAILABLE NS_DEPRECATED NS_ENUM NS_OPTIONS NS_SWIFT_UNAVAILABLE NS_ASSUME_NONNULL_BEGIN NS_ASSUME_NONNULL_END NS_REFINED_FOR_SWIFT NS_SWIFT_NAME NS_SWIFT_NOTHROW NS_DURING NS_HANDLER NS_ENDHANDLER NS_VALUERETURN NS_VOIDRETURN",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},i=/[a-zA-Z@][a-zA-Z0-9_]*/,n="@interface @class @protocol @implementation";return{aliases:["mm","objc","obj-c"],k:_,l:i,i:"",c:[t,e.CLCM,e.CBCM,e.CNM,e.QSM,{cN:"string",v:[{b:'@"',e:'"',i:"\\n",c:[e.BE]},{b:"'",e:"[^\\\\]'",i:"[^\\\\][^']"}]},{cN:"meta",b:"#",e:"$",c:[{cN:"meta-string",v:[{b:'"',e:'"'},{b:"<",e:">"}]}]},{cN:"class",b:"("+n.split(" ").join("|")+")\\b",e:"({|$)",eE:!0,k:n,l:i,c:[e.UTM]},{b:"\\."+e.UIR,r:0}]}});hljs.registerLanguage("http",function(e){var t="HTTP/[0-9\\.]+";return{aliases:["https"],i:"\\S",c:[{b:"^"+t,e:"$",c:[{cN:"number",b:"\\b\\d{3}\\b"}]},{b:"^[A-Z]+ (.*?) "+t+"$",rB:!0,e:"$",c:[{cN:"string",b:" ",e:" ",eB:!0,eE:!0},{b:t},{cN:"keyword",b:"[A-Z]+"}]},{cN:"attribute",b:"^\\w",e:": ",eE:!0,i:"\\n|\\s|=",starts:{e:"$",r:0}},{b:"\\n\\n",starts:{sL:[],eW:!0}}]}});hljs.registerLanguage("css",function(e){var c="[a-zA-Z-][a-zA-Z0-9_-]*",t={b:/[A-Z\_\.\-]+\s*:/,rB:!0,e:";",eW:!0,c:[{cN:"attribute",b:/\S/,e:":",eE:!0,starts:{eW:!0,eE:!0,c:[{b:/[\w-]+\(/,rB:!0,c:[{cN:"built_in",b:/[\w-]+/},{b:/\(/,e:/\)/,c:[e.ASM,e.QSM]}]},e.CSSNM,e.QSM,e.ASM,e.CBCM,{cN:"number",b:"#[0-9A-Fa-f]+"},{cN:"meta",b:"!important"}]}}]};return{cI:!0,i:/[=\/|'\$]/,c:[e.CBCM,{cN:"selector-id",b:/#[A-Za-z0-9_-]+/},{cN:"selector-class",b:/\.[A-Za-z0-9_-]+/},{cN:"selector-attr",b:/\[/,e:/\]/,i:"$"},{cN:"selector-pseudo",b:/:(:)?[a-zA-Z0-9\_\-\+\(\)"'.]+/},{b:"@(font-face|page)",l:"[a-z-]+",k:"font-face page"},{b:"@",e:"[{;]",i:/:/,c:[{cN:"keyword",b:/\w+/},{b:/\s/,eW:!0,eE:!0,r:0,c:[e.ASM,e.QSM,e.CSSNM]}]},{cN:"selector-tag",b:c,r:0},{b:"{",e:"}",i:/\S/,c:[e.CBCM,t]}]}});hljs.registerLanguage("java",function(e){var a="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",t=a+"(<"+a+"(\\s*,\\s*"+a+")*>)?",r="false synchronized int abstract float private char boolean static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private module requires exports do",s="\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",c={cN:"number",b:s,r:0};return{aliases:["jsp"],k:r,i:/<\/|#/,c:[e.C("/\\*\\*","\\*/",{r:0,c:[{b:/\w+@/,r:0},{cN:"doctag",b:"@[A-Za-z]+"}]}),e.CLCM,e.CBCM,e.ASM,e.QSM,{cN:"class",bK:"class interface",e:/[{;=]/,eE:!0,k:"class interface",i:/[:"\[\]]/,c:[{bK:"extends implements"},e.UTM]},{bK:"new throw return else",r:0},{cN:"function",b:"("+t+"\\s+)+"+e.UIR+"\\s*\\(",rB:!0,e:/[{;=]/,eE:!0,k:r,c:[{b:e.UIR+"\\s*\\(",rB:!0,r:0,c:[e.UTM]},{cN:"params",b:/\(/,e:/\)/,k:r,r:0,c:[e.ASM,e.QSM,e.CNM,e.CBCM]},e.CLCM,e.CBCM]},c,{cN:"meta",b:"@[A-Za-z]+"}]}});hljs.registerLanguage("bash",function(e){var t={cN:"variable",v:[{b:/\$[\w\d#@][\w\d_]*/},{b:/\$\{(.*?)}/}]},s={cN:"string",b:/"/,e:/"/,c:[e.BE,t,{cN:"variable",b:/\$\(/,e:/\)/,c:[e.BE]}]},a={cN:"string",b:/'/,e:/'/};return{aliases:["sh","zsh"],l:/-?[a-z\._]+/,k:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",_:"-ne -eq -lt -gt -f -d -e -s -l -a"},c:[{cN:"meta",b:/^#![^\n]+sh\s*$/,r:10},{cN:"function",b:/\w[\w\d_]*\s*\(\s*\)\s*\{/,rB:!0,c:[e.inherit(e.TM,{b:/\w[\w\d_]*/})],r:0},e.HCM,s,a,t]}});hljs.registerLanguage("markdown",function(e){return{aliases:["md","mkdown","mkd"],c:[{cN:"section",v:[{b:"^#{1,6}",e:"$"},{b:"^.+?\\n[=-]{2,}$"}]},{b:"<",e:">",sL:"xml",r:0},{cN:"bullet",b:"^([*+-]|(\\d+\\.))\\s+"},{cN:"strong",b:"[*_]{2}.+?[*_]{2}"},{cN:"emphasis",v:[{b:"\\*.+?\\*"},{b:"_.+?_",r:0}]},{cN:"quote",b:"^>\\s+",e:"$"},{cN:"code",v:[{b:"^```w*s*$",e:"^```s*$"},{b:"`.+?`"},{b:"^( {4}| )",e:"$",r:0}]},{b:"^[-\\*]{3,}",e:"$"},{b:"\\[.+?\\][\\(\\[].*?[\\)\\]]",rB:!0,c:[{cN:"string",b:"\\[",e:"\\]",eB:!0,rE:!0,r:0},{cN:"link",b:"\\]\\(",e:"\\)",eB:!0,eE:!0},{cN:"symbol",b:"\\]\\[",e:"\\]",eB:!0,eE:!0}],r:10},{b:/^\[[^\n]+\]:/,rB:!0,c:[{cN:"symbol",b:/\[/,e:/\]/,eB:!0,eE:!0},{cN:"link",b:/:\s*/,e:/$/,eB:!0}]}]}});hljs.registerLanguage("apache",function(e){var r={cN:"number",b:"[\\$%]\\d+"};return{aliases:["apacheconf"],cI:!0,c:[e.HCM,{cN:"section",b:"?",e:">"},{cN:"attribute",b:/\w+/,r:0,k:{nomarkup:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{e:/$/,r:0,k:{literal:"on off all"},c:[{cN:"meta",b:"\\s\\[",e:"\\]$"},{cN:"variable",b:"[\\$%]\\{",e:"\\}",c:["self",r]},r,e.QSM]}}],i:/\S/}});
\ No newline at end of file
diff --git a/collectedstatic/highlight/styles/agate.css b/collectedstatic/highlight/styles/agate.css
deleted file mode 100644
index 8d64547..0000000
--- a/collectedstatic/highlight/styles/agate.css
+++ /dev/null
@@ -1,108 +0,0 @@
-/*!
- * Agate by Taufik Nurrohman
- * ----------------------------------------------------
- *
- * #ade5fc
- * #a2fca2
- * #c6b4f0
- * #d36363
- * #fcc28c
- * #fc9b9b
- * #ffa
- * #fff
- * #333
- * #62c8f3
- * #888
- *
- */
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #333;
- color: white;
-}
-
-.hljs-name,
-.hljs-strong {
- font-weight: bold;
-}
-
-.hljs-code,
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-tag {
- color: #62c8f3;
-}
-
-.hljs-variable,
-.hljs-template-variable,
-.hljs-selector-id,
-.hljs-selector-class {
- color: #ade5fc;
-}
-
-.hljs-string,
-.hljs-bullet {
- color: #a2fca2;
-}
-
-.hljs-type,
-.hljs-title,
-.hljs-section,
-.hljs-attribute,
-.hljs-quote,
-.hljs-built_in,
-.hljs-builtin-name {
- color: #ffa;
-}
-
-.hljs-number,
-.hljs-symbol,
-.hljs-bullet {
- color: #d36363;
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-literal {
- color: #fcc28c;
-}
-
-.hljs-comment,
-.hljs-deletion,
-.hljs-code {
- color: #888;
-}
-
-.hljs-regexp,
-.hljs-link {
- color: #c6b4f0;
-}
-
-.hljs-meta {
- color: #fc9b9b;
-}
-
-.hljs-deletion {
- background-color: #fc9b9b;
- color: #333;
-}
-
-.hljs-addition {
- background-color: #a2fca2;
- color: #333;
-}
-
-.hljs a {
- color: inherit;
-}
-
-.hljs a:focus,
-.hljs a:hover {
- color: inherit;
- text-decoration: underline;
-}
diff --git a/collectedstatic/highlight/styles/androidstudio.css b/collectedstatic/highlight/styles/androidstudio.css
deleted file mode 100644
index bc8e473..0000000
--- a/collectedstatic/highlight/styles/androidstudio.css
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
-Date: 24 Fev 2015
-Author: Pedro Oliveira
-*/
-
-.hljs {
- color: #a9b7c6;
- background: #282b2e;
- display: block;
- overflow-x: auto;
- padding: 0.5em;
-}
-
-.hljs-number,
-.hljs-literal,
-.hljs-symbol,
-.hljs-bullet {
- color: #6897BB;
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-deletion {
- color: #cc7832;
-}
-
-.hljs-variable,
-.hljs-template-variable,
-.hljs-link {
- color: #629755;
-}
-
-.hljs-comment,
-.hljs-quote {
- color: #808080;
-}
-
-.hljs-meta {
- color: #bbb529;
-}
-
-.hljs-string,
-.hljs-attribute,
-.hljs-addition {
- color: #6A8759;
-}
-
-.hljs-section,
-.hljs-title,
-.hljs-type {
- color: #ffc66d;
-}
-
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class {
- color: #e8bf6a;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/arduino-light.css b/collectedstatic/highlight/styles/arduino-light.css
deleted file mode 100644
index 4b8b7fd..0000000
--- a/collectedstatic/highlight/styles/arduino-light.css
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-
-Arduino® Light Theme - Stefania Mellai
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #FFFFFF;
-}
-
-.hljs,
-.hljs-subst {
- color: #434f54;
-}
-
-.hljs-keyword,
-.hljs-attribute,
-.hljs-selector-tag,
-.hljs-doctag,
-.hljs-name {
- color: #00979D;
-}
-
-.hljs-built_in,
-.hljs-literal,
-.hljs-bullet,
-.hljs-code,
-.hljs-addition {
- color: #D35400;
-}
-
-.hljs-regexp,
-.hljs-symbol,
-.hljs-variable,
-.hljs-template-variable,
-.hljs-link,
-.hljs-selector-attr,
-.hljs-selector-pseudo {
- color: #00979D;
-}
-
-.hljs-type,
-.hljs-string,
-.hljs-selector-id,
-.hljs-selector-class,
-.hljs-quote,
-.hljs-template-tag,
-.hljs-deletion {
- color: #005C5F;
-}
-
-.hljs-title,
-.hljs-section {
- color: #880000;
- font-weight: bold;
-}
-
-.hljs-comment {
- color: rgba(149,165,166,.8);
-}
-
-.hljs-meta-keyword {
- color: #728E00;
-}
-
-.hljs-meta {
- color: #728E00;
- color: #434f54;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
-
-.hljs-function {
- color: #728E00;
-}
-
-.hljs-number {
- color: #8A7B52;
-}
diff --git a/collectedstatic/highlight/styles/arta.css b/collectedstatic/highlight/styles/arta.css
deleted file mode 100644
index 75ef3a9..0000000
--- a/collectedstatic/highlight/styles/arta.css
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
-Date: 17.V.2011
-Author: pumbur
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #222;
-}
-
-.hljs,
-.hljs-subst {
- color: #aaa;
-}
-
-.hljs-section {
- color: #fff;
-}
-
-.hljs-comment,
-.hljs-quote,
-.hljs-meta {
- color: #444;
-}
-
-.hljs-string,
-.hljs-symbol,
-.hljs-bullet,
-.hljs-regexp {
- color: #ffcc33;
-}
-
-.hljs-number,
-.hljs-addition {
- color: #00cc66;
-}
-
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-literal,
-.hljs-type,
-.hljs-template-variable,
-.hljs-attribute,
-.hljs-link {
- color: #32aaee;
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class {
- color: #6644aa;
-}
-
-.hljs-title,
-.hljs-variable,
-.hljs-deletion,
-.hljs-template-tag {
- color: #bb1166;
-}
-
-.hljs-section,
-.hljs-doctag,
-.hljs-strong {
- font-weight: bold;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
diff --git a/collectedstatic/highlight/styles/ascetic.css b/collectedstatic/highlight/styles/ascetic.css
deleted file mode 100644
index 48397e8..0000000
--- a/collectedstatic/highlight/styles/ascetic.css
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
-
-Original style from softwaremaniacs.org (c) Ivan Sagalaev
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: white;
- color: black;
-}
-
-.hljs-string,
-.hljs-variable,
-.hljs-template-variable,
-.hljs-symbol,
-.hljs-bullet,
-.hljs-section,
-.hljs-addition,
-.hljs-attribute,
-.hljs-link {
- color: #888;
-}
-
-.hljs-comment,
-.hljs-quote,
-.hljs-meta,
-.hljs-deletion {
- color: #ccc;
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-section,
-.hljs-name,
-.hljs-type,
-.hljs-strong {
- font-weight: bold;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
diff --git a/collectedstatic/highlight/styles/atelier-cave-dark.css b/collectedstatic/highlight/styles/atelier-cave-dark.css
deleted file mode 100644
index 65428f3..0000000
--- a/collectedstatic/highlight/styles/atelier-cave-dark.css
+++ /dev/null
@@ -1,83 +0,0 @@
-/* Base16 Atelier Cave Dark - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */
-/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
-
-/* Atelier-Cave Comment */
-.hljs-comment,
-.hljs-quote {
- color: #7e7887;
-}
-
-/* Atelier-Cave Red */
-.hljs-variable,
-.hljs-template-variable,
-.hljs-attribute,
-.hljs-regexp,
-.hljs-link,
-.hljs-tag,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class {
- color: #be4678;
-}
-
-/* Atelier-Cave Orange */
-.hljs-number,
-.hljs-meta,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-literal,
-.hljs-type,
-.hljs-params {
- color: #aa573c;
-}
-
-/* Atelier-Cave Green */
-.hljs-string,
-.hljs-symbol,
-.hljs-bullet {
- color: #2a9292;
-}
-
-/* Atelier-Cave Blue */
-.hljs-title,
-.hljs-section {
- color: #576ddb;
-}
-
-/* Atelier-Cave Purple */
-.hljs-keyword,
-.hljs-selector-tag {
- color: #955ae7;
-}
-
-.hljs-deletion,
-.hljs-addition {
- color: #19171c;
- display: inline-block;
- width: 100%;
-}
-
-.hljs-deletion {
- background-color: #be4678;
-}
-
-.hljs-addition {
- background-color: #2a9292;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #19171c;
- color: #8b8792;
- padding: 0.5em;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/atelier-cave-light.css b/collectedstatic/highlight/styles/atelier-cave-light.css
deleted file mode 100644
index b419f9f..0000000
--- a/collectedstatic/highlight/styles/atelier-cave-light.css
+++ /dev/null
@@ -1,85 +0,0 @@
-/* Base16 Atelier Cave Light - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/cave) */
-/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
-
-/* Atelier-Cave Comment */
-.hljs-comment,
-.hljs-quote {
- color: #655f6d;
-}
-
-/* Atelier-Cave Red */
-.hljs-variable,
-.hljs-template-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-name,
-.hljs-regexp,
-.hljs-link,
-.hljs-name,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class {
- color: #be4678;
-}
-
-/* Atelier-Cave Orange */
-.hljs-number,
-.hljs-meta,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-literal,
-.hljs-type,
-.hljs-params {
- color: #aa573c;
-}
-
-/* Atelier-Cave Green */
-.hljs-string,
-.hljs-symbol,
-.hljs-bullet {
- color: #2a9292;
-}
-
-/* Atelier-Cave Blue */
-.hljs-title,
-.hljs-section {
- color: #576ddb;
-}
-
-/* Atelier-Cave Purple */
-.hljs-keyword,
-.hljs-selector-tag {
- color: #955ae7;
-}
-
-.hljs-deletion,
-.hljs-addition {
- color: #19171c;
- display: inline-block;
- width: 100%;
-}
-
-.hljs-deletion {
- background-color: #be4678;
-}
-
-.hljs-addition {
- background-color: #2a9292;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #efecf4;
- color: #585260;
- padding: 0.5em;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/atelier-dune-dark.css b/collectedstatic/highlight/styles/atelier-dune-dark.css
deleted file mode 100644
index 1684f52..0000000
--- a/collectedstatic/highlight/styles/atelier-dune-dark.css
+++ /dev/null
@@ -1,69 +0,0 @@
-/* Base16 Atelier Dune Dark - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */
-/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
-
-/* Atelier-Dune Comment */
-.hljs-comment,
-.hljs-quote {
- color: #999580;
-}
-
-/* Atelier-Dune Red */
-.hljs-variable,
-.hljs-template-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-name,
-.hljs-regexp,
-.hljs-link,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class {
- color: #d73737;
-}
-
-/* Atelier-Dune Orange */
-.hljs-number,
-.hljs-meta,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-literal,
-.hljs-type,
-.hljs-params {
- color: #b65611;
-}
-
-/* Atelier-Dune Green */
-.hljs-string,
-.hljs-symbol,
-.hljs-bullet {
- color: #60ac39;
-}
-
-/* Atelier-Dune Blue */
-.hljs-title,
-.hljs-section {
- color: #6684e1;
-}
-
-/* Atelier-Dune Purple */
-.hljs-keyword,
-.hljs-selector-tag {
- color: #b854d4;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #20201d;
- color: #a6a28c;
- padding: 0.5em;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/atelier-dune-light.css b/collectedstatic/highlight/styles/atelier-dune-light.css
deleted file mode 100644
index 547719d..0000000
--- a/collectedstatic/highlight/styles/atelier-dune-light.css
+++ /dev/null
@@ -1,69 +0,0 @@
-/* Base16 Atelier Dune Light - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/dune) */
-/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
-
-/* Atelier-Dune Comment */
-.hljs-comment,
-.hljs-quote {
- color: #7d7a68;
-}
-
-/* Atelier-Dune Red */
-.hljs-variable,
-.hljs-template-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-name,
-.hljs-regexp,
-.hljs-link,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class {
- color: #d73737;
-}
-
-/* Atelier-Dune Orange */
-.hljs-number,
-.hljs-meta,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-literal,
-.hljs-type,
-.hljs-params {
- color: #b65611;
-}
-
-/* Atelier-Dune Green */
-.hljs-string,
-.hljs-symbol,
-.hljs-bullet {
- color: #60ac39;
-}
-
-/* Atelier-Dune Blue */
-.hljs-title,
-.hljs-section {
- color: #6684e1;
-}
-
-/* Atelier-Dune Purple */
-.hljs-keyword,
-.hljs-selector-tag {
- color: #b854d4;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #fefbec;
- color: #6e6b5e;
- padding: 0.5em;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/atelier-estuary-dark.css b/collectedstatic/highlight/styles/atelier-estuary-dark.css
deleted file mode 100644
index a5e5071..0000000
--- a/collectedstatic/highlight/styles/atelier-estuary-dark.css
+++ /dev/null
@@ -1,84 +0,0 @@
-/* Base16 Atelier Estuary Dark - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/estuary) */
-/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
-
-/* Atelier-Estuary Comment */
-.hljs-comment,
-.hljs-quote {
- color: #878573;
-}
-
-/* Atelier-Estuary Red */
-.hljs-variable,
-.hljs-template-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-name,
-.hljs-regexp,
-.hljs-link,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class {
- color: #ba6236;
-}
-
-/* Atelier-Estuary Orange */
-.hljs-number,
-.hljs-meta,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-literal,
-.hljs-type,
-.hljs-params {
- color: #ae7313;
-}
-
-/* Atelier-Estuary Green */
-.hljs-string,
-.hljs-symbol,
-.hljs-bullet {
- color: #7d9726;
-}
-
-/* Atelier-Estuary Blue */
-.hljs-title,
-.hljs-section {
- color: #36a166;
-}
-
-/* Atelier-Estuary Purple */
-.hljs-keyword,
-.hljs-selector-tag {
- color: #5f9182;
-}
-
-.hljs-deletion,
-.hljs-addition {
- color: #22221b;
- display: inline-block;
- width: 100%;
-}
-
-.hljs-deletion {
- background-color: #ba6236;
-}
-
-.hljs-addition {
- background-color: #7d9726;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #22221b;
- color: #929181;
- padding: 0.5em;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/atelier-estuary-light.css b/collectedstatic/highlight/styles/atelier-estuary-light.css
deleted file mode 100644
index 1daee5d..0000000
--- a/collectedstatic/highlight/styles/atelier-estuary-light.css
+++ /dev/null
@@ -1,84 +0,0 @@
-/* Base16 Atelier Estuary Light - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/estuary) */
-/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
-
-/* Atelier-Estuary Comment */
-.hljs-comment,
-.hljs-quote {
- color: #6c6b5a;
-}
-
-/* Atelier-Estuary Red */
-.hljs-variable,
-.hljs-template-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-name,
-.hljs-regexp,
-.hljs-link,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class {
- color: #ba6236;
-}
-
-/* Atelier-Estuary Orange */
-.hljs-number,
-.hljs-meta,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-literal,
-.hljs-type,
-.hljs-params {
- color: #ae7313;
-}
-
-/* Atelier-Estuary Green */
-.hljs-string,
-.hljs-symbol,
-.hljs-bullet {
- color: #7d9726;
-}
-
-/* Atelier-Estuary Blue */
-.hljs-title,
-.hljs-section {
- color: #36a166;
-}
-
-/* Atelier-Estuary Purple */
-.hljs-keyword,
-.hljs-selector-tag {
- color: #5f9182;
-}
-
-.hljs-deletion,
-.hljs-addition {
- color: #22221b;
- display: inline-block;
- width: 100%;
-}
-
-.hljs-deletion {
- background-color: #ba6236;
-}
-
-.hljs-addition {
- background-color: #7d9726;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #f4f3ec;
- color: #5f5e4e;
- padding: 0.5em;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/atelier-forest-dark.css b/collectedstatic/highlight/styles/atelier-forest-dark.css
deleted file mode 100644
index 0ef4fae..0000000
--- a/collectedstatic/highlight/styles/atelier-forest-dark.css
+++ /dev/null
@@ -1,69 +0,0 @@
-/* Base16 Atelier Forest Dark - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */
-/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
-
-/* Atelier-Forest Comment */
-.hljs-comment,
-.hljs-quote {
- color: #9c9491;
-}
-
-/* Atelier-Forest Red */
-.hljs-variable,
-.hljs-template-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-name,
-.hljs-regexp,
-.hljs-link,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class {
- color: #f22c40;
-}
-
-/* Atelier-Forest Orange */
-.hljs-number,
-.hljs-meta,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-literal,
-.hljs-type,
-.hljs-params {
- color: #df5320;
-}
-
-/* Atelier-Forest Green */
-.hljs-string,
-.hljs-symbol,
-.hljs-bullet {
- color: #7b9726;
-}
-
-/* Atelier-Forest Blue */
-.hljs-title,
-.hljs-section {
- color: #407ee7;
-}
-
-/* Atelier-Forest Purple */
-.hljs-keyword,
-.hljs-selector-tag {
- color: #6666ea;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #1b1918;
- color: #a8a19f;
- padding: 0.5em;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/atelier-forest-light.css b/collectedstatic/highlight/styles/atelier-forest-light.css
deleted file mode 100644
index bbedde1..0000000
--- a/collectedstatic/highlight/styles/atelier-forest-light.css
+++ /dev/null
@@ -1,69 +0,0 @@
-/* Base16 Atelier Forest Light - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/forest) */
-/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
-
-/* Atelier-Forest Comment */
-.hljs-comment,
-.hljs-quote {
- color: #766e6b;
-}
-
-/* Atelier-Forest Red */
-.hljs-variable,
-.hljs-template-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-name,
-.hljs-regexp,
-.hljs-link,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class {
- color: #f22c40;
-}
-
-/* Atelier-Forest Orange */
-.hljs-number,
-.hljs-meta,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-literal,
-.hljs-type,
-.hljs-params {
- color: #df5320;
-}
-
-/* Atelier-Forest Green */
-.hljs-string,
-.hljs-symbol,
-.hljs-bullet {
- color: #7b9726;
-}
-
-/* Atelier-Forest Blue */
-.hljs-title,
-.hljs-section {
- color: #407ee7;
-}
-
-/* Atelier-Forest Purple */
-.hljs-keyword,
-.hljs-selector-tag {
- color: #6666ea;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #f1efee;
- color: #68615e;
- padding: 0.5em;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/atelier-heath-dark.css b/collectedstatic/highlight/styles/atelier-heath-dark.css
deleted file mode 100644
index fe01ff7..0000000
--- a/collectedstatic/highlight/styles/atelier-heath-dark.css
+++ /dev/null
@@ -1,69 +0,0 @@
-/* Base16 Atelier Heath Dark - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */
-/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
-
-/* Atelier-Heath Comment */
-.hljs-comment,
-.hljs-quote {
- color: #9e8f9e;
-}
-
-/* Atelier-Heath Red */
-.hljs-variable,
-.hljs-template-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-name,
-.hljs-regexp,
-.hljs-link,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class {
- color: #ca402b;
-}
-
-/* Atelier-Heath Orange */
-.hljs-number,
-.hljs-meta,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-literal,
-.hljs-type,
-.hljs-params {
- color: #a65926;
-}
-
-/* Atelier-Heath Green */
-.hljs-string,
-.hljs-symbol,
-.hljs-bullet {
- color: #918b3b;
-}
-
-/* Atelier-Heath Blue */
-.hljs-title,
-.hljs-section {
- color: #516aec;
-}
-
-/* Atelier-Heath Purple */
-.hljs-keyword,
-.hljs-selector-tag {
- color: #7b59c0;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #1b181b;
- color: #ab9bab;
- padding: 0.5em;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/atelier-heath-light.css b/collectedstatic/highlight/styles/atelier-heath-light.css
deleted file mode 100644
index ee43786..0000000
--- a/collectedstatic/highlight/styles/atelier-heath-light.css
+++ /dev/null
@@ -1,69 +0,0 @@
-/* Base16 Atelier Heath Light - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/heath) */
-/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
-
-/* Atelier-Heath Comment */
-.hljs-comment,
-.hljs-quote {
- color: #776977;
-}
-
-/* Atelier-Heath Red */
-.hljs-variable,
-.hljs-template-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-name,
-.hljs-regexp,
-.hljs-link,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class {
- color: #ca402b;
-}
-
-/* Atelier-Heath Orange */
-.hljs-number,
-.hljs-meta,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-literal,
-.hljs-type,
-.hljs-params {
- color: #a65926;
-}
-
-/* Atelier-Heath Green */
-.hljs-string,
-.hljs-symbol,
-.hljs-bullet {
- color: #918b3b;
-}
-
-/* Atelier-Heath Blue */
-.hljs-title,
-.hljs-section {
- color: #516aec;
-}
-
-/* Atelier-Heath Purple */
-.hljs-keyword,
-.hljs-selector-tag {
- color: #7b59c0;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #f7f3f7;
- color: #695d69;
- padding: 0.5em;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/atelier-lakeside-dark.css b/collectedstatic/highlight/styles/atelier-lakeside-dark.css
deleted file mode 100644
index a937d3b..0000000
--- a/collectedstatic/highlight/styles/atelier-lakeside-dark.css
+++ /dev/null
@@ -1,69 +0,0 @@
-/* Base16 Atelier Lakeside Dark - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside) */
-/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
-
-/* Atelier-Lakeside Comment */
-.hljs-comment,
-.hljs-quote {
- color: #7195a8;
-}
-
-/* Atelier-Lakeside Red */
-.hljs-variable,
-.hljs-template-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-name,
-.hljs-regexp,
-.hljs-link,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class {
- color: #d22d72;
-}
-
-/* Atelier-Lakeside Orange */
-.hljs-number,
-.hljs-meta,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-literal,
-.hljs-type,
-.hljs-params {
- color: #935c25;
-}
-
-/* Atelier-Lakeside Green */
-.hljs-string,
-.hljs-symbol,
-.hljs-bullet {
- color: #568c3b;
-}
-
-/* Atelier-Lakeside Blue */
-.hljs-title,
-.hljs-section {
- color: #257fad;
-}
-
-/* Atelier-Lakeside Purple */
-.hljs-keyword,
-.hljs-selector-tag {
- color: #6b6bb8;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #161b1d;
- color: #7ea2b4;
- padding: 0.5em;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/atelier-lakeside-light.css b/collectedstatic/highlight/styles/atelier-lakeside-light.css
deleted file mode 100644
index 6c7e8f9..0000000
--- a/collectedstatic/highlight/styles/atelier-lakeside-light.css
+++ /dev/null
@@ -1,69 +0,0 @@
-/* Base16 Atelier Lakeside Light - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/lakeside) */
-/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
-
-/* Atelier-Lakeside Comment */
-.hljs-comment,
-.hljs-quote {
- color: #5a7b8c;
-}
-
-/* Atelier-Lakeside Red */
-.hljs-variable,
-.hljs-template-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-name,
-.hljs-regexp,
-.hljs-link,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class {
- color: #d22d72;
-}
-
-/* Atelier-Lakeside Orange */
-.hljs-number,
-.hljs-meta,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-literal,
-.hljs-type,
-.hljs-params {
- color: #935c25;
-}
-
-/* Atelier-Lakeside Green */
-.hljs-string,
-.hljs-symbol,
-.hljs-bullet {
- color: #568c3b;
-}
-
-/* Atelier-Lakeside Blue */
-.hljs-title,
-.hljs-section {
- color: #257fad;
-}
-
-/* Atelier-Lakeside Purple */
-.hljs-keyword,
-.hljs-selector-tag {
- color: #6b6bb8;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #ebf8ff;
- color: #516d7b;
- padding: 0.5em;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/atelier-plateau-dark.css b/collectedstatic/highlight/styles/atelier-plateau-dark.css
deleted file mode 100644
index 3bb0526..0000000
--- a/collectedstatic/highlight/styles/atelier-plateau-dark.css
+++ /dev/null
@@ -1,84 +0,0 @@
-/* Base16 Atelier Plateau Dark - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/plateau) */
-/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
-
-/* Atelier-Plateau Comment */
-.hljs-comment,
-.hljs-quote {
- color: #7e7777;
-}
-
-/* Atelier-Plateau Red */
-.hljs-variable,
-.hljs-template-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-name,
-.hljs-regexp,
-.hljs-link,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class {
- color: #ca4949;
-}
-
-/* Atelier-Plateau Orange */
-.hljs-number,
-.hljs-meta,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-literal,
-.hljs-type,
-.hljs-params {
- color: #b45a3c;
-}
-
-/* Atelier-Plateau Green */
-.hljs-string,
-.hljs-symbol,
-.hljs-bullet {
- color: #4b8b8b;
-}
-
-/* Atelier-Plateau Blue */
-.hljs-title,
-.hljs-section {
- color: #7272ca;
-}
-
-/* Atelier-Plateau Purple */
-.hljs-keyword,
-.hljs-selector-tag {
- color: #8464c4;
-}
-
-.hljs-deletion,
-.hljs-addition {
- color: #1b1818;
- display: inline-block;
- width: 100%;
-}
-
-.hljs-deletion {
- background-color: #ca4949;
-}
-
-.hljs-addition {
- background-color: #4b8b8b;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #1b1818;
- color: #8a8585;
- padding: 0.5em;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/atelier-plateau-light.css b/collectedstatic/highlight/styles/atelier-plateau-light.css
deleted file mode 100644
index 5f0222b..0000000
--- a/collectedstatic/highlight/styles/atelier-plateau-light.css
+++ /dev/null
@@ -1,84 +0,0 @@
-/* Base16 Atelier Plateau Light - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/plateau) */
-/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
-
-/* Atelier-Plateau Comment */
-.hljs-comment,
-.hljs-quote {
- color: #655d5d;
-}
-
-/* Atelier-Plateau Red */
-.hljs-variable,
-.hljs-template-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-name,
-.hljs-regexp,
-.hljs-link,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class {
- color: #ca4949;
-}
-
-/* Atelier-Plateau Orange */
-.hljs-number,
-.hljs-meta,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-literal,
-.hljs-type,
-.hljs-params {
- color: #b45a3c;
-}
-
-/* Atelier-Plateau Green */
-.hljs-string,
-.hljs-symbol,
-.hljs-bullet {
- color: #4b8b8b;
-}
-
-/* Atelier-Plateau Blue */
-.hljs-title,
-.hljs-section {
- color: #7272ca;
-}
-
-/* Atelier-Plateau Purple */
-.hljs-keyword,
-.hljs-selector-tag {
- color: #8464c4;
-}
-
-.hljs-deletion,
-.hljs-addition {
- color: #1b1818;
- display: inline-block;
- width: 100%;
-}
-
-.hljs-deletion {
- background-color: #ca4949;
-}
-
-.hljs-addition {
- background-color: #4b8b8b;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #f4ecec;
- color: #585050;
- padding: 0.5em;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/atelier-savanna-dark.css b/collectedstatic/highlight/styles/atelier-savanna-dark.css
deleted file mode 100644
index 38f8314..0000000
--- a/collectedstatic/highlight/styles/atelier-savanna-dark.css
+++ /dev/null
@@ -1,84 +0,0 @@
-/* Base16 Atelier Savanna Dark - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/savanna) */
-/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
-
-/* Atelier-Savanna Comment */
-.hljs-comment,
-.hljs-quote {
- color: #78877d;
-}
-
-/* Atelier-Savanna Red */
-.hljs-variable,
-.hljs-template-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-name,
-.hljs-regexp,
-.hljs-link,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class {
- color: #b16139;
-}
-
-/* Atelier-Savanna Orange */
-.hljs-number,
-.hljs-meta,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-literal,
-.hljs-type,
-.hljs-params {
- color: #9f713c;
-}
-
-/* Atelier-Savanna Green */
-.hljs-string,
-.hljs-symbol,
-.hljs-bullet {
- color: #489963;
-}
-
-/* Atelier-Savanna Blue */
-.hljs-title,
-.hljs-section {
- color: #478c90;
-}
-
-/* Atelier-Savanna Purple */
-.hljs-keyword,
-.hljs-selector-tag {
- color: #55859b;
-}
-
-.hljs-deletion,
-.hljs-addition {
- color: #171c19;
- display: inline-block;
- width: 100%;
-}
-
-.hljs-deletion {
- background-color: #b16139;
-}
-
-.hljs-addition {
- background-color: #489963;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #171c19;
- color: #87928a;
- padding: 0.5em;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/atelier-savanna-light.css b/collectedstatic/highlight/styles/atelier-savanna-light.css
deleted file mode 100644
index 1ccd7c6..0000000
--- a/collectedstatic/highlight/styles/atelier-savanna-light.css
+++ /dev/null
@@ -1,84 +0,0 @@
-/* Base16 Atelier Savanna Light - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/savanna) */
-/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
-
-/* Atelier-Savanna Comment */
-.hljs-comment,
-.hljs-quote {
- color: #5f6d64;
-}
-
-/* Atelier-Savanna Red */
-.hljs-variable,
-.hljs-template-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-name,
-.hljs-regexp,
-.hljs-link,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class {
- color: #b16139;
-}
-
-/* Atelier-Savanna Orange */
-.hljs-number,
-.hljs-meta,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-literal,
-.hljs-type,
-.hljs-params {
- color: #9f713c;
-}
-
-/* Atelier-Savanna Green */
-.hljs-string,
-.hljs-symbol,
-.hljs-bullet {
- color: #489963;
-}
-
-/* Atelier-Savanna Blue */
-.hljs-title,
-.hljs-section {
- color: #478c90;
-}
-
-/* Atelier-Savanna Purple */
-.hljs-keyword,
-.hljs-selector-tag {
- color: #55859b;
-}
-
-.hljs-deletion,
-.hljs-addition {
- color: #171c19;
- display: inline-block;
- width: 100%;
-}
-
-.hljs-deletion {
- background-color: #b16139;
-}
-
-.hljs-addition {
- background-color: #489963;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #ecf4ee;
- color: #526057;
- padding: 0.5em;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/atelier-seaside-dark.css b/collectedstatic/highlight/styles/atelier-seaside-dark.css
deleted file mode 100644
index df29949..0000000
--- a/collectedstatic/highlight/styles/atelier-seaside-dark.css
+++ /dev/null
@@ -1,69 +0,0 @@
-/* Base16 Atelier Seaside Dark - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside) */
-/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
-
-/* Atelier-Seaside Comment */
-.hljs-comment,
-.hljs-quote {
- color: #809980;
-}
-
-/* Atelier-Seaside Red */
-.hljs-variable,
-.hljs-template-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-name,
-.hljs-regexp,
-.hljs-link,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class {
- color: #e6193c;
-}
-
-/* Atelier-Seaside Orange */
-.hljs-number,
-.hljs-meta,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-literal,
-.hljs-type,
-.hljs-params {
- color: #87711d;
-}
-
-/* Atelier-Seaside Green */
-.hljs-string,
-.hljs-symbol,
-.hljs-bullet {
- color: #29a329;
-}
-
-/* Atelier-Seaside Blue */
-.hljs-title,
-.hljs-section {
- color: #3d62f5;
-}
-
-/* Atelier-Seaside Purple */
-.hljs-keyword,
-.hljs-selector-tag {
- color: #ad2bee;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #131513;
- color: #8ca68c;
- padding: 0.5em;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/atelier-seaside-light.css b/collectedstatic/highlight/styles/atelier-seaside-light.css
deleted file mode 100644
index 9d960f2..0000000
--- a/collectedstatic/highlight/styles/atelier-seaside-light.css
+++ /dev/null
@@ -1,69 +0,0 @@
-/* Base16 Atelier Seaside Light - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/seaside) */
-/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
-
-/* Atelier-Seaside Comment */
-.hljs-comment,
-.hljs-quote {
- color: #687d68;
-}
-
-/* Atelier-Seaside Red */
-.hljs-variable,
-.hljs-template-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-name,
-.hljs-regexp,
-.hljs-link,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class {
- color: #e6193c;
-}
-
-/* Atelier-Seaside Orange */
-.hljs-number,
-.hljs-meta,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-literal,
-.hljs-type,
-.hljs-params {
- color: #87711d;
-}
-
-/* Atelier-Seaside Green */
-.hljs-string,
-.hljs-symbol,
-.hljs-bullet {
- color: #29a329;
-}
-
-/* Atelier-Seaside Blue */
-.hljs-title,
-.hljs-section {
- color: #3d62f5;
-}
-
-/* Atelier-Seaside Purple */
-.hljs-keyword,
-.hljs-selector-tag {
- color: #ad2bee;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #f4fbf4;
- color: #5e6e5e;
- padding: 0.5em;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/atelier-sulphurpool-dark.css b/collectedstatic/highlight/styles/atelier-sulphurpool-dark.css
deleted file mode 100644
index c2ab793..0000000
--- a/collectedstatic/highlight/styles/atelier-sulphurpool-dark.css
+++ /dev/null
@@ -1,69 +0,0 @@
-/* Base16 Atelier Sulphurpool Dark - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool) */
-/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
-
-/* Atelier-Sulphurpool Comment */
-.hljs-comment,
-.hljs-quote {
- color: #898ea4;
-}
-
-/* Atelier-Sulphurpool Red */
-.hljs-variable,
-.hljs-template-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-name,
-.hljs-regexp,
-.hljs-link,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class {
- color: #c94922;
-}
-
-/* Atelier-Sulphurpool Orange */
-.hljs-number,
-.hljs-meta,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-literal,
-.hljs-type,
-.hljs-params {
- color: #c76b29;
-}
-
-/* Atelier-Sulphurpool Green */
-.hljs-string,
-.hljs-symbol,
-.hljs-bullet {
- color: #ac9739;
-}
-
-/* Atelier-Sulphurpool Blue */
-.hljs-title,
-.hljs-section {
- color: #3d8fd1;
-}
-
-/* Atelier-Sulphurpool Purple */
-.hljs-keyword,
-.hljs-selector-tag {
- color: #6679cc;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #202746;
- color: #979db4;
- padding: 0.5em;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/atelier-sulphurpool-light.css b/collectedstatic/highlight/styles/atelier-sulphurpool-light.css
deleted file mode 100644
index 96c47d0..0000000
--- a/collectedstatic/highlight/styles/atelier-sulphurpool-light.css
+++ /dev/null
@@ -1,69 +0,0 @@
-/* Base16 Atelier Sulphurpool Light - Theme */
-/* by Bram de Haan (http://atelierbram.github.io/syntax-highlighting/atelier-schemes/sulphurpool) */
-/* Original Base16 color scheme by Chris Kempson (https://github.com/chriskempson/base16) */
-
-/* Atelier-Sulphurpool Comment */
-.hljs-comment,
-.hljs-quote {
- color: #6b7394;
-}
-
-/* Atelier-Sulphurpool Red */
-.hljs-variable,
-.hljs-template-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-name,
-.hljs-regexp,
-.hljs-link,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class {
- color: #c94922;
-}
-
-/* Atelier-Sulphurpool Orange */
-.hljs-number,
-.hljs-meta,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-literal,
-.hljs-type,
-.hljs-params {
- color: #c76b29;
-}
-
-/* Atelier-Sulphurpool Green */
-.hljs-string,
-.hljs-symbol,
-.hljs-bullet {
- color: #ac9739;
-}
-
-/* Atelier-Sulphurpool Blue */
-.hljs-title,
-.hljs-section {
- color: #3d8fd1;
-}
-
-/* Atelier-Sulphurpool Purple */
-.hljs-keyword,
-.hljs-selector-tag {
- color: #6679cc;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #f5f7ff;
- color: #5e6687;
- padding: 0.5em;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/atom-one-dark.css b/collectedstatic/highlight/styles/atom-one-dark.css
deleted file mode 100644
index 1616aaf..0000000
--- a/collectedstatic/highlight/styles/atom-one-dark.css
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
-
-Atom One Dark by Daniel Gamage
-Original One Dark Syntax theme from https://github.com/atom/one-dark-syntax
-
-base: #282c34
-mono-1: #abb2bf
-mono-2: #818896
-mono-3: #5c6370
-hue-1: #56b6c2
-hue-2: #61aeee
-hue-3: #c678dd
-hue-4: #98c379
-hue-5: #e06c75
-hue-5-2: #be5046
-hue-6: #d19a66
-hue-6-2: #e6c07b
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- color: #abb2bf;
- background: #282c34;
-}
-
-.hljs-comment,
-.hljs-quote {
- color: #5c6370;
- font-style: italic;
-}
-
-.hljs-doctag,
-.hljs-keyword,
-.hljs-formula {
- color: #c678dd;
-}
-
-.hljs-section,
-.hljs-name,
-.hljs-selector-tag,
-.hljs-deletion,
-.hljs-subst {
- color: #e06c75;
-}
-
-.hljs-literal {
- color: #56b6c2;
-}
-
-.hljs-string,
-.hljs-regexp,
-.hljs-addition,
-.hljs-attribute,
-.hljs-meta-string {
- color: #98c379;
-}
-
-.hljs-built_in,
-.hljs-class .hljs-title {
- color: #e6c07b;
-}
-
-.hljs-attr,
-.hljs-variable,
-.hljs-template-variable,
-.hljs-type,
-.hljs-selector-class,
-.hljs-selector-attr,
-.hljs-selector-pseudo,
-.hljs-number {
- color: #d19a66;
-}
-
-.hljs-symbol,
-.hljs-bullet,
-.hljs-link,
-.hljs-meta,
-.hljs-selector-id,
-.hljs-title {
- color: #61aeee;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
-
-.hljs-link {
- text-decoration: underline;
-}
diff --git a/collectedstatic/highlight/styles/atom-one-light.css b/collectedstatic/highlight/styles/atom-one-light.css
deleted file mode 100644
index d5bd1d2..0000000
--- a/collectedstatic/highlight/styles/atom-one-light.css
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
-
-Atom One Light by Daniel Gamage
-Original One Light Syntax theme from https://github.com/atom/one-light-syntax
-
-base: #fafafa
-mono-1: #383a42
-mono-2: #686b77
-mono-3: #a0a1a7
-hue-1: #0184bb
-hue-2: #4078f2
-hue-3: #a626a4
-hue-4: #50a14f
-hue-5: #e45649
-hue-5-2: #c91243
-hue-6: #986801
-hue-6-2: #c18401
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- color: #383a42;
- background: #fafafa;
-}
-
-.hljs-comment,
-.hljs-quote {
- color: #a0a1a7;
- font-style: italic;
-}
-
-.hljs-doctag,
-.hljs-keyword,
-.hljs-formula {
- color: #a626a4;
-}
-
-.hljs-section,
-.hljs-name,
-.hljs-selector-tag,
-.hljs-deletion,
-.hljs-subst {
- color: #e45649;
-}
-
-.hljs-literal {
- color: #0184bb;
-}
-
-.hljs-string,
-.hljs-regexp,
-.hljs-addition,
-.hljs-attribute,
-.hljs-meta-string {
- color: #50a14f;
-}
-
-.hljs-built_in,
-.hljs-class .hljs-title {
- color: #c18401;
-}
-
-.hljs-attr,
-.hljs-variable,
-.hljs-template-variable,
-.hljs-type,
-.hljs-selector-class,
-.hljs-selector-attr,
-.hljs-selector-pseudo,
-.hljs-number {
- color: #986801;
-}
-
-.hljs-symbol,
-.hljs-bullet,
-.hljs-link,
-.hljs-meta,
-.hljs-selector-id,
-.hljs-title {
- color: #4078f2;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
-
-.hljs-link {
- text-decoration: underline;
-}
diff --git a/collectedstatic/highlight/styles/brown-paper.css b/collectedstatic/highlight/styles/brown-paper.css
deleted file mode 100644
index f0197b9..0000000
--- a/collectedstatic/highlight/styles/brown-paper.css
+++ /dev/null
@@ -1,64 +0,0 @@
-/*
-
-Brown Paper style from goldblog.com.ua (c) Zaripov Yura
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background:#b7a68e url(./brown-papersq.png);
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-literal {
- color:#005599;
- font-weight:bold;
-}
-
-.hljs,
-.hljs-subst {
- color: #363c69;
-}
-
-.hljs-string,
-.hljs-title,
-.hljs-section,
-.hljs-type,
-.hljs-attribute,
-.hljs-symbol,
-.hljs-bullet,
-.hljs-built_in,
-.hljs-addition,
-.hljs-variable,
-.hljs-template-tag,
-.hljs-template-variable,
-.hljs-link,
-.hljs-name {
- color: #2c009f;
-}
-
-.hljs-comment,
-.hljs-quote,
-.hljs-meta,
-.hljs-deletion {
- color: #802022;
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-literal,
-.hljs-doctag,
-.hljs-title,
-.hljs-section,
-.hljs-type,
-.hljs-name,
-.hljs-strong {
- font-weight: bold;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
diff --git a/collectedstatic/highlight/styles/brown-papersq.png b/collectedstatic/highlight/styles/brown-papersq.png
deleted file mode 100644
index 3813903..0000000
Binary files a/collectedstatic/highlight/styles/brown-papersq.png and /dev/null differ
diff --git a/collectedstatic/highlight/styles/codepen-embed.css b/collectedstatic/highlight/styles/codepen-embed.css
deleted file mode 100644
index 195c4a0..0000000
--- a/collectedstatic/highlight/styles/codepen-embed.css
+++ /dev/null
@@ -1,60 +0,0 @@
-/*
- codepen.io Embed Theme
- Author: Justin Perry
- Original theme - https://github.com/chriskempson/tomorrow-theme
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #222;
- color: #fff;
-}
-
-.hljs-comment,
-.hljs-quote {
- color: #777;
-}
-
-.hljs-variable,
-.hljs-template-variable,
-.hljs-tag,
-.hljs-regexp,
-.hljs-meta,
-.hljs-number,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-literal,
-.hljs-params,
-.hljs-symbol,
-.hljs-bullet,
-.hljs-link,
-.hljs-deletion {
- color: #ab875d;
-}
-
-.hljs-section,
-.hljs-title,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class,
-.hljs-type,
-.hljs-attribute {
- color: #9b869b;
-}
-
-.hljs-string,
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-addition {
- color: #8f9c6c;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/color-brewer.css b/collectedstatic/highlight/styles/color-brewer.css
deleted file mode 100644
index 7934d98..0000000
--- a/collectedstatic/highlight/styles/color-brewer.css
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
-
-Colorbrewer theme
-Original: https://github.com/mbostock/colorbrewer-theme (c) Mike Bostock
-Ported by Fabrício Tavares de Oliveira
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #fff;
-}
-
-.hljs,
-.hljs-subst {
- color: #000;
-}
-
-.hljs-string,
-.hljs-meta,
-.hljs-symbol,
-.hljs-template-tag,
-.hljs-template-variable,
-.hljs-addition {
- color: #756bb1;
-}
-
-.hljs-comment,
-.hljs-quote {
- color: #636363;
-}
-
-.hljs-number,
-.hljs-regexp,
-.hljs-literal,
-.hljs-bullet,
-.hljs-link {
- color: #31a354;
-}
-
-.hljs-deletion,
-.hljs-variable {
- color: #88f;
-}
-
-
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-title,
-.hljs-section,
-.hljs-built_in,
-.hljs-doctag,
-.hljs-type,
-.hljs-tag,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class,
-.hljs-strong {
- color: #3182bd;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-attribute {
- color: #e6550d;
-}
diff --git a/collectedstatic/highlight/styles/darcula.css b/collectedstatic/highlight/styles/darcula.css
deleted file mode 100644
index be182d0..0000000
--- a/collectedstatic/highlight/styles/darcula.css
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
-
-Darcula color scheme from the JetBrains family of IDEs
-
-*/
-
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #2b2b2b;
-}
-
-.hljs {
- color: #bababa;
-}
-
-.hljs-strong,
-.hljs-emphasis {
- color: #a8a8a2;
-}
-
-.hljs-bullet,
-.hljs-quote,
-.hljs-link,
-.hljs-number,
-.hljs-regexp,
-.hljs-literal {
- color: #6896ba;
-}
-
-.hljs-code,
-.hljs-selector-class {
- color: #a6e22e;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-section,
-.hljs-attribute,
-.hljs-name,
-.hljs-variable {
- color: #cb7832;
-}
-
-.hljs-params {
- color: #b9b9b9;
-}
-
-.hljs-string {
- color: #6a8759;
-}
-
-.hljs-subst,
-.hljs-type,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-symbol,
-.hljs-selector-id,
-.hljs-selector-attr,
-.hljs-selector-pseudo,
-.hljs-template-tag,
-.hljs-template-variable,
-.hljs-addition {
- color: #e0c46c;
-}
-
-.hljs-comment,
-.hljs-deletion,
-.hljs-meta {
- color: #7f7f7f;
-}
diff --git a/collectedstatic/highlight/styles/dark.css b/collectedstatic/highlight/styles/dark.css
deleted file mode 100644
index b4724f5..0000000
--- a/collectedstatic/highlight/styles/dark.css
+++ /dev/null
@@ -1,63 +0,0 @@
-/*
-
-Dark style from softwaremaniacs.org (c) Ivan Sagalaev
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #444;
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-literal,
-.hljs-section,
-.hljs-link {
- color: white;
-}
-
-.hljs,
-.hljs-subst {
- color: #ddd;
-}
-
-.hljs-string,
-.hljs-title,
-.hljs-name,
-.hljs-type,
-.hljs-attribute,
-.hljs-symbol,
-.hljs-bullet,
-.hljs-built_in,
-.hljs-addition,
-.hljs-variable,
-.hljs-template-tag,
-.hljs-template-variable {
- color: #d88;
-}
-
-.hljs-comment,
-.hljs-quote,
-.hljs-deletion,
-.hljs-meta {
- color: #777;
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-literal,
-.hljs-title,
-.hljs-section,
-.hljs-doctag,
-.hljs-type,
-.hljs-name,
-.hljs-strong {
- font-weight: bold;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
diff --git a/collectedstatic/highlight/styles/darkula.css b/collectedstatic/highlight/styles/darkula.css
deleted file mode 100644
index f4646c3..0000000
--- a/collectedstatic/highlight/styles/darkula.css
+++ /dev/null
@@ -1,6 +0,0 @@
-/*
- Deprecated due to a typo in the name and left here for compatibility purpose only.
- Please use darcula.css instead.
-*/
-
-@import url('darcula.css');
diff --git a/collectedstatic/highlight/styles/default.css b/collectedstatic/highlight/styles/default.css
deleted file mode 100644
index f1bfade..0000000
--- a/collectedstatic/highlight/styles/default.css
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
-
-Original highlight.js style (c) Ivan Sagalaev
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #F0F0F0;
-}
-
-
-/* Base color: saturation 0; */
-
-.hljs,
-.hljs-subst {
- color: #444;
-}
-
-.hljs-comment {
- color: #888888;
-}
-
-.hljs-keyword,
-.hljs-attribute,
-.hljs-selector-tag,
-.hljs-meta-keyword,
-.hljs-doctag,
-.hljs-name {
- font-weight: bold;
-}
-
-
-/* User color: hue: 0 */
-
-.hljs-type,
-.hljs-string,
-.hljs-number,
-.hljs-selector-id,
-.hljs-selector-class,
-.hljs-quote,
-.hljs-template-tag,
-.hljs-deletion {
- color: #880000;
-}
-
-.hljs-title,
-.hljs-section {
- color: #880000;
- font-weight: bold;
-}
-
-.hljs-regexp,
-.hljs-symbol,
-.hljs-variable,
-.hljs-template-variable,
-.hljs-link,
-.hljs-selector-attr,
-.hljs-selector-pseudo {
- color: #BC6060;
-}
-
-
-/* Language color: hue: 90; */
-
-.hljs-literal {
- color: #78A960;
-}
-
-.hljs-built_in,
-.hljs-bullet,
-.hljs-code,
-.hljs-addition {
- color: #397300;
-}
-
-
-/* Meta color: hue: 200 */
-
-.hljs-meta {
- color: #1f7199;
-}
-
-.hljs-meta-string {
- color: #4d99bf;
-}
-
-
-/* Misc effects */
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/docco.css b/collectedstatic/highlight/styles/docco.css
deleted file mode 100644
index db366be..0000000
--- a/collectedstatic/highlight/styles/docco.css
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
-Docco style used in http://jashkenas.github.com/docco/ converted by Simon Madine (@thingsinjars)
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- color: #000;
- background: #f8f8ff;
-}
-
-.hljs-comment,
-.hljs-quote {
- color: #408080;
- font-style: italic;
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-literal,
-.hljs-subst {
- color: #954121;
-}
-
-.hljs-number {
- color: #40a070;
-}
-
-.hljs-string,
-.hljs-doctag {
- color: #219161;
-}
-
-.hljs-selector-id,
-.hljs-selector-class,
-.hljs-section,
-.hljs-type {
- color: #19469d;
-}
-
-.hljs-params {
- color: #00f;
-}
-
-.hljs-title {
- color: #458;
- font-weight: bold;
-}
-
-.hljs-tag,
-.hljs-name,
-.hljs-attribute {
- color: #000080;
- font-weight: normal;
-}
-
-.hljs-variable,
-.hljs-template-variable {
- color: #008080;
-}
-
-.hljs-regexp,
-.hljs-link {
- color: #b68;
-}
-
-.hljs-symbol,
-.hljs-bullet {
- color: #990073;
-}
-
-.hljs-built_in,
-.hljs-builtin-name {
- color: #0086b3;
-}
-
-.hljs-meta {
- color: #999;
- font-weight: bold;
-}
-
-.hljs-deletion {
- background: #fdd;
-}
-
-.hljs-addition {
- background: #dfd;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/dracula.css b/collectedstatic/highlight/styles/dracula.css
deleted file mode 100644
index d591db6..0000000
--- a/collectedstatic/highlight/styles/dracula.css
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
-
-Dracula Theme v1.2.0
-
-https://github.com/zenorocha/dracula-theme
-
-Copyright 2015, All rights reserved
-
-Code licensed under the MIT license
-http://zenorocha.mit-license.org
-
-@author Éverton Ribeiro
-@author Zeno Rocha
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #282a36;
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-literal,
-.hljs-section,
-.hljs-link {
- color: #8be9fd;
-}
-
-.hljs-function .hljs-keyword {
- color: #ff79c6;
-}
-
-.hljs,
-.hljs-subst {
- color: #f8f8f2;
-}
-
-.hljs-string,
-.hljs-title,
-.hljs-name,
-.hljs-type,
-.hljs-attribute,
-.hljs-symbol,
-.hljs-bullet,
-.hljs-addition,
-.hljs-variable,
-.hljs-template-tag,
-.hljs-template-variable {
- color: #f1fa8c;
-}
-
-.hljs-comment,
-.hljs-quote,
-.hljs-deletion,
-.hljs-meta {
- color: #6272a4;
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-literal,
-.hljs-title,
-.hljs-section,
-.hljs-doctag,
-.hljs-type,
-.hljs-name,
-.hljs-strong {
- font-weight: bold;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
diff --git a/collectedstatic/highlight/styles/far.css b/collectedstatic/highlight/styles/far.css
deleted file mode 100644
index 2b3f87b..0000000
--- a/collectedstatic/highlight/styles/far.css
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
-
-FAR Style (c) MajestiC
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #000080;
-}
-
-.hljs,
-.hljs-subst {
- color: #0ff;
-}
-
-.hljs-string,
-.hljs-attribute,
-.hljs-symbol,
-.hljs-bullet,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-template-tag,
-.hljs-template-variable,
-.hljs-addition {
- color: #ff0;
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-section,
-.hljs-type,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class,
-.hljs-variable {
- color: #fff;
-}
-
-.hljs-comment,
-.hljs-quote,
-.hljs-doctag,
-.hljs-deletion {
- color: #888;
-}
-
-.hljs-number,
-.hljs-regexp,
-.hljs-literal,
-.hljs-link {
- color: #0f0;
-}
-
-.hljs-meta {
- color: #008080;
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-title,
-.hljs-section,
-.hljs-name,
-.hljs-strong {
- font-weight: bold;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
diff --git a/collectedstatic/highlight/styles/foundation.css b/collectedstatic/highlight/styles/foundation.css
deleted file mode 100644
index f1fe64b..0000000
--- a/collectedstatic/highlight/styles/foundation.css
+++ /dev/null
@@ -1,88 +0,0 @@
-/*
-Description: Foundation 4 docs style for highlight.js
-Author: Dan Allen
-Website: http://foundation.zurb.com/docs/
-Version: 1.0
-Date: 2013-04-02
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #eee; color: black;
-}
-
-.hljs-link,
-.hljs-emphasis,
-.hljs-attribute,
-.hljs-addition {
- color: #070;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong,
-.hljs-string,
-.hljs-deletion {
- color: #d14;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
-
-.hljs-quote,
-.hljs-comment {
- color: #998;
- font-style: italic;
-}
-
-.hljs-section,
-.hljs-title {
- color: #900;
-}
-
-.hljs-class .hljs-title,
-.hljs-type {
- color: #458;
-}
-
-.hljs-variable,
-.hljs-template-variable {
- color: #336699;
-}
-
-.hljs-bullet {
- color: #997700;
-}
-
-.hljs-meta {
- color: #3344bb;
-}
-
-.hljs-code,
-.hljs-number,
-.hljs-literal,
-.hljs-keyword,
-.hljs-selector-tag {
- color: #099;
-}
-
-.hljs-regexp {
- background-color: #fff0ff;
- color: #880088;
-}
-
-.hljs-symbol {
- color: #990073;
-}
-
-.hljs-tag,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class {
- color: #007700;
-}
diff --git a/collectedstatic/highlight/styles/github-gist.css b/collectedstatic/highlight/styles/github-gist.css
deleted file mode 100644
index 155f0b9..0000000
--- a/collectedstatic/highlight/styles/github-gist.css
+++ /dev/null
@@ -1,71 +0,0 @@
-/**
- * GitHub Gist Theme
- * Author : Louis Barranqueiro - https://github.com/LouisBarranqueiro
- */
-
-.hljs {
- display: block;
- background: white;
- padding: 0.5em;
- color: #333333;
- overflow-x: auto;
-}
-
-.hljs-comment,
-.hljs-meta {
- color: #969896;
-}
-
-.hljs-string,
-.hljs-variable,
-.hljs-template-variable,
-.hljs-strong,
-.hljs-emphasis,
-.hljs-quote {
- color: #df5000;
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-type {
- color: #a71d5d;
-}
-
-.hljs-literal,
-.hljs-symbol,
-.hljs-bullet,
-.hljs-attribute {
- color: #0086b3;
-}
-
-.hljs-section,
-.hljs-name {
- color: #63a35c;
-}
-
-.hljs-tag {
- color: #333333;
-}
-
-.hljs-title,
-.hljs-attr,
-.hljs-selector-id,
-.hljs-selector-class,
-.hljs-selector-attr,
-.hljs-selector-pseudo {
- color: #795da3;
-}
-
-.hljs-addition {
- color: #55a532;
- background-color: #eaffea;
-}
-
-.hljs-deletion {
- color: #bd2c00;
- background-color: #ffecec;
-}
-
-.hljs-link {
- text-decoration: underline;
-}
diff --git a/collectedstatic/highlight/styles/github.css b/collectedstatic/highlight/styles/github.css
deleted file mode 100644
index 791932b..0000000
--- a/collectedstatic/highlight/styles/github.css
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
-
-github.com style (c) Vasily Polovnyov
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- color: #333;
- background: #f8f8f8;
-}
-
-.hljs-comment,
-.hljs-quote {
- color: #998;
- font-style: italic;
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-subst {
- color: #333;
- font-weight: bold;
-}
-
-.hljs-number,
-.hljs-literal,
-.hljs-variable,
-.hljs-template-variable,
-.hljs-tag .hljs-attr {
- color: #008080;
-}
-
-.hljs-string,
-.hljs-doctag {
- color: #d14;
-}
-
-.hljs-title,
-.hljs-section,
-.hljs-selector-id {
- color: #900;
- font-weight: bold;
-}
-
-.hljs-subst {
- font-weight: normal;
-}
-
-.hljs-type,
-.hljs-class .hljs-title {
- color: #458;
- font-weight: bold;
-}
-
-.hljs-tag,
-.hljs-name,
-.hljs-attribute {
- color: #000080;
- font-weight: normal;
-}
-
-.hljs-regexp,
-.hljs-link {
- color: #009926;
-}
-
-.hljs-symbol,
-.hljs-bullet {
- color: #990073;
-}
-
-.hljs-built_in,
-.hljs-builtin-name {
- color: #0086b3;
-}
-
-.hljs-meta {
- color: #999;
- font-weight: bold;
-}
-
-.hljs-deletion {
- background: #fdd;
-}
-
-.hljs-addition {
- background: #dfd;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/googlecode.css b/collectedstatic/highlight/styles/googlecode.css
deleted file mode 100644
index 884ad63..0000000
--- a/collectedstatic/highlight/styles/googlecode.css
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
-
-Google Code style (c) Aahan Krish
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: white;
- color: black;
-}
-
-.hljs-comment,
-.hljs-quote {
- color: #800;
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-section,
-.hljs-title,
-.hljs-name {
- color: #008;
-}
-
-.hljs-variable,
-.hljs-template-variable {
- color: #660;
-}
-
-.hljs-string,
-.hljs-selector-attr,
-.hljs-selector-pseudo,
-.hljs-regexp {
- color: #080;
-}
-
-.hljs-literal,
-.hljs-symbol,
-.hljs-bullet,
-.hljs-meta,
-.hljs-number,
-.hljs-link {
- color: #066;
-}
-
-.hljs-title,
-.hljs-doctag,
-.hljs-type,
-.hljs-attr,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-params {
- color: #606;
-}
-
-.hljs-attribute,
-.hljs-subst {
- color: #000;
-}
-
-.hljs-formula {
- background-color: #eee;
- font-style: italic;
-}
-
-.hljs-selector-id,
-.hljs-selector-class {
- color: #9B703F
-}
-
-.hljs-addition {
- background-color: #baeeba;
-}
-
-.hljs-deletion {
- background-color: #ffc8bd;
-}
-
-.hljs-doctag,
-.hljs-strong {
- font-weight: bold;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
diff --git a/collectedstatic/highlight/styles/grayscale.css b/collectedstatic/highlight/styles/grayscale.css
deleted file mode 100644
index 5376f34..0000000
--- a/collectedstatic/highlight/styles/grayscale.css
+++ /dev/null
@@ -1,101 +0,0 @@
-/*
-
-grayscale style (c) MY Sun
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- color: #333;
- background: #fff;
-}
-
-.hljs-comment,
-.hljs-quote {
- color: #777;
- font-style: italic;
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-subst {
- color: #333;
- font-weight: bold;
-}
-
-.hljs-number,
-.hljs-literal {
- color: #777;
-}
-
-.hljs-string,
-.hljs-doctag,
-.hljs-formula {
- color: #333;
- background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAQAAAAECAYAAACp8Z5+AAAAJ0lEQVQIW2O8e/fufwYGBgZBQUEQxcCIIfDu3Tuwivfv30NUoAsAALHpFMMLqZlPAAAAAElFTkSuQmCC) repeat;
-}
-
-.hljs-title,
-.hljs-section,
-.hljs-selector-id {
- color: #000;
- font-weight: bold;
-}
-
-.hljs-subst {
- font-weight: normal;
-}
-
-.hljs-class .hljs-title,
-.hljs-type,
-.hljs-name {
- color: #333;
- font-weight: bold;
-}
-
-.hljs-tag {
- color: #333;
-}
-
-.hljs-regexp {
- color: #333;
- background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAICAYAAADA+m62AAAAPUlEQVQYV2NkQAN37979r6yszIgujiIAU4RNMVwhuiQ6H6wQl3XI4oy4FMHcCJPHcDS6J2A2EqUQpJhohQDexSef15DBCwAAAABJRU5ErkJggg==) repeat;
-}
-
-.hljs-symbol,
-.hljs-bullet,
-.hljs-link {
- color: #000;
- background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAFCAYAAACNbyblAAAAKElEQVQIW2NkQAO7d+/+z4gsBhJwdXVlhAvCBECKwIIwAbhKZBUwBQA6hBpm5efZsgAAAABJRU5ErkJggg==) repeat;
-}
-
-.hljs-built_in,
-.hljs-builtin-name {
- color: #000;
- text-decoration: underline;
-}
-
-.hljs-meta {
- color: #999;
- font-weight: bold;
-}
-
-.hljs-deletion {
- color: #fff;
- background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAADCAYAAABS3WWCAAAAE0lEQVQIW2MMDQ39zzhz5kwIAQAyxweWgUHd1AAAAABJRU5ErkJggg==) repeat;
-}
-
-.hljs-addition {
- color: #000;
- background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAAJCAYAAADgkQYQAAAALUlEQVQYV2N89+7dfwYk8P79ewZBQUFkIQZGOiu6e/cuiptQHAPl0NtNxAQBAM97Oejj3Dg7AAAAAElFTkSuQmCC) repeat;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/gruvbox-dark.css b/collectedstatic/highlight/styles/gruvbox-dark.css
deleted file mode 100644
index f563811..0000000
--- a/collectedstatic/highlight/styles/gruvbox-dark.css
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
-
-Gruvbox style (dark) (c) Pavel Pertsev (original style at https://github.com/morhetz/gruvbox)
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #282828;
-}
-
-.hljs,
-.hljs-subst {
- color: #ebdbb2;
-}
-
-/* Gruvbox Red */
-.hljs-deletion,
-.hljs-formula,
-.hljs-keyword,
-.hljs-link,
-.hljs-selector-tag {
- color: #fb4934;
-}
-
-/* Gruvbox Blue */
-.hljs-built_in,
-.hljs-emphasis,
-.hljs-name,
-.hljs-quote,
-.hljs-strong,
-.hljs-title,
-.hljs-variable {
- color: #83a598;
-}
-
-/* Gruvbox Yellow */
-.hljs-attr,
-.hljs-params,
-.hljs-template-tag,
-.hljs-type {
- color: #fabd2f;
-}
-
-/* Gruvbox Purple */
-.hljs-builtin-name,
-.hljs-doctag,
-.hljs-literal,
-.hljs-number {
- color: #8f3f71;
-}
-
-/* Gruvbox Orange */
-.hljs-code,
-.hljs-meta,
-.hljs-regexp,
-.hljs-selector-id,
-.hljs-template-variable {
- color: #fe8019;
-}
-
-/* Gruvbox Green */
-.hljs-addition,
-.hljs-meta-string,
-.hljs-section,
-.hljs-selector-attr,
-.hljs-selector-class,
-.hljs-string,
-.hljs-symbol {
- color: #b8bb26;
-}
-
-/* Gruvbox Aqua */
-.hljs-attribute,
-.hljs-bullet,
-.hljs-class,
-.hljs-function,
-.hljs-function .hljs-keyword,
-.hljs-meta-keyword,
-.hljs-selector-pseudo,
-.hljs-tag {
- color: #8ec07c;
-}
-
-/* Gruvbox Gray */
-.hljs-comment {
- color: #928374;
-}
-
-/* Gruvbox Purple */
-.hljs-link_label,
-.hljs-literal,
-.hljs-number {
- color: #d3869b;
-}
-
-.hljs-comment,
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-section,
-.hljs-strong,
-.hljs-tag {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/gruvbox-light.css b/collectedstatic/highlight/styles/gruvbox-light.css
deleted file mode 100644
index ff45468..0000000
--- a/collectedstatic/highlight/styles/gruvbox-light.css
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
-
-Gruvbox style (light) (c) Pavel Pertsev (original style at https://github.com/morhetz/gruvbox)
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #fbf1c7;
-}
-
-.hljs,
-.hljs-subst {
- color: #3c3836;
-}
-
-/* Gruvbox Red */
-.hljs-deletion,
-.hljs-formula,
-.hljs-keyword,
-.hljs-link,
-.hljs-selector-tag {
- color: #9d0006;
-}
-
-/* Gruvbox Blue */
-.hljs-built_in,
-.hljs-emphasis,
-.hljs-name,
-.hljs-quote,
-.hljs-strong,
-.hljs-title,
-.hljs-variable {
- color: #076678;
-}
-
-/* Gruvbox Yellow */
-.hljs-attr,
-.hljs-params,
-.hljs-template-tag,
-.hljs-type {
- color: #b57614;
-}
-
-/* Gruvbox Purple */
-.hljs-builtin-name,
-.hljs-doctag,
-.hljs-literal,
-.hljs-number {
- color: #8f3f71;
-}
-
-/* Gruvbox Orange */
-.hljs-code,
-.hljs-meta,
-.hljs-regexp,
-.hljs-selector-id,
-.hljs-template-variable {
- color: #af3a03;
-}
-
-/* Gruvbox Green */
-.hljs-addition,
-.hljs-meta-string,
-.hljs-section,
-.hljs-selector-attr,
-.hljs-selector-class,
-.hljs-string,
-.hljs-symbol {
- color: #79740e;
-}
-
-/* Gruvbox Aqua */
-.hljs-attribute,
-.hljs-bullet,
-.hljs-class,
-.hljs-function,
-.hljs-function .hljs-keyword,
-.hljs-meta-keyword,
-.hljs-selector-pseudo,
-.hljs-tag {
- color: #427b58;
-}
-
-/* Gruvbox Gray */
-.hljs-comment {
- color: #928374;
-}
-
-/* Gruvbox Purple */
-.hljs-link_label,
-.hljs-literal,
-.hljs-number {
- color: #8f3f71;
-}
-
-.hljs-comment,
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-section,
-.hljs-strong,
-.hljs-tag {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/hopscotch.css b/collectedstatic/highlight/styles/hopscotch.css
deleted file mode 100644
index 32e60d2..0000000
--- a/collectedstatic/highlight/styles/hopscotch.css
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Hopscotch
- * by Jan T. Sott
- * https://github.com/idleberg/Hopscotch
- *
- * This work is licensed under the Creative Commons CC0 1.0 Universal License
- */
-
-/* Comment */
-.hljs-comment,
-.hljs-quote {
- color: #989498;
-}
-
-/* Red */
-.hljs-variable,
-.hljs-template-variable,
-.hljs-attribute,
-.hljs-tag,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class,
-.hljs-regexp,
-.hljs-link,
-.hljs-deletion {
- color: #dd464c;
-}
-
-/* Orange */
-.hljs-number,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-literal,
-.hljs-type,
-.hljs-params {
- color: #fd8b19;
-}
-
-/* Yellow */
-.hljs-class .hljs-title {
- color: #fdcc59;
-}
-
-/* Green */
-.hljs-string,
-.hljs-symbol,
-.hljs-bullet,
-.hljs-addition {
- color: #8fc13e;
-}
-
-/* Aqua */
-.hljs-meta {
- color: #149b93;
-}
-
-/* Blue */
-.hljs-function,
-.hljs-section,
-.hljs-title {
- color: #1290bf;
-}
-
-/* Purple */
-.hljs-keyword,
-.hljs-selector-tag {
- color: #c85e7c;
-}
-
-.hljs {
- display: block;
- background: #322931;
- color: #b9b5b8;
- padding: 0.5em;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/hybrid.css b/collectedstatic/highlight/styles/hybrid.css
deleted file mode 100644
index 29735a1..0000000
--- a/collectedstatic/highlight/styles/hybrid.css
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
-
-vim-hybrid theme by w0ng (https://github.com/w0ng/vim-hybrid)
-
-*/
-
-/*background color*/
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #1d1f21;
-}
-
-/*selection color*/
-.hljs::selection,
-.hljs span::selection {
- background: #373b41;
-}
-
-.hljs::-moz-selection,
-.hljs span::-moz-selection {
- background: #373b41;
-}
-
-/*foreground color*/
-.hljs {
- color: #c5c8c6;
-}
-
-/*color: fg_yellow*/
-.hljs-title,
-.hljs-name {
- color: #f0c674;
-}
-
-/*color: fg_comment*/
-.hljs-comment,
-.hljs-meta,
-.hljs-meta .hljs-keyword {
- color: #707880;
-}
-
-/*color: fg_red*/
-.hljs-number,
-.hljs-symbol,
-.hljs-literal,
-.hljs-deletion,
-.hljs-link {
- color: #cc6666
-}
-
-/*color: fg_green*/
-.hljs-string,
-.hljs-doctag,
-.hljs-addition,
-.hljs-regexp,
-.hljs-selector-attr,
-.hljs-selector-pseudo {
- color: #b5bd68;
-}
-
-/*color: fg_purple*/
-.hljs-attribute,
-.hljs-code,
-.hljs-selector-id {
- color: #b294bb;
-}
-
-/*color: fg_blue*/
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-bullet,
-.hljs-tag {
- color: #81a2be;
-}
-
-/*color: fg_aqua*/
-.hljs-subst,
-.hljs-variable,
-.hljs-template-tag,
-.hljs-template-variable {
- color: #8abeb7;
-}
-
-/*color: fg_orange*/
-.hljs-type,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-quote,
-.hljs-section,
-.hljs-selector-class {
- color: #de935f;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/idea.css b/collectedstatic/highlight/styles/idea.css
deleted file mode 100644
index 3bf1892..0000000
--- a/collectedstatic/highlight/styles/idea.css
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
-
-Intellij Idea-like styling (c) Vasily Polovnyov
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- color: #000;
- background: #fff;
-}
-
-.hljs-subst,
-.hljs-title {
- font-weight: normal;
- color: #000;
-}
-
-.hljs-comment,
-.hljs-quote {
- color: #808080;
- font-style: italic;
-}
-
-.hljs-meta {
- color: #808000;
-}
-
-.hljs-tag {
- background: #efefef;
-}
-
-.hljs-section,
-.hljs-name,
-.hljs-literal,
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-type,
-.hljs-selector-id,
-.hljs-selector-class {
- font-weight: bold;
- color: #000080;
-}
-
-.hljs-attribute,
-.hljs-number,
-.hljs-regexp,
-.hljs-link {
- font-weight: bold;
- color: #0000ff;
-}
-
-.hljs-number,
-.hljs-regexp,
-.hljs-link {
- font-weight: normal;
-}
-
-.hljs-string {
- color: #008000;
- font-weight: bold;
-}
-
-.hljs-symbol,
-.hljs-bullet,
-.hljs-formula {
- color: #000;
- background: #d0eded;
- font-style: italic;
-}
-
-.hljs-doctag {
- text-decoration: underline;
-}
-
-.hljs-variable,
-.hljs-template-variable {
- color: #660e7a;
-}
-
-.hljs-addition {
- background: #baeeba;
-}
-
-.hljs-deletion {
- background: #ffc8bd;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/ir-black.css b/collectedstatic/highlight/styles/ir-black.css
deleted file mode 100644
index bd4c755..0000000
--- a/collectedstatic/highlight/styles/ir-black.css
+++ /dev/null
@@ -1,73 +0,0 @@
-/*
- IR_Black style (c) Vasily Mikhailitchenko
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #000;
- color: #f8f8f8;
-}
-
-.hljs-comment,
-.hljs-quote,
-.hljs-meta {
- color: #7c7c7c;
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-tag,
-.hljs-name {
- color: #96cbfe;
-}
-
-.hljs-attribute,
-.hljs-selector-id {
- color: #ffffb6;
-}
-
-.hljs-string,
-.hljs-selector-attr,
-.hljs-selector-pseudo,
-.hljs-addition {
- color: #a8ff60;
-}
-
-.hljs-subst {
- color: #daefa3;
-}
-
-.hljs-regexp,
-.hljs-link {
- color: #e9c062;
-}
-
-.hljs-title,
-.hljs-section,
-.hljs-type,
-.hljs-doctag {
- color: #ffffb6;
-}
-
-.hljs-symbol,
-.hljs-bullet,
-.hljs-variable,
-.hljs-template-variable,
-.hljs-literal {
- color: #c6c5fe;
-}
-
-.hljs-number,
-.hljs-deletion {
- color:#ff73fd;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/kimbie.dark.css b/collectedstatic/highlight/styles/kimbie.dark.css
deleted file mode 100644
index d139cb5..0000000
--- a/collectedstatic/highlight/styles/kimbie.dark.css
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- Name: Kimbie (dark)
- Author: Jan T. Sott
- License: Creative Commons Attribution-ShareAlike 4.0 Unported License
- URL: https://github.com/idleberg/Kimbie-highlight.js
-*/
-
-/* Kimbie Comment */
-.hljs-comment,
-.hljs-quote {
- color: #d6baad;
-}
-
-/* Kimbie Red */
-.hljs-variable,
-.hljs-template-variable,
-.hljs-tag,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class,
-.hljs-regexp,
-.hljs-meta {
- color: #dc3958;
-}
-
-/* Kimbie Orange */
-.hljs-number,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-literal,
-.hljs-type,
-.hljs-params,
-.hljs-deletion,
-.hljs-link {
- color: #f79a32;
-}
-
-/* Kimbie Yellow */
-.hljs-title,
-.hljs-section,
-.hljs-attribute {
- color: #f06431;
-}
-
-/* Kimbie Green */
-.hljs-string,
-.hljs-symbol,
-.hljs-bullet,
-.hljs-addition {
- color: #889b4a;
-}
-
-/* Kimbie Purple */
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-function {
- color: #98676a;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #221a0f;
- color: #d3af86;
- padding: 0.5em;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/kimbie.light.css b/collectedstatic/highlight/styles/kimbie.light.css
deleted file mode 100644
index 04ff6ed..0000000
--- a/collectedstatic/highlight/styles/kimbie.light.css
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- Name: Kimbie (light)
- Author: Jan T. Sott
- License: Creative Commons Attribution-ShareAlike 4.0 Unported License
- URL: https://github.com/idleberg/Kimbie-highlight.js
-*/
-
-/* Kimbie Comment */
-.hljs-comment,
-.hljs-quote {
- color: #a57a4c;
-}
-
-/* Kimbie Red */
-.hljs-variable,
-.hljs-template-variable,
-.hljs-tag,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class,
-.hljs-regexp,
-.hljs-meta {
- color: #dc3958;
-}
-
-/* Kimbie Orange */
-.hljs-number,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-literal,
-.hljs-type,
-.hljs-params,
-.hljs-deletion,
-.hljs-link {
- color: #f79a32;
-}
-
-/* Kimbie Yellow */
-.hljs-title,
-.hljs-section,
-.hljs-attribute {
- color: #f06431;
-}
-
-/* Kimbie Green */
-.hljs-string,
-.hljs-symbol,
-.hljs-bullet,
-.hljs-addition {
- color: #889b4a;
-}
-
-/* Kimbie Purple */
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-function {
- color: #98676a;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #fbebd4;
- color: #84613d;
- padding: 0.5em;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/magula.css b/collectedstatic/highlight/styles/magula.css
deleted file mode 100644
index 44dee5e..0000000
--- a/collectedstatic/highlight/styles/magula.css
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
-Description: Magula style for highligh.js
-Author: Ruslan Keba
-Website: http://rukeba.com/
-Version: 1.0
-Date: 2009-01-03
-Music: Aphex Twin / Xtal
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background-color: #f4f4f4;
-}
-
-.hljs,
-.hljs-subst {
- color: black;
-}
-
-.hljs-string,
-.hljs-title,
-.hljs-symbol,
-.hljs-bullet,
-.hljs-attribute,
-.hljs-addition,
-.hljs-variable,
-.hljs-template-tag,
-.hljs-template-variable {
- color: #050;
-}
-
-.hljs-comment,
-.hljs-quote {
- color: #777;
-}
-
-.hljs-number,
-.hljs-regexp,
-.hljs-literal,
-.hljs-type,
-.hljs-link {
- color: #800;
-}
-
-.hljs-deletion,
-.hljs-meta {
- color: #00e;
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-doctag,
-.hljs-title,
-.hljs-section,
-.hljs-built_in,
-.hljs-tag,
-.hljs-name {
- font-weight: bold;
- color: navy;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/mono-blue.css b/collectedstatic/highlight/styles/mono-blue.css
deleted file mode 100644
index 884c97c..0000000
--- a/collectedstatic/highlight/styles/mono-blue.css
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- Five-color theme from a single blue hue.
-*/
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #eaeef3;
-}
-
-.hljs {
- color: #00193a;
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-title,
-.hljs-section,
-.hljs-doctag,
-.hljs-name,
-.hljs-strong {
- font-weight: bold;
-}
-
-.hljs-comment {
- color: #738191;
-}
-
-.hljs-string,
-.hljs-title,
-.hljs-section,
-.hljs-built_in,
-.hljs-literal,
-.hljs-type,
-.hljs-addition,
-.hljs-tag,
-.hljs-quote,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class {
- color: #0048ab;
-}
-
-.hljs-meta,
-.hljs-subst,
-.hljs-symbol,
-.hljs-regexp,
-.hljs-attribute,
-.hljs-deletion,
-.hljs-variable,
-.hljs-template-variable,
-.hljs-link,
-.hljs-bullet {
- color: #4c81c9;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
diff --git a/collectedstatic/highlight/styles/monokai-sublime.css b/collectedstatic/highlight/styles/monokai-sublime.css
deleted file mode 100644
index 2864170..0000000
--- a/collectedstatic/highlight/styles/monokai-sublime.css
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
-
-Monokai Sublime style. Derived from Monokai by noformnocontent http://nn.mit-license.org/
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #23241f;
-}
-
-.hljs,
-.hljs-tag,
-.hljs-subst {
- color: #f8f8f2;
-}
-
-.hljs-strong,
-.hljs-emphasis {
- color: #a8a8a2;
-}
-
-.hljs-bullet,
-.hljs-quote,
-.hljs-number,
-.hljs-regexp,
-.hljs-literal,
-.hljs-link {
- color: #ae81ff;
-}
-
-.hljs-code,
-.hljs-title,
-.hljs-section,
-.hljs-selector-class {
- color: #a6e22e;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-name,
-.hljs-attr {
- color: #f92672;
-}
-
-.hljs-symbol,
-.hljs-attribute {
- color: #66d9ef;
-}
-
-.hljs-params,
-.hljs-class .hljs-title {
- color: #f8f8f2;
-}
-
-.hljs-string,
-.hljs-type,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-selector-id,
-.hljs-selector-attr,
-.hljs-selector-pseudo,
-.hljs-addition,
-.hljs-variable,
-.hljs-template-variable {
- color: #e6db74;
-}
-
-.hljs-comment,
-.hljs-deletion,
-.hljs-meta {
- color: #75715e;
-}
diff --git a/collectedstatic/highlight/styles/monokai.css b/collectedstatic/highlight/styles/monokai.css
deleted file mode 100644
index 775d53f..0000000
--- a/collectedstatic/highlight/styles/monokai.css
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
-Monokai style - ported by Luigi Maselli - http://grigio.org
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #272822; color: #ddd;
-}
-
-.hljs-tag,
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-literal,
-.hljs-strong,
-.hljs-name {
- color: #f92672;
-}
-
-.hljs-code {
- color: #66d9ef;
-}
-
-.hljs-class .hljs-title {
- color: white;
-}
-
-.hljs-attribute,
-.hljs-symbol,
-.hljs-regexp,
-.hljs-link {
- color: #bf79db;
-}
-
-.hljs-string,
-.hljs-bullet,
-.hljs-subst,
-.hljs-title,
-.hljs-section,
-.hljs-emphasis,
-.hljs-type,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-selector-attr,
-.hljs-selector-pseudo,
-.hljs-addition,
-.hljs-variable,
-.hljs-template-tag,
-.hljs-template-variable {
- color: #a6e22e;
-}
-
-.hljs-comment,
-.hljs-quote,
-.hljs-deletion,
-.hljs-meta {
- color: #75715e;
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-literal,
-.hljs-doctag,
-.hljs-title,
-.hljs-section,
-.hljs-type,
-.hljs-selector-id {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/obsidian.css b/collectedstatic/highlight/styles/obsidian.css
deleted file mode 100644
index 356630f..0000000
--- a/collectedstatic/highlight/styles/obsidian.css
+++ /dev/null
@@ -1,88 +0,0 @@
-/**
- * Obsidian style
- * ported by Alexander Marenin (http://github.com/ioncreature)
- */
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #282b2e;
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-literal,
-.hljs-selector-id {
- color: #93c763;
-}
-
-.hljs-number {
- color: #ffcd22;
-}
-
-.hljs {
- color: #e0e2e4;
-}
-
-.hljs-attribute {
- color: #668bb0;
-}
-
-.hljs-code,
-.hljs-class .hljs-title,
-.hljs-section {
- color: white;
-}
-
-.hljs-regexp,
-.hljs-link {
- color: #d39745;
-}
-
-.hljs-meta {
- color: #557182;
-}
-
-.hljs-tag,
-.hljs-name,
-.hljs-bullet,
-.hljs-subst,
-.hljs-emphasis,
-.hljs-type,
-.hljs-built_in,
-.hljs-selector-attr,
-.hljs-selector-pseudo,
-.hljs-addition,
-.hljs-variable,
-.hljs-template-tag,
-.hljs-template-variable {
- color: #8cbbad;
-}
-
-.hljs-string,
-.hljs-symbol {
- color: #ec7600;
-}
-
-.hljs-comment,
-.hljs-quote,
-.hljs-deletion {
- color: #818e96;
-}
-
-.hljs-selector-class {
- color: #A082BD
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-literal,
-.hljs-doctag,
-.hljs-title,
-.hljs-section,
-.hljs-type,
-.hljs-name,
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/ocean.css b/collectedstatic/highlight/styles/ocean.css
deleted file mode 100644
index 5901581..0000000
--- a/collectedstatic/highlight/styles/ocean.css
+++ /dev/null
@@ -1,74 +0,0 @@
-/* Ocean Dark Theme */
-/* https://github.com/gavsiu */
-/* Original theme - https://github.com/chriskempson/base16 */
-
-/* Ocean Comment */
-.hljs-comment,
-.hljs-quote {
- color: #65737e;
-}
-
-/* Ocean Red */
-.hljs-variable,
-.hljs-template-variable,
-.hljs-tag,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class,
-.hljs-regexp,
-.hljs-deletion {
- color: #bf616a;
-}
-
-/* Ocean Orange */
-.hljs-number,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-literal,
-.hljs-type,
-.hljs-params,
-.hljs-meta,
-.hljs-link {
- color: #d08770;
-}
-
-/* Ocean Yellow */
-.hljs-attribute {
- color: #ebcb8b;
-}
-
-/* Ocean Green */
-.hljs-string,
-.hljs-symbol,
-.hljs-bullet,
-.hljs-addition {
- color: #a3be8c;
-}
-
-/* Ocean Blue */
-.hljs-title,
-.hljs-section {
- color: #8fa1b3;
-}
-
-/* Ocean Purple */
-.hljs-keyword,
-.hljs-selector-tag {
- color: #b48ead;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #2b303b;
- color: #c0c5ce;
- padding: 0.5em;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/paraiso-dark.css b/collectedstatic/highlight/styles/paraiso-dark.css
deleted file mode 100644
index e729240..0000000
--- a/collectedstatic/highlight/styles/paraiso-dark.css
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- Paraíso (dark)
- Created by Jan T. Sott (http://github.com/idleberg)
- Inspired by the art of Rubens LP (http://www.rubenslp.com.br)
-*/
-
-/* Paraíso Comment */
-.hljs-comment,
-.hljs-quote {
- color: #8d8687;
-}
-
-/* Paraíso Red */
-.hljs-variable,
-.hljs-template-variable,
-.hljs-tag,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class,
-.hljs-regexp,
-.hljs-link,
-.hljs-meta {
- color: #ef6155;
-}
-
-/* Paraíso Orange */
-.hljs-number,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-literal,
-.hljs-type,
-.hljs-params,
-.hljs-deletion {
- color: #f99b15;
-}
-
-/* Paraíso Yellow */
-.hljs-title,
-.hljs-section,
-.hljs-attribute {
- color: #fec418;
-}
-
-/* Paraíso Green */
-.hljs-string,
-.hljs-symbol,
-.hljs-bullet,
-.hljs-addition {
- color: #48b685;
-}
-
-/* Paraíso Purple */
-.hljs-keyword,
-.hljs-selector-tag {
- color: #815ba4;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #2f1e2e;
- color: #a39e9b;
- padding: 0.5em;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/paraiso-light.css b/collectedstatic/highlight/styles/paraiso-light.css
deleted file mode 100644
index 944857c..0000000
--- a/collectedstatic/highlight/styles/paraiso-light.css
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- Paraíso (light)
- Created by Jan T. Sott (http://github.com/idleberg)
- Inspired by the art of Rubens LP (http://www.rubenslp.com.br)
-*/
-
-/* Paraíso Comment */
-.hljs-comment,
-.hljs-quote {
- color: #776e71;
-}
-
-/* Paraíso Red */
-.hljs-variable,
-.hljs-template-variable,
-.hljs-tag,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class,
-.hljs-regexp,
-.hljs-link,
-.hljs-meta {
- color: #ef6155;
-}
-
-/* Paraíso Orange */
-.hljs-number,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-literal,
-.hljs-type,
-.hljs-params,
-.hljs-deletion {
- color: #f99b15;
-}
-
-/* Paraíso Yellow */
-.hljs-title,
-.hljs-section,
-.hljs-attribute {
- color: #fec418;
-}
-
-/* Paraíso Green */
-.hljs-string,
-.hljs-symbol,
-.hljs-bullet,
-.hljs-addition {
- color: #48b685;
-}
-
-/* Paraíso Purple */
-.hljs-keyword,
-.hljs-selector-tag {
- color: #815ba4;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #e7e9db;
- color: #4f424c;
- padding: 0.5em;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/pojoaque.css b/collectedstatic/highlight/styles/pojoaque.css
deleted file mode 100644
index 2e07847..0000000
--- a/collectedstatic/highlight/styles/pojoaque.css
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
-
-Pojoaque Style by Jason Tate
-http://web-cms-designs.com/ftopict-10-pojoaque-style-for-highlight-js-code-highlighter.html
-Based on Solarized Style from http://ethanschoonover.com/solarized
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- color: #dccf8f;
- background: url(./pojoaque.jpg) repeat scroll left top #181914;
-}
-
-.hljs-comment,
-.hljs-quote {
- color: #586e75;
- font-style: italic;
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-literal,
-.hljs-addition {
- color: #b64926;
-}
-
-.hljs-number,
-.hljs-string,
-.hljs-doctag,
-.hljs-regexp {
- color: #468966;
-}
-
-.hljs-title,
-.hljs-section,
-.hljs-built_in,
-.hljs-name {
- color: #ffb03b;
-}
-
-.hljs-variable,
-.hljs-template-variable,
-.hljs-class .hljs-title,
-.hljs-type,
-.hljs-tag {
- color: #b58900;
-}
-
-.hljs-attribute {
- color: #b89859;
-}
-
-.hljs-symbol,
-.hljs-bullet,
-.hljs-link,
-.hljs-subst,
-.hljs-meta {
- color: #cb4b16;
-}
-
-.hljs-deletion {
- color: #dc322f;
-}
-
-.hljs-selector-id,
-.hljs-selector-class {
- color: #d3a60c;
-}
-
-.hljs-formula {
- background: #073642;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/pojoaque.jpg b/collectedstatic/highlight/styles/pojoaque.jpg
deleted file mode 100644
index 9c07d4a..0000000
Binary files a/collectedstatic/highlight/styles/pojoaque.jpg and /dev/null differ
diff --git a/collectedstatic/highlight/styles/purebasic.css b/collectedstatic/highlight/styles/purebasic.css
deleted file mode 100644
index 5ce9b9e..0000000
--- a/collectedstatic/highlight/styles/purebasic.css
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
-
-PureBASIC native IDE style ( version 1.0 - April 2016 )
-
-by Tristano Ajmone
-
-Public Domain
-
-NOTE_1: PureBASIC code syntax highlighting only applies the following classes:
- .hljs-comment
- .hljs-function
- .hljs-keywords
- .hljs-string
- .hljs-symbol
-
- Other classes are added here for the benefit of styling other languages with the look and feel of PureBASIC native IDE style.
- If you need to customize a stylesheet for PureBASIC only, remove all non-relevant classes -- PureBASIC-related classes are followed by
- a "--- used for PureBASIC ... ---" comment on same line.
-
-NOTE_2: Color names provided in comments were derived using "Name that Color" online tool:
- http://chir.ag/projects/name-that-color
-*/
-
-.hljs { /* Common set of rules required by highlight.js (don'r remove!) */
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #FFFFDF; /* Half and Half (approx.) */
-/* --- Uncomment to add PureBASIC native IDE styled font!
- font-family: Consolas;
-*/
-}
-
-.hljs, /* --- used for PureBASIC base color --- */
-.hljs-type, /* --- used for PureBASIC Procedures return type --- */
-.hljs-function, /* --- used for wrapping PureBASIC Procedures definitions --- */
-.hljs-name,
-.hljs-number,
-.hljs-attr,
-.hljs-params,
-.hljs-subst {
- color: #000000; /* Black */
-}
-
-.hljs-comment, /* --- used for PureBASIC Comments --- */
-.hljs-regexp,
-.hljs-section,
-.hljs-selector-pseudo,
-.hljs-addition {
- color: #00AAAA; /* Persian Green (approx.) */
-}
-
-.hljs-title, /* --- used for PureBASIC Procedures Names --- */
-.hljs-tag,
-.hljs-variable,
-.hljs-code {
- color: #006666; /* Blue Stone (approx.) */
-}
-
-.hljs-keyword, /* --- used for PureBASIC Keywords --- */
-.hljs-class,
-.hljs-meta-keyword,
-.hljs-selector-class,
-.hljs-built_in,
-.hljs-builtin-name {
- color: #006666; /* Blue Stone (approx.) */
- font-weight: bold;
-}
-
-.hljs-string, /* --- used for PureBASIC Strings --- */
-.hljs-selector-attr {
- color: #0080FF; /* Azure Radiance (approx.) */
-}
-
-.hljs-symbol, /* --- used for PureBASIC Constants --- */
-.hljs-link,
-.hljs-deletion,
-.hljs-attribute {
- color: #924B72; /* Cannon Pink (approx.) */
-}
-
-.hljs-meta,
-.hljs-literal,
-.hljs-selector-id {
- color: #924B72; /* Cannon Pink (approx.) */
- font-weight: bold;
-}
-
-.hljs-strong,
-.hljs-name {
- font-weight: bold;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
diff --git a/collectedstatic/highlight/styles/qtcreator_dark.css b/collectedstatic/highlight/styles/qtcreator_dark.css
deleted file mode 100644
index 7aa56a3..0000000
--- a/collectedstatic/highlight/styles/qtcreator_dark.css
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
-
-Qt Creator dark color scheme
-
-*/
-
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #000000;
-}
-
-.hljs,
-.hljs-subst,
-.hljs-tag,
-.hljs-title {
- color: #aaaaaa;
-}
-
-.hljs-strong,
-.hljs-emphasis {
- color: #a8a8a2;
-}
-
-.hljs-bullet,
-.hljs-quote,
-.hljs-number,
-.hljs-regexp,
-.hljs-literal {
- color: #ff55ff;
-}
-
-.hljs-code
-.hljs-selector-class {
- color: #aaaaff;
-}
-
-.hljs-emphasis,
-.hljs-stronge,
-.hljs-type {
- font-style: italic;
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-function,
-.hljs-section,
-.hljs-symbol,
-.hljs-name {
- color: #ffff55;
-}
-
-.hljs-attribute {
- color: #ff5555;
-}
-
-.hljs-variable,
-.hljs-params,
-.hljs-class .hljs-title {
- color: #8888ff;
-}
-
-.hljs-string,
-.hljs-selector-id,
-.hljs-selector-attr,
-.hljs-selector-pseudo,
-.hljs-type,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-template-tag,
-.hljs-template-variable,
-.hljs-addition,
-.hljs-link {
- color: #ff55ff;
-}
-
-.hljs-comment,
-.hljs-meta,
-.hljs-deletion {
- color: #55ffff;
-}
diff --git a/collectedstatic/highlight/styles/qtcreator_light.css b/collectedstatic/highlight/styles/qtcreator_light.css
deleted file mode 100644
index 1efa2c6..0000000
--- a/collectedstatic/highlight/styles/qtcreator_light.css
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
-
-Qt Creator light color scheme
-
-*/
-
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #ffffff;
-}
-
-.hljs,
-.hljs-subst,
-.hljs-tag,
-.hljs-title {
- color: #000000;
-}
-
-.hljs-strong,
-.hljs-emphasis {
- color: #000000;
-}
-
-.hljs-bullet,
-.hljs-quote,
-.hljs-number,
-.hljs-regexp,
-.hljs-literal {
- color: #000080;
-}
-
-.hljs-code
-.hljs-selector-class {
- color: #800080;
-}
-
-.hljs-emphasis,
-.hljs-stronge,
-.hljs-type {
- font-style: italic;
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-function,
-.hljs-section,
-.hljs-symbol,
-.hljs-name {
- color: #808000;
-}
-
-.hljs-attribute {
- color: #800000;
-}
-
-.hljs-variable,
-.hljs-params,
-.hljs-class .hljs-title {
- color: #0055AF;
-}
-
-.hljs-string,
-.hljs-selector-id,
-.hljs-selector-attr,
-.hljs-selector-pseudo,
-.hljs-type,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-template-tag,
-.hljs-template-variable,
-.hljs-addition,
-.hljs-link {
- color: #008000;
-}
-
-.hljs-comment,
-.hljs-meta,
-.hljs-deletion {
- color: #008000;
-}
diff --git a/collectedstatic/highlight/styles/railscasts.css b/collectedstatic/highlight/styles/railscasts.css
deleted file mode 100644
index 008cdc5..0000000
--- a/collectedstatic/highlight/styles/railscasts.css
+++ /dev/null
@@ -1,106 +0,0 @@
-/*
-
-Railscasts-like style (c) Visoft, Inc. (Damien White)
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #232323;
- color: #e6e1dc;
-}
-
-.hljs-comment,
-.hljs-quote {
- color: #bc9458;
- font-style: italic;
-}
-
-.hljs-keyword,
-.hljs-selector-tag {
- color: #c26230;
-}
-
-.hljs-string,
-.hljs-number,
-.hljs-regexp,
-.hljs-variable,
-.hljs-template-variable {
- color: #a5c261;
-}
-
-.hljs-subst {
- color: #519f50;
-}
-
-.hljs-tag,
-.hljs-name {
- color: #e8bf6a;
-}
-
-.hljs-type {
- color: #da4939;
-}
-
-
-.hljs-symbol,
-.hljs-bullet,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-attr,
-.hljs-link {
- color: #6d9cbe;
-}
-
-.hljs-params {
- color: #d0d0ff;
-}
-
-.hljs-attribute {
- color: #cda869;
-}
-
-.hljs-meta {
- color: #9b859d;
-}
-
-.hljs-title,
-.hljs-section {
- color: #ffc66d;
-}
-
-.hljs-addition {
- background-color: #144212;
- color: #e6e1dc;
- display: inline-block;
- width: 100%;
-}
-
-.hljs-deletion {
- background-color: #600;
- color: #e6e1dc;
- display: inline-block;
- width: 100%;
-}
-
-.hljs-selector-class {
- color: #9b703f;
-}
-
-.hljs-selector-id {
- color: #8b98ab;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
-
-.hljs-link {
- text-decoration: underline;
-}
diff --git a/collectedstatic/highlight/styles/rainbow.css b/collectedstatic/highlight/styles/rainbow.css
deleted file mode 100644
index 905eb8e..0000000
--- a/collectedstatic/highlight/styles/rainbow.css
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
-
-Style with support for rainbow parens
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #474949;
- color: #d1d9e1;
-}
-
-
-.hljs-comment,
-.hljs-quote {
- color: #969896;
- font-style: italic;
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-literal,
-.hljs-type,
-.hljs-addition {
- color: #cc99cc;
-}
-
-.hljs-number,
-.hljs-selector-attr,
-.hljs-selector-pseudo {
- color: #f99157;
-}
-
-.hljs-string,
-.hljs-doctag,
-.hljs-regexp {
- color: #8abeb7;
-}
-
-.hljs-title,
-.hljs-name,
-.hljs-section,
-.hljs-built_in {
- color: #b5bd68;
-}
-
-.hljs-variable,
-.hljs-template-variable,
-.hljs-selector-id,
-.hljs-class .hljs-title {
- color: #ffcc66;
-}
-
-.hljs-section,
-.hljs-name,
-.hljs-strong {
- font-weight: bold;
-}
-
-.hljs-symbol,
-.hljs-bullet,
-.hljs-subst,
-.hljs-meta,
-.hljs-link {
- color: #f99157;
-}
-
-.hljs-deletion {
- color: #dc322f;
-}
-
-.hljs-formula {
- background: #eee8d5;
-}
-
-.hljs-attr,
-.hljs-attribute {
- color: #81a2be;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
diff --git a/collectedstatic/highlight/styles/school-book.css b/collectedstatic/highlight/styles/school-book.css
deleted file mode 100644
index 964b51d..0000000
--- a/collectedstatic/highlight/styles/school-book.css
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
-
-School Book style from goldblog.com.ua (c) Zaripov Yura
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 15px 0.5em 0.5em 30px;
- font-size: 11px;
- line-height:16px;
-}
-
-pre{
- background:#f6f6ae url(./school-book.png);
- border-top: solid 2px #d2e8b9;
- border-bottom: solid 1px #d2e8b9;
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-literal {
- color:#005599;
- font-weight:bold;
-}
-
-.hljs,
-.hljs-subst {
- color: #3e5915;
-}
-
-.hljs-string,
-.hljs-title,
-.hljs-section,
-.hljs-type,
-.hljs-symbol,
-.hljs-bullet,
-.hljs-attribute,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-addition,
-.hljs-variable,
-.hljs-template-tag,
-.hljs-template-variable,
-.hljs-link {
- color: #2c009f;
-}
-
-.hljs-comment,
-.hljs-quote,
-.hljs-deletion,
-.hljs-meta {
- color: #e60415;
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-literal,
-.hljs-doctag,
-.hljs-title,
-.hljs-section,
-.hljs-type,
-.hljs-name,
-.hljs-selector-id,
-.hljs-strong {
- font-weight: bold;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
diff --git a/collectedstatic/highlight/styles/school-book.png b/collectedstatic/highlight/styles/school-book.png
deleted file mode 100644
index 956e979..0000000
Binary files a/collectedstatic/highlight/styles/school-book.png and /dev/null differ
diff --git a/collectedstatic/highlight/styles/solarized-dark.css b/collectedstatic/highlight/styles/solarized-dark.css
deleted file mode 100644
index b4c0da1..0000000
--- a/collectedstatic/highlight/styles/solarized-dark.css
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
-
-Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #002b36;
- color: #839496;
-}
-
-.hljs-comment,
-.hljs-quote {
- color: #586e75;
-}
-
-/* Solarized Green */
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-addition {
- color: #859900;
-}
-
-/* Solarized Cyan */
-.hljs-number,
-.hljs-string,
-.hljs-meta .hljs-meta-string,
-.hljs-literal,
-.hljs-doctag,
-.hljs-regexp {
- color: #2aa198;
-}
-
-/* Solarized Blue */
-.hljs-title,
-.hljs-section,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class {
- color: #268bd2;
-}
-
-/* Solarized Yellow */
-.hljs-attribute,
-.hljs-attr,
-.hljs-variable,
-.hljs-template-variable,
-.hljs-class .hljs-title,
-.hljs-type {
- color: #b58900;
-}
-
-/* Solarized Orange */
-.hljs-symbol,
-.hljs-bullet,
-.hljs-subst,
-.hljs-meta,
-.hljs-meta .hljs-keyword,
-.hljs-selector-attr,
-.hljs-selector-pseudo,
-.hljs-link {
- color: #cb4b16;
-}
-
-/* Solarized Red */
-.hljs-built_in,
-.hljs-deletion {
- color: #dc322f;
-}
-
-.hljs-formula {
- background: #073642;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/solarized-light.css b/collectedstatic/highlight/styles/solarized-light.css
deleted file mode 100644
index fdcfcc7..0000000
--- a/collectedstatic/highlight/styles/solarized-light.css
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
-
-Orginal Style from ethanschoonover.com/solarized (c) Jeremy Hull
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #fdf6e3;
- color: #657b83;
-}
-
-.hljs-comment,
-.hljs-quote {
- color: #93a1a1;
-}
-
-/* Solarized Green */
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-addition {
- color: #859900;
-}
-
-/* Solarized Cyan */
-.hljs-number,
-.hljs-string,
-.hljs-meta .hljs-meta-string,
-.hljs-literal,
-.hljs-doctag,
-.hljs-regexp {
- color: #2aa198;
-}
-
-/* Solarized Blue */
-.hljs-title,
-.hljs-section,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class {
- color: #268bd2;
-}
-
-/* Solarized Yellow */
-.hljs-attribute,
-.hljs-attr,
-.hljs-variable,
-.hljs-template-variable,
-.hljs-class .hljs-title,
-.hljs-type {
- color: #b58900;
-}
-
-/* Solarized Orange */
-.hljs-symbol,
-.hljs-bullet,
-.hljs-subst,
-.hljs-meta,
-.hljs-meta .hljs-keyword,
-.hljs-selector-attr,
-.hljs-selector-pseudo,
-.hljs-link {
- color: #cb4b16;
-}
-
-/* Solarized Red */
-.hljs-built_in,
-.hljs-deletion {
- color: #dc322f;
-}
-
-.hljs-formula {
- background: #eee8d5;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/sunburst.css b/collectedstatic/highlight/styles/sunburst.css
deleted file mode 100644
index f56dd5e..0000000
--- a/collectedstatic/highlight/styles/sunburst.css
+++ /dev/null
@@ -1,102 +0,0 @@
-/*
-
-Sunburst-like style (c) Vasily Polovnyov
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #000;
- color: #f8f8f8;
-}
-
-.hljs-comment,
-.hljs-quote {
- color: #aeaeae;
- font-style: italic;
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-type {
- color: #e28964;
-}
-
-.hljs-string {
- color: #65b042;
-}
-
-.hljs-subst {
- color: #daefa3;
-}
-
-.hljs-regexp,
-.hljs-link {
- color: #e9c062;
-}
-
-.hljs-title,
-.hljs-section,
-.hljs-tag,
-.hljs-name {
- color: #89bdff;
-}
-
-.hljs-class .hljs-title,
-.hljs-doctag {
- text-decoration: underline;
-}
-
-.hljs-symbol,
-.hljs-bullet,
-.hljs-number {
- color: #3387cc;
-}
-
-.hljs-params,
-.hljs-variable,
-.hljs-template-variable {
- color: #3e87e3;
-}
-
-.hljs-attribute {
- color: #cda869;
-}
-
-.hljs-meta {
- color: #8996a8;
-}
-
-.hljs-formula {
- background-color: #0e2231;
- color: #f8f8f8;
- font-style: italic;
-}
-
-.hljs-addition {
- background-color: #253b22;
- color: #f8f8f8;
-}
-
-.hljs-deletion {
- background-color: #420e09;
- color: #f8f8f8;
-}
-
-.hljs-selector-class {
- color: #9b703f;
-}
-
-.hljs-selector-id {
- color: #8b98ab;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/tomorrow-night-blue.css b/collectedstatic/highlight/styles/tomorrow-night-blue.css
deleted file mode 100644
index 78e59cc..0000000
--- a/collectedstatic/highlight/styles/tomorrow-night-blue.css
+++ /dev/null
@@ -1,75 +0,0 @@
-/* Tomorrow Night Blue Theme */
-/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
-/* Original theme - https://github.com/chriskempson/tomorrow-theme */
-/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
-
-/* Tomorrow Comment */
-.hljs-comment,
-.hljs-quote {
- color: #7285b7;
-}
-
-/* Tomorrow Red */
-.hljs-variable,
-.hljs-template-variable,
-.hljs-tag,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class,
-.hljs-regexp,
-.hljs-deletion {
- color: #ff9da4;
-}
-
-/* Tomorrow Orange */
-.hljs-number,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-literal,
-.hljs-type,
-.hljs-params,
-.hljs-meta,
-.hljs-link {
- color: #ffc58f;
-}
-
-/* Tomorrow Yellow */
-.hljs-attribute {
- color: #ffeead;
-}
-
-/* Tomorrow Green */
-.hljs-string,
-.hljs-symbol,
-.hljs-bullet,
-.hljs-addition {
- color: #d1f1a9;
-}
-
-/* Tomorrow Blue */
-.hljs-title,
-.hljs-section {
- color: #bbdaff;
-}
-
-/* Tomorrow Purple */
-.hljs-keyword,
-.hljs-selector-tag {
- color: #ebbbff;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #002451;
- color: white;
- padding: 0.5em;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/tomorrow-night-bright.css b/collectedstatic/highlight/styles/tomorrow-night-bright.css
deleted file mode 100644
index e05af8a..0000000
--- a/collectedstatic/highlight/styles/tomorrow-night-bright.css
+++ /dev/null
@@ -1,74 +0,0 @@
-/* Tomorrow Night Bright Theme */
-/* Original theme - https://github.com/chriskempson/tomorrow-theme */
-/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
-
-/* Tomorrow Comment */
-.hljs-comment,
-.hljs-quote {
- color: #969896;
-}
-
-/* Tomorrow Red */
-.hljs-variable,
-.hljs-template-variable,
-.hljs-tag,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class,
-.hljs-regexp,
-.hljs-deletion {
- color: #d54e53;
-}
-
-/* Tomorrow Orange */
-.hljs-number,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-literal,
-.hljs-type,
-.hljs-params,
-.hljs-meta,
-.hljs-link {
- color: #e78c45;
-}
-
-/* Tomorrow Yellow */
-.hljs-attribute {
- color: #e7c547;
-}
-
-/* Tomorrow Green */
-.hljs-string,
-.hljs-symbol,
-.hljs-bullet,
-.hljs-addition {
- color: #b9ca4a;
-}
-
-/* Tomorrow Blue */
-.hljs-title,
-.hljs-section {
- color: #7aa6da;
-}
-
-/* Tomorrow Purple */
-.hljs-keyword,
-.hljs-selector-tag {
- color: #c397d8;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: black;
- color: #eaeaea;
- padding: 0.5em;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/tomorrow-night-eighties.css b/collectedstatic/highlight/styles/tomorrow-night-eighties.css
deleted file mode 100644
index 08fd51c..0000000
--- a/collectedstatic/highlight/styles/tomorrow-night-eighties.css
+++ /dev/null
@@ -1,74 +0,0 @@
-/* Tomorrow Night Eighties Theme */
-/* Original theme - https://github.com/chriskempson/tomorrow-theme */
-/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
-
-/* Tomorrow Comment */
-.hljs-comment,
-.hljs-quote {
- color: #999999;
-}
-
-/* Tomorrow Red */
-.hljs-variable,
-.hljs-template-variable,
-.hljs-tag,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class,
-.hljs-regexp,
-.hljs-deletion {
- color: #f2777a;
-}
-
-/* Tomorrow Orange */
-.hljs-number,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-literal,
-.hljs-type,
-.hljs-params,
-.hljs-meta,
-.hljs-link {
- color: #f99157;
-}
-
-/* Tomorrow Yellow */
-.hljs-attribute {
- color: #ffcc66;
-}
-
-/* Tomorrow Green */
-.hljs-string,
-.hljs-symbol,
-.hljs-bullet,
-.hljs-addition {
- color: #99cc99;
-}
-
-/* Tomorrow Blue */
-.hljs-title,
-.hljs-section {
- color: #6699cc;
-}
-
-/* Tomorrow Purple */
-.hljs-keyword,
-.hljs-selector-tag {
- color: #cc99cc;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #2d2d2d;
- color: #cccccc;
- padding: 0.5em;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/tomorrow-night.css b/collectedstatic/highlight/styles/tomorrow-night.css
deleted file mode 100644
index ddd270a..0000000
--- a/collectedstatic/highlight/styles/tomorrow-night.css
+++ /dev/null
@@ -1,75 +0,0 @@
-/* Tomorrow Night Theme */
-/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
-/* Original theme - https://github.com/chriskempson/tomorrow-theme */
-/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
-
-/* Tomorrow Comment */
-.hljs-comment,
-.hljs-quote {
- color: #969896;
-}
-
-/* Tomorrow Red */
-.hljs-variable,
-.hljs-template-variable,
-.hljs-tag,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class,
-.hljs-regexp,
-.hljs-deletion {
- color: #cc6666;
-}
-
-/* Tomorrow Orange */
-.hljs-number,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-literal,
-.hljs-type,
-.hljs-params,
-.hljs-meta,
-.hljs-link {
- color: #de935f;
-}
-
-/* Tomorrow Yellow */
-.hljs-attribute {
- color: #f0c674;
-}
-
-/* Tomorrow Green */
-.hljs-string,
-.hljs-symbol,
-.hljs-bullet,
-.hljs-addition {
- color: #b5bd68;
-}
-
-/* Tomorrow Blue */
-.hljs-title,
-.hljs-section {
- color: #81a2be;
-}
-
-/* Tomorrow Purple */
-.hljs-keyword,
-.hljs-selector-tag {
- color: #b294bb;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: #1d1f21;
- color: #c5c8c6;
- padding: 0.5em;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/tomorrow.css b/collectedstatic/highlight/styles/tomorrow.css
deleted file mode 100644
index 026a62f..0000000
--- a/collectedstatic/highlight/styles/tomorrow.css
+++ /dev/null
@@ -1,72 +0,0 @@
-/* http://jmblog.github.com/color-themes-for-google-code-highlightjs */
-
-/* Tomorrow Comment */
-.hljs-comment,
-.hljs-quote {
- color: #8e908c;
-}
-
-/* Tomorrow Red */
-.hljs-variable,
-.hljs-template-variable,
-.hljs-tag,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class,
-.hljs-regexp,
-.hljs-deletion {
- color: #c82829;
-}
-
-/* Tomorrow Orange */
-.hljs-number,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-literal,
-.hljs-type,
-.hljs-params,
-.hljs-meta,
-.hljs-link {
- color: #f5871f;
-}
-
-/* Tomorrow Yellow */
-.hljs-attribute {
- color: #eab700;
-}
-
-/* Tomorrow Green */
-.hljs-string,
-.hljs-symbol,
-.hljs-bullet,
-.hljs-addition {
- color: #718c00;
-}
-
-/* Tomorrow Blue */
-.hljs-title,
-.hljs-section {
- color: #4271ae;
-}
-
-/* Tomorrow Purple */
-.hljs-keyword,
-.hljs-selector-tag {
- color: #8959a8;
-}
-
-.hljs {
- display: block;
- overflow-x: auto;
- background: white;
- color: #4d4d4c;
- padding: 0.5em;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/vs.css b/collectedstatic/highlight/styles/vs.css
deleted file mode 100644
index c5d07d3..0000000
--- a/collectedstatic/highlight/styles/vs.css
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
-
-Visual Studio-like style based on original C# coloring by Jason Diamond
-
-*/
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: white;
- color: black;
-}
-
-.hljs-comment,
-.hljs-quote,
-.hljs-variable {
- color: #008000;
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-built_in,
-.hljs-name,
-.hljs-tag {
- color: #00f;
-}
-
-.hljs-string,
-.hljs-title,
-.hljs-section,
-.hljs-attribute,
-.hljs-literal,
-.hljs-template-tag,
-.hljs-template-variable,
-.hljs-type,
-.hljs-addition {
- color: #a31515;
-}
-
-.hljs-deletion,
-.hljs-selector-attr,
-.hljs-selector-pseudo,
-.hljs-meta {
- color: #2b91af;
-}
-
-.hljs-doctag {
- color: #808080;
-}
-
-.hljs-attr {
- color: #f00;
-}
-
-.hljs-symbol,
-.hljs-bullet,
-.hljs-link {
- color: #00b0e8;
-}
-
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/highlight/styles/xcode.css b/collectedstatic/highlight/styles/xcode.css
deleted file mode 100644
index 43dddad..0000000
--- a/collectedstatic/highlight/styles/xcode.css
+++ /dev/null
@@ -1,93 +0,0 @@
-/*
-
-XCode style (c) Angel Garcia
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #fff;
- color: black;
-}
-
-.hljs-comment,
-.hljs-quote {
- color: #006a00;
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-literal {
- color: #aa0d91;
-}
-
-.hljs-name {
- color: #008;
-}
-
-.hljs-variable,
-.hljs-template-variable {
- color: #660;
-}
-
-.hljs-string {
- color: #c41a16;
-}
-
-.hljs-regexp,
-.hljs-link {
- color: #080;
-}
-
-.hljs-title,
-.hljs-tag,
-.hljs-symbol,
-.hljs-bullet,
-.hljs-number,
-.hljs-meta {
- color: #1c00cf;
-}
-
-.hljs-section,
-.hljs-class .hljs-title,
-.hljs-type,
-.hljs-attr,
-.hljs-built_in,
-.hljs-builtin-name,
-.hljs-params {
- color: #5c2699;
-}
-
-.hljs-attribute,
-.hljs-subst {
- color: #000;
-}
-
-.hljs-formula {
- background-color: #eee;
- font-style: italic;
-}
-
-.hljs-addition {
- background-color: #baeeba;
-}
-
-.hljs-deletion {
- background-color: #ffc8bd;
-}
-
-.hljs-selector-id,
-.hljs-selector-class {
- color: #9b703f;
-}
-
-.hljs-doctag,
-.hljs-strong {
- font-weight: bold;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
diff --git a/collectedstatic/highlight/styles/xt256.css b/collectedstatic/highlight/styles/xt256.css
deleted file mode 100644
index 58df82c..0000000
--- a/collectedstatic/highlight/styles/xt256.css
+++ /dev/null
@@ -1,92 +0,0 @@
-
-/*
- xt256.css
-
- Contact: initbar [at] protonmail [dot] ch
- : github.com/initbar
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- color: #eaeaea;
- background: #000;
- padding: 0.5;
-}
-
-.hljs-subst {
- color: #eaeaea;
-}
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
-
-.hljs-builtin-name,
-.hljs-type {
- color: #eaeaea;
-}
-
-.hljs-params {
- color: #da0000;
-}
-
-.hljs-literal,
-.hljs-number,
-.hljs-name {
- color: #ff0000;
- font-weight: bolder;
-}
-
-.hljs-comment {
- color: #969896;
-}
-
-.hljs-selector-id,
-.hljs-quote {
- color: #00ffff;
-}
-
-.hljs-template-variable,
-.hljs-variable,
-.hljs-title {
- color: #00ffff;
- font-weight: bold;
-}
-
-.hljs-selector-class,
-.hljs-keyword,
-.hljs-symbol {
- color: #fff000;
-}
-
-.hljs-string,
-.hljs-bullet {
- color: #00ff00;
-}
-
-.hljs-tag,
-.hljs-section {
- color: #000fff;
-}
-
-.hljs-selector-tag {
- color: #000fff;
- font-weight: bold;
-}
-
-.hljs-attribute,
-.hljs-built_in,
-.hljs-regexp,
-.hljs-link {
- color: #ff00ff;
-}
-
-.hljs-meta {
- color: #fff;
- font-weight: bolder;
-}
diff --git a/collectedstatic/highlight/styles/zenburn.css b/collectedstatic/highlight/styles/zenburn.css
deleted file mode 100644
index 07be502..0000000
--- a/collectedstatic/highlight/styles/zenburn.css
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
-
-Zenburn style from voldmar.ru (c) Vladimir Epifanov
-based on dark.css by Ivan Sagalaev
-
-*/
-
-.hljs {
- display: block;
- overflow-x: auto;
- padding: 0.5em;
- background: #3f3f3f;
- color: #dcdcdc;
-}
-
-.hljs-keyword,
-.hljs-selector-tag,
-.hljs-tag {
- color: #e3ceab;
-}
-
-.hljs-template-tag {
- color: #dcdcdc;
-}
-
-.hljs-number {
- color: #8cd0d3;
-}
-
-.hljs-variable,
-.hljs-template-variable,
-.hljs-attribute {
- color: #efdcbc;
-}
-
-.hljs-literal {
- color: #efefaf;
-}
-
-.hljs-subst {
- color: #8f8f8f;
-}
-
-.hljs-title,
-.hljs-name,
-.hljs-selector-id,
-.hljs-selector-class,
-.hljs-section,
-.hljs-type {
- color: #efef8f;
-}
-
-.hljs-symbol,
-.hljs-bullet,
-.hljs-link {
- color: #dca3a3;
-}
-
-.hljs-deletion,
-.hljs-string,
-.hljs-built_in,
-.hljs-builtin-name {
- color: #cc9393;
-}
-
-.hljs-addition,
-.hljs-comment,
-.hljs-quote,
-.hljs-meta {
- color: #7f9f7f;
-}
-
-
-.hljs-emphasis {
- font-style: italic;
-}
-
-.hljs-strong {
- font-weight: bold;
-}
diff --git a/collectedstatic/pagedown-extra/Markdown.Extra.js b/collectedstatic/pagedown-extra/Markdown.Extra.js
deleted file mode 100644
index d3b859a..0000000
--- a/collectedstatic/pagedown-extra/Markdown.Extra.js
+++ /dev/null
@@ -1,874 +0,0 @@
-(function () {
- // A quick way to make sure we're only keeping span-level tags when we need to.
- // This isn't supposed to be foolproof. It's just a quick way to make sure we
- // keep all span-level tags returned by a pagedown converter. It should allow
- // all span-level tags through, with or without attributes.
- var inlineTags = new RegExp(['^(<\\/?(a|abbr|acronym|applet|area|b|basefont|',
- 'bdo|big|button|cite|code|del|dfn|em|figcaption|',
- 'font|i|iframe|img|input|ins|kbd|label|map|',
- 'mark|meter|object|param|progress|q|ruby|rp|rt|s|',
- 'samp|script|select|small|span|strike|strong|',
- 'sub|sup|textarea|time|tt|u|var|wbr)[^>]*>|',
- '<(br)\\s?\\/?>)$'].join(''), 'i');
-
- /******************************************************************
- * Utility Functions *
- *****************************************************************/
-
- // patch for ie7
- if (!Array.indexOf) {
- Array.prototype.indexOf = function(obj) {
- for (var i = 0; i < this.length; i++) {
- if (this[i] == obj) {
- return i;
- }
- }
- return -1;
- };
- }
-
- function trim(str) {
- return str.replace(/^\s+|\s+$/g, '');
- }
-
- function rtrim(str) {
- return str.replace(/\s+$/g, '');
- }
-
- // Remove one level of indentation from text. Indent is 4 spaces.
- function outdent(text) {
- return text.replace(new RegExp('^(\\t|[ ]{1,4})', 'gm'), '');
- }
-
- function contains(str, substr) {
- return str.indexOf(substr) != -1;
- }
-
- // Sanitize html, removing tags that aren't in the whitelist
- function sanitizeHtml(html, whitelist) {
- return html.replace(/<[^>]*>?/gi, function(tag) {
- return tag.match(whitelist) ? tag : '';
- });
- }
-
- // Merge two arrays, keeping only unique elements.
- function union(x, y) {
- var obj = {};
- for (var i = 0; i < x.length; i++)
- obj[x[i]] = x[i];
- for (i = 0; i < y.length; i++)
- obj[y[i]] = y[i];
- var res = [];
- for (var k in obj) {
- if (obj.hasOwnProperty(k))
- res.push(obj[k]);
- }
- return res;
- }
-
- // JS regexes don't support \A or \Z, so we add sentinels, as Pagedown
- // does. In this case, we add the ascii codes for start of text (STX) and
- // end of text (ETX), an idea borrowed from:
- // https://github.com/tanakahisateru/js-markdown-extra
- function addAnchors(text) {
- if(text.charAt(0) != '\x02')
- text = '\x02' + text;
- if(text.charAt(text.length - 1) != '\x03')
- text = text + '\x03';
- return text;
- }
-
- // Remove STX and ETX sentinels.
- function removeAnchors(text) {
- if(text.charAt(0) == '\x02')
- text = text.substr(1);
- if(text.charAt(text.length - 1) == '\x03')
- text = text.substr(0, text.length - 1);
- return text;
- }
-
- // Convert markdown within an element, retaining only span-level tags
- function convertSpans(text, extra) {
- return sanitizeHtml(convertAll(text, extra), inlineTags);
- }
-
- // Convert internal markdown using the stock pagedown converter
- function convertAll(text, extra) {
- var result = extra.blockGamutHookCallback(text);
- // We need to perform these operations since we skip the steps in the converter
- result = unescapeSpecialChars(result);
- result = result.replace(/~D/g, "$$").replace(/~T/g, "~");
- result = extra.previousPostConversion(result);
- return result;
- }
-
- // Convert escaped special characters
- function processEscapesStep1(text) {
- // Markdown extra adds two escapable characters, `:` and `|`
- return text.replace(/\\\|/g, '~I').replace(/\\:/g, '~i');
- }
- function processEscapesStep2(text) {
- return text.replace(/~I/g, '|').replace(/~i/g, ':');
- }
-
- // Duplicated from PageDown converter
- function unescapeSpecialChars(text) {
- // Swap back in all the special characters we've hidden.
- text = text.replace(/~E(\d+)E/g, function(wholeMatch, m1) {
- var charCodeToReplace = parseInt(m1);
- return String.fromCharCode(charCodeToReplace);
- });
- return text;
- }
-
- function slugify(text) {
- return text.toLowerCase()
- .replace(/\s+/g, '-') // Replace spaces with -
- .replace(/[^\w\-]+/g, '') // Remove all non-word chars
- .replace(/\-\-+/g, '-') // Replace multiple - with single -
- .replace(/^-+/, '') // Trim - from start of text
- .replace(/-+$/, ''); // Trim - from end of text
- }
-
- /*****************************************************************************
- * Markdown.Extra *
- ****************************************************************************/
-
- Markdown.Extra = function() {
- // For converting internal markdown (in tables for instance).
- // This is necessary since these methods are meant to be called as
- // preConversion hooks, and the Markdown converter passed to init()
- // won't convert any markdown contained in the html tags we return.
- this.converter = null;
-
- // Stores html blocks we generate in hooks so that
- // they're not destroyed if the user is using a sanitizing converter
- this.hashBlocks = [];
-
- // Stores footnotes
- this.footnotes = {};
- this.usedFootnotes = [];
-
- // Special attribute blocks for fenced code blocks and headers enabled.
- this.attributeBlocks = false;
-
- // Fenced code block options
- this.googleCodePrettify = false;
- this.highlightJs = false;
-
- // Table options
- this.tableClass = '';
-
- this.tabWidth = 4;
- };
-
- Markdown.Extra.init = function(converter, options) {
- // Each call to init creates a new instance of Markdown.Extra so it's
- // safe to have multiple converters, with different options, on a single page
- var extra = new Markdown.Extra();
- var postNormalizationTransformations = [];
- var preBlockGamutTransformations = [];
- var postSpanGamutTransformations = [];
- var postConversionTransformations = ["unHashExtraBlocks"];
-
- options = options || {};
- options.extensions = options.extensions || ["all"];
- if (contains(options.extensions, "all")) {
- options.extensions = ["tables", "fenced_code_gfm", "def_list", "attr_list", "footnotes", "smartypants", "strikethrough", "newlines"];
- }
- preBlockGamutTransformations.push("wrapHeaders");
- if (contains(options.extensions, "attr_list")) {
- postNormalizationTransformations.push("hashFcbAttributeBlocks");
- preBlockGamutTransformations.push("hashHeaderAttributeBlocks");
- postConversionTransformations.push("applyAttributeBlocks");
- extra.attributeBlocks = true;
- }
- if (contains(options.extensions, "fenced_code_gfm")) {
- // This step will convert fcb inside list items and blockquotes
- preBlockGamutTransformations.push("fencedCodeBlocks");
- // This extra step is to prevent html blocks hashing and link definition/footnotes stripping inside fcb
- postNormalizationTransformations.push("fencedCodeBlocks");
- }
- if (contains(options.extensions, "tables")) {
- preBlockGamutTransformations.push("tables");
- }
- if (contains(options.extensions, "def_list")) {
- preBlockGamutTransformations.push("definitionLists");
- }
- if (contains(options.extensions, "footnotes")) {
- postNormalizationTransformations.push("stripFootnoteDefinitions");
- preBlockGamutTransformations.push("doFootnotes");
- postConversionTransformations.push("printFootnotes");
- }
- if (contains(options.extensions, "smartypants")) {
- postConversionTransformations.push("runSmartyPants");
- }
- if (contains(options.extensions, "strikethrough")) {
- postSpanGamutTransformations.push("strikethrough");
- }
- if (contains(options.extensions, "newlines")) {
- postSpanGamutTransformations.push("newlines");
- }
-
- converter.hooks.chain("postNormalization", function(text) {
- return extra.doTransform(postNormalizationTransformations, text) + '\n';
- });
-
- converter.hooks.chain("preBlockGamut", function(text, blockGamutHookCallback) {
- // Keep a reference to the block gamut callback to run recursively
- extra.blockGamutHookCallback = blockGamutHookCallback;
- text = processEscapesStep1(text);
- text = extra.doTransform(preBlockGamutTransformations, text) + '\n';
- text = processEscapesStep2(text);
- return text;
- });
-
- converter.hooks.chain("postSpanGamut", function(text) {
- return extra.doTransform(postSpanGamutTransformations, text);
- });
-
- // Keep a reference to the hook chain running before doPostConversion to apply on hashed extra blocks
- extra.previousPostConversion = converter.hooks.postConversion;
- converter.hooks.chain("postConversion", function(text) {
- text = extra.doTransform(postConversionTransformations, text);
- // Clear state vars that may use unnecessary memory
- extra.hashBlocks = [];
- extra.footnotes = {};
- extra.usedFootnotes = [];
- return text;
- });
-
- if ("highlighter" in options) {
- extra.googleCodePrettify = options.highlighter === 'prettify';
- extra.highlightJs = options.highlighter === 'highlight';
- }
-
- if ("table_class" in options) {
- extra.tableClass = options.table_class;
- }
-
- extra.converter = converter;
-
- // Caller usually won't need this, but it's handy for testing.
- return extra;
- };
-
- // Do transformations
- Markdown.Extra.prototype.doTransform = function(transformations, text) {
- for(var i = 0; i < transformations.length; i++)
- text = this[transformations[i]](text);
- return text;
- };
-
- // Return a placeholder containing a key, which is the block's index in the
- // hashBlocks array. We wrap our output in a tag here so Pagedown won't.
- Markdown.Extra.prototype.hashExtraBlock = function(block) {
- return '\n
~X' + (this.hashBlocks.push(block) - 1) + 'X
\n';
- };
- Markdown.Extra.prototype.hashExtraInline = function(block) {
- return '~X' + (this.hashBlocks.push(block) - 1) + 'X';
- };
-
- // Replace placeholder blocks in `text` with their corresponding
- // html blocks in the hashBlocks array.
- Markdown.Extra.prototype.unHashExtraBlocks = function(text) {
- var self = this;
- function recursiveUnHash() {
- var hasHash = false;
- text = text.replace(/(?:)?~X(\d+)X(?:<\/p>)?/g, function(wholeMatch, m1) {
- hasHash = true;
- var key = parseInt(m1, 10);
- return self.hashBlocks[key];
- });
- if(hasHash === true) {
- recursiveUnHash();
- }
- }
- recursiveUnHash();
- return text;
- };
-
- // Wrap headers to make sure they won't be in def lists
- Markdown.Extra.prototype.wrapHeaders = function(text) {
- function wrap(text) {
- return '\n' + text + '\n';
- }
- text = text.replace(/^.+[ \t]*\n=+[ \t]*\n+/gm, wrap);
- text = text.replace(/^.+[ \t]*\n-+[ \t]*\n+/gm, wrap);
- text = text.replace(/^\#{1,6}[ \t]*.+?[ \t]*\#*\n+/gm, wrap);
- return text;
- };
-
-
- /******************************************************************
- * Attribute Blocks *
- *****************************************************************/
-
- // TODO: use sentinels. Should we just add/remove them in doConversion?
- // TODO: better matches for id / class attributes
- var attrBlock = "\\{[ \\t]*((?:[#.][-_:a-zA-Z0-9]+[ \\t]*)+)\\}";
- var hdrAttributesA = new RegExp("^(#{1,6}.*#{0,6})[ \\t]+" + attrBlock + "[ \\t]*(?:\\n|0x03)", "gm");
- var hdrAttributesB = new RegExp("^(.*)[ \\t]+" + attrBlock + "[ \\t]*\\n" +
- "(?=[\\-|=]+\\s*(?:\\n|0x03))", "gm"); // underline lookahead
- var fcbAttributes = new RegExp("^(```[^`\\n]*)[ \\t]+" + attrBlock + "[ \\t]*\\n" +
- "(?=([\\s\\S]*?)\\n```[ \\t]*(\\n|0x03))", "gm");
-
- // Extract headers attribute blocks, move them above the element they will be
- // applied to, and hash them for later.
- Markdown.Extra.prototype.hashHeaderAttributeBlocks = function(text) {
-
- var self = this;
- function attributeCallback(wholeMatch, pre, attr) {
- return '
~XX' + (self.hashBlocks.push(attr) - 1) + 'XX
\n' + pre + "\n";
- }
-
- text = text.replace(hdrAttributesA, attributeCallback); // ## headers
- text = text.replace(hdrAttributesB, attributeCallback); // underline headers
- return text;
- };
-
- // Extract FCB attribute blocks, move them above the element they will be
- // applied to, and hash them for later.
- Markdown.Extra.prototype.hashFcbAttributeBlocks = function(text) {
- // TODO: use sentinels. Should we just add/remove them in doConversion?
- // TODO: better matches for id / class attributes
-
- var self = this;
- function attributeCallback(wholeMatch, pre, attr) {
- return '~XX' + (self.hashBlocks.push(attr) - 1) + 'XX
\n' + pre + "\n";
- }
-
- return text.replace(fcbAttributes, attributeCallback);
- };
-
- Markdown.Extra.prototype.applyAttributeBlocks = function(text) {
- var self = this;
- var blockRe = new RegExp('~XX(\\d+)XX
[\\s]*' +
- '(?:<(h[1-6]|pre)(?: +class="(\\S+)")?(>[\\s\\S]*?\\2>))', "gm");
- text = text.replace(blockRe, function(wholeMatch, k, tag, cls, rest) {
- if (!tag) // no following header or fenced code block.
- return '';
-
- // get attributes list from hash
- var key = parseInt(k, 10);
- var attributes = self.hashBlocks[key];
-
- // get id
- var id = attributes.match(/#[^\s#.]+/g) || [];
- var idStr = id[0] ? ' id="' + id[0].substr(1, id[0].length - 1) + '"' : '';
-
- // get classes and merge with existing classes
- var classes = attributes.match(/\.[^\s#.]+/g) || [];
- for (var i = 0; i < classes.length; i++) // Remove leading dot
- classes[i] = classes[i].substr(1, classes[i].length - 1);
-
- var classStr = '';
- if (cls)
- classes = union(classes, [cls]);
-
- if (classes.length > 0)
- classStr = ' class="' + classes.join(' ') + '"';
-
- return "<" + tag + idStr + classStr + rest;
- });
-
- return text;
- };
-
- /******************************************************************
- * Tables *
- *****************************************************************/
-
- // Find and convert Markdown Extra tables into html.
- Markdown.Extra.prototype.tables = function(text) {
- var self = this;
-
- var leadingPipe = new RegExp(
- ['^' ,
- '[ ]{0,3}' , // Allowed whitespace
- '[|]' , // Initial pipe
- '(.+)\\n' , // $1: Header Row
-
- '[ ]{0,3}' , // Allowed whitespace
- '[|]([ ]*[-:]+[-| :]*)\\n' , // $2: Separator
-
- '(' , // $3: Table Body
- '(?:[ ]*[|].*\\n?)*' , // Table rows
- ')',
- '(?:\\n|$)' // Stop at final newline
- ].join(''),
- 'gm'
- );
-
- var noLeadingPipe = new RegExp(
- ['^' ,
- '[ ]{0,3}' , // Allowed whitespace
- '(\\S.*[|].*)\\n' , // $1: Header Row
-
- '[ ]{0,3}' , // Allowed whitespace
- '([-:]+[ ]*[|][-| :]*)\\n' , // $2: Separator
-
- '(' , // $3: Table Body
- '(?:.*[|].*\\n?)*' , // Table rows
- ')' ,
- '(?:\\n|$)' // Stop at final newline
- ].join(''),
- 'gm'
- );
-
- text = text.replace(leadingPipe, doTable);
- text = text.replace(noLeadingPipe, doTable);
-
- // $1 = header, $2 = separator, $3 = body
- function doTable(match, header, separator, body, offset, string) {
- // remove any leading pipes and whitespace
- header = header.replace(/^ *[|]/m, '');
- separator = separator.replace(/^ *[|]/m, '');
- body = body.replace(/^ *[|]/gm, '');
-
- // remove trailing pipes and whitespace
- header = header.replace(/[|] *$/m, '');
- separator = separator.replace(/[|] *$/m, '');
- body = body.replace(/[|] *$/gm, '');
-
- // determine column alignments
- var alignspecs = separator.split(/ *[|] */);
- var align = [];
- for (var i = 0; i < alignspecs.length; i++) {
- var spec = alignspecs[i];
- if (spec.match(/^ *-+: *$/m))
- align[i] = ' align="right"';
- else if (spec.match(/^ *:-+: *$/m))
- align[i] = ' align="center"';
- else if (spec.match(/^ *:-+ *$/m))
- align[i] = ' align="left"';
- else align[i] = '';
- }
-
- // TODO: parse spans in header and rows before splitting, so that pipes
- // inside of tags are not interpreted as separators
- var headers = header.split(/ *[|] */);
- var colCount = headers.length;
-
- // build html
- var cls = self.tableClass ? ' class="' + self.tableClass + '"' : '';
- var html = ['\n', '\n', '\n'].join('');
-
- // build column headers.
- for (i = 0; i < colCount; i++) {
- var headerHtml = convertSpans(trim(headers[i]), self);
- html += [" ", headerHtml, " \n"].join('');
- }
- html += " \n \n";
-
- // build rows
- var rows = body.split('\n');
- for (i = 0; i < rows.length; i++) {
- if (rows[i].match(/^\s*$/)) // can apply to final row
- continue;
-
- // ensure number of rowCells matches colCount
- var rowCells = rows[i].split(/ *[|] */);
- var lenDiff = colCount - rowCells.length;
- for (var j = 0; j < lenDiff; j++)
- rowCells.push('');
-
- html += "\n";
- for (j = 0; j < colCount; j++) {
- var colHtml = convertSpans(trim(rowCells[j]), self);
- html += [" ", colHtml, " \n"].join('');
- }
- html += " \n";
- }
-
- html += "
\n";
-
- // replace html with placeholder until postConversion step
- return self.hashExtraBlock(html);
- }
-
- return text;
- };
-
-
- /******************************************************************
- * Footnotes *
- *****************************************************************/
-
- // Strip footnote, store in hashes.
- Markdown.Extra.prototype.stripFootnoteDefinitions = function(text) {
- var self = this;
-
- text = text.replace(
- /\n[ ]{0,3}\[\^(.+?)\]\:[ \t]*\n?([\s\S]*?)\n{1,2}((?=\n[ ]{0,3}\S)|$)/g,
- function(wholeMatch, m1, m2) {
- m1 = slugify(m1);
- m2 += "\n";
- m2 = m2.replace(/^[ ]{0,3}/g, "");
- self.footnotes[m1] = m2;
- return "\n";
- });
-
- return text;
- };
-
-
- // Find and convert footnotes references.
- Markdown.Extra.prototype.doFootnotes = function(text) {
- var self = this;
- if(self.isConvertingFootnote === true) {
- return text;
- }
-
- var footnoteCounter = 0;
- text = text.replace(/\[\^(.+?)\]/g, function(wholeMatch, m1) {
- var id = slugify(m1);
- var footnote = self.footnotes[id];
- if (footnote === undefined) {
- return wholeMatch;
- }
- footnoteCounter++;
- self.usedFootnotes.push(id);
- var html = '';
- return self.hashExtraInline(html);
- });
-
- return text;
- };
-
- // Print footnotes at the end of the document
- Markdown.Extra.prototype.printFootnotes = function(text) {
- var self = this;
-
- if (self.usedFootnotes.length === 0) {
- return text;
- }
-
- text += '\n\n';
- return text;
- };
-
-
- /******************************************************************
- * Fenced Code Blocks (gfm) *
- ******************************************************************/
-
- // Find and convert gfm-inspired fenced code blocks into html.
- Markdown.Extra.prototype.fencedCodeBlocks = function(text) {
- function encodeCode(code) {
- code = code.replace(/&/g, "&");
- code = code.replace(//g, ">");
- // These were escaped by PageDown before postNormalization
- code = code.replace(/~D/g, "$$");
- code = code.replace(/~T/g, "~");
- return code;
- }
-
- var self = this;
- text = text.replace(/(?:^|\n)```([^`\n]*)\n([\s\S]*?)\n```[ \t]*(?=\n)/g, function(match, m1, m2) {
- var language = trim(m1), codeblock = m2;
-
- // adhere to specified options
- var preclass = self.googleCodePrettify ? ' class="prettyprint"' : '';
- var codeclass = '';
- if (language) {
- if (self.googleCodePrettify || self.highlightJs) {
- // use html5 language- class names. supported by both prettify and highlight.js
- codeclass = ' class="language-' + language + '"';
- } else {
- codeclass = ' class="' + language + '"';
- }
- }
-
- var html = ['',
- encodeCode(codeblock), ' '].join('');
-
- // replace codeblock with placeholder until postConversion step
- return self.hashExtraBlock(html);
- });
-
- return text;
- };
-
-
- /******************************************************************
- * SmartyPants *
- ******************************************************************/
-
- Markdown.Extra.prototype.educatePants = function(text) {
- var self = this;
- var result = '';
- var blockOffset = 0;
- // Here we parse HTML in a very bad manner
- text.replace(/(?:)|(<)([a-zA-Z1-6]+)([^\n]*?>)([\s\S]*?)(<\/\2>)/g, function(wholeMatch, m1, m2, m3, m4, m5, offset) {
- var token = text.substring(blockOffset, offset);
- result += self.applyPants(token);
- self.smartyPantsLastChar = result.substring(result.length - 1);
- blockOffset = offset + wholeMatch.length;
- if(!m1) {
- // Skip commentary
- result += wholeMatch;
- return;
- }
- // Skip special tags
- if(!/code|kbd|pre|script|noscript|iframe|math|ins|del|pre/i.test(m2)) {
- m4 = self.educatePants(m4);
- }
- else {
- self.smartyPantsLastChar = m4.substring(m4.length - 1);
- }
- result += m1 + m2 + m3 + m4 + m5;
- });
- var lastToken = text.substring(blockOffset);
- result += self.applyPants(lastToken);
- self.smartyPantsLastChar = result.substring(result.length - 1);
- return result;
- };
-
- function revertPants(wholeMatch, m1) {
- var blockText = m1;
- blockText = blockText.replace(/&\#8220;/g, "\"");
- blockText = blockText.replace(/&\#8221;/g, "\"");
- blockText = blockText.replace(/&\#8216;/g, "'");
- blockText = blockText.replace(/&\#8217;/g, "'");
- blockText = blockText.replace(/&\#8212;/g, "---");
- blockText = blockText.replace(/&\#8211;/g, "--");
- blockText = blockText.replace(/&\#8230;/g, "...");
- return blockText;
- }
-
- Markdown.Extra.prototype.applyPants = function(text) {
- // Dashes
- text = text.replace(/---/g, "—").replace(/--/g, "–");
- // Ellipses
- text = text.replace(/\.\.\./g, "…").replace(/\.\s\.\s\./g, "…");
- // Backticks
- text = text.replace(/``/g, "“").replace (/''/g, "”");
-
- if(/^'$/.test(text)) {
- // Special case: single-character ' token
- if(/\S/.test(this.smartyPantsLastChar)) {
- return "’";
- }
- return "‘";
- }
- if(/^"$/.test(text)) {
- // Special case: single-character " token
- if(/\S/.test(this.smartyPantsLastChar)) {
- return "”";
- }
- return "“";
- }
-
- // Special case if the very first character is a quote
- // followed by punctuation at a non-word-break. Close the quotes by brute force:
- text = text.replace (/^'(?=[!"#\$\%'()*+,\-.\/:;<=>?\@\[\\]\^_`{|}~]\B)/, "’");
- text = text.replace (/^"(?=[!"#\$\%'()*+,\-.\/:;<=>?\@\[\\]\^_`{|}~]\B)/, "”");
-
- // Special case for double sets of quotes, e.g.:
- // He said, "'Quoted' words in a larger quote."
- text = text.replace(/"'(?=\w)/g, "“‘");
- text = text.replace(/'"(?=\w)/g, "‘“");
-
- // Special case for decade abbreviations (the '80s):
- text = text.replace(/'(?=\d{2}s)/g, "’");
-
- // Get most opening single quotes:
- text = text.replace(/(\s| |--|&[mn]dash;|&\#8211;|&\#8212;|&\#x201[34];)'(?=\w)/g, "$1‘");
-
- // Single closing quotes:
- text = text.replace(/([^\s\[\{\(\-])'/g, "$1’");
- text = text.replace(/'(?=\s|s\b)/g, "’");
-
- // Any remaining single quotes should be opening ones:
- text = text.replace(/'/g, "‘");
-
- // Get most opening double quotes:
- text = text.replace(/(\s| |--|&[mn]dash;|&\#8211;|&\#8212;|&\#x201[34];)"(?=\w)/g, "$1“");
-
- // Double closing quotes:
- text = text.replace(/([^\s\[\{\(\-])"/g, "$1”");
- text = text.replace(/"(?=\s)/g, "”");
-
- // Any remaining quotes should be opening ones.
- text = text.replace(/"/ig, "“");
- return text;
- };
-
- // Find and convert markdown extra definition lists into html.
- Markdown.Extra.prototype.runSmartyPants = function(text) {
- this.smartyPantsLastChar = '';
- text = this.educatePants(text);
- // Clean everything inside html tags (some of them may have been converted due to our rough html parsing)
- text = text.replace(/(<([a-zA-Z1-6]+)\b([^\n>]*?)(\/)?>)/g, revertPants);
- return text;
- };
-
- /******************************************************************
- * Definition Lists *
- ******************************************************************/
-
- // Find and convert markdown extra definition lists into html.
- Markdown.Extra.prototype.definitionLists = function(text) {
- var wholeList = new RegExp(
- ['(\\x02\\n?|\\n\\n)' ,
- '(?:' ,
- '(' , // $1 = whole list
- '(' , // $2
- '[ ]{0,3}' ,
- '((?:[ \\t]*\\S.*\\n)+)', // $3 = defined term
- '\\n?' ,
- '[ ]{0,3}:[ ]+' , // colon starting definition
- ')' ,
- '([\\s\\S]+?)' ,
- '(' , // $4
- '(?=\\0x03)' , // \z
- '|' ,
- '(?=' ,
- '\\n{2,}' ,
- '(?=\\S)' ,
- '(?!' , // Negative lookahead for another term
- '[ ]{0,3}' ,
- '(?:\\S.*\\n)+?' , // defined term
- '\\n?' ,
- '[ ]{0,3}:[ ]+' , // colon starting definition
- ')' ,
- '(?!' , // Negative lookahead for another definition
- '[ ]{0,3}:[ ]+' , // colon starting definition
- ')' ,
- ')' ,
- ')' ,
- ')' ,
- ')'
- ].join(''),
- 'gm'
- );
-
- var self = this;
- text = addAnchors(text);
-
- text = text.replace(wholeList, function(match, pre, list) {
- var result = trim(self.processDefListItems(list));
- result = "\n" + result + "\n ";
- return pre + self.hashExtraBlock(result) + "\n\n";
- });
-
- return removeAnchors(text);
- };
-
- // Process the contents of a single definition list, splitting it
- // into individual term and definition list items.
- Markdown.Extra.prototype.processDefListItems = function(listStr) {
- var self = this;
-
- var dt = new RegExp(
- ['(\\x02\\n?|\\n\\n+)' , // leading line
- '(' , // definition terms = $1
- '[ ]{0,3}' , // leading whitespace
- '(?![:][ ]|[ ])' , // negative lookahead for a definition
- // mark (colon) or more whitespace
- '(?:\\S.*\\n)+?' , // actual term (not whitespace)
- ')' ,
- '(?=\\n?[ ]{0,3}:[ ])' // lookahead for following line feed
- ].join(''), // with a definition mark
- 'gm'
- );
-
- var dd = new RegExp(
- ['\\n(\\n+)?' , // leading line = $1
- '(' , // marker space = $2
- '[ ]{0,3}' , // whitespace before colon
- '[:][ ]+' , // definition mark (colon)
- ')' ,
- '([\\s\\S]+?)' , // definition text = $3
- '(?=\\n*' , // stop at next definition mark,
- '(?:' , // next term or end of text
- '\\n[ ]{0,3}[:][ ]|' ,
- '|\\x03' , // \z
- ')' ,
- ')'
- ].join(''),
- 'gm'
- );
-
- listStr = addAnchors(listStr);
- // trim trailing blank lines:
- listStr = listStr.replace(/\n{2,}(?=\\x03)/, "\n");
-
- // Process definition terms.
- listStr = listStr.replace(dt, function(match, pre, termsStr) {
- var terms = trim(termsStr).split("\n");
- var text = '';
- for (var i = 0; i < terms.length; i++) {
- var term = terms[i];
- // process spans inside dt
- term = convertSpans(trim(term), self);
- text += "\n" + term + " ";
- }
- return text + "\n";
- });
-
- // Process actual definitions.
- listStr = listStr.replace(dd, function(match, leadingLine, markerSpace, def) {
- if (leadingLine || def.match(/\n{2,}/)) {
- // replace marker with the appropriate whitespace indentation
- def = Array(markerSpace.length + 1).join(' ') + def;
- // process markdown inside definition
- // TODO?: currently doesn't apply extensions
- def = outdent(def) + "\n\n";
- def = "\n" + convertAll(def, self) + "\n";
- } else {
- // convert span-level markdown inside definition
- def = rtrim(def);
- def = convertSpans(outdent(def), self);
- }
-
- return "\n " + def + " \n";
- });
-
- return removeAnchors(listStr);
- };
-
-
- /***********************************************************
- * Strikethrough *
- ************************************************************/
-
- Markdown.Extra.prototype.strikethrough = function(text) {
- // Pretty much duplicated from _DoItalicsAndBold
- return text.replace(/([\W_]|^)~T~T(?=\S)([^\r]*?\S[\*_]*)~T~T([\W_]|$)/g,
- "$1$2$3");
- };
-
-
- /***********************************************************
- * New lines *
- ************************************************************/
-
- Markdown.Extra.prototype.newlines = function(text) {
- // We have to ignore already converted newlines and line breaks in sub-list items
- return text.replace(/(<(?:br|\/li)>)?\n/g, function(wholeMatch, previousTag) {
- return previousTag ? wholeMatch : " \n";
- });
- };
-
-})();
-
diff --git a/collectedstatic/pagedown-extra/pagedown/Markdown.Converter.js b/collectedstatic/pagedown-extra/pagedown/Markdown.Converter.js
deleted file mode 100644
index d2d39d4..0000000
--- a/collectedstatic/pagedown-extra/pagedown/Markdown.Converter.js
+++ /dev/null
@@ -1,1400 +0,0 @@
-var Markdown;
-
-if (typeof exports === "object" && typeof require === "function") // we're in a CommonJS (e.g. Node.js) module
- Markdown = exports;
-else
- Markdown = {};
-
-// The following text is included for historical reasons, but should
-// be taken with a pinch of salt; it's not all true anymore.
-
-//
-// Wherever possible, Showdown is a straight, line-by-line port
-// of the Perl version of Markdown.
-//
-// This is not a normal parser design; it's basically just a
-// series of string substitutions. It's hard to read and
-// maintain this way, but keeping Showdown close to the original
-// design makes it easier to port new features.
-//
-// More importantly, Showdown behaves like markdown.pl in most
-// edge cases. So web applications can do client-side preview
-// in Javascript, and then build identical HTML on the server.
-//
-// This port needs the new RegExp functionality of ECMA 262,
-// 3rd Edition (i.e. Javascript 1.5). Most modern web browsers
-// should do fine. Even with the new regular expression features,
-// We do a lot of work to emulate Perl's regex functionality.
-// The tricky changes in this file mostly have the "attacklab:"
-// label. Major or self-explanatory changes don't.
-//
-// Smart diff tools like Araxis Merge will be able to match up
-// this file with markdown.pl in a useful way. A little tweaking
-// helps: in a copy of markdown.pl, replace "#" with "//" and
-// replace "$text" with "text". Be sure to ignore whitespace
-// and line endings.
-//
-
-
-//
-// Usage:
-//
-// var text = "Markdown *rocks*.";
-//
-// var converter = new Markdown.Converter();
-// var html = converter.makeHtml(text);
-//
-// alert(html);
-//
-// Note: move the sample code to the bottom of this
-// file before uncommenting it.
-//
-
-(function () {
-
- function identity(x) { return x; }
- function returnFalse(x) { return false; }
-
- function HookCollection() { }
-
- HookCollection.prototype = {
-
- chain: function (hookname, func) {
- var original = this[hookname];
- if (!original)
- throw new Error("unknown hook " + hookname);
-
- if (original === identity)
- this[hookname] = func;
- else
- this[hookname] = function (text) {
- var args = Array.prototype.slice.call(arguments, 0);
- args[0] = original.apply(null, args);
- return func.apply(null, args);
- };
- },
- set: function (hookname, func) {
- if (!this[hookname])
- throw new Error("unknown hook " + hookname);
- this[hookname] = func;
- },
- addNoop: function (hookname) {
- this[hookname] = identity;
- },
- addFalse: function (hookname) {
- this[hookname] = returnFalse;
- }
- };
-
- Markdown.HookCollection = HookCollection;
-
- // g_urls and g_titles allow arbitrary user-entered strings as keys. This
- // caused an exception (and hence stopped the rendering) when the user entered
- // e.g. [push] or [__proto__]. Adding a prefix to the actual key prevents this
- // (since no builtin property starts with "s_"). See
- // http://meta.stackoverflow.com/questions/64655/strange-wmd-bug
- // (granted, switching from Array() to Object() alone would have left only __proto__
- // to be a problem)
- function SaveHash() { }
- SaveHash.prototype = {
- set: function (key, value) {
- this["s_" + key] = value;
- },
- get: function (key) {
- return this["s_" + key];
- }
- };
-
- Markdown.Converter = function () {
- var pluginHooks = this.hooks = new HookCollection();
-
- // given a URL that was encountered by itself (without markup), should return the link text that's to be given to this link
- pluginHooks.addNoop("plainLinkText");
-
- // called with the orignal text as given to makeHtml. The result of this plugin hook is the actual markdown source that will be cooked
- pluginHooks.addNoop("preConversion");
-
- // called with the text once all normalizations have been completed (tabs to spaces, line endings, etc.), but before any conversions have
- pluginHooks.addNoop("postNormalization");
-
- // Called with the text before / after creating block elements like code blocks and lists. Note that this is called recursively
- // with inner content, e.g. it's called with the full text, and then only with the content of a blockquote. The inner
- // call will receive outdented text.
- pluginHooks.addNoop("preBlockGamut");
- pluginHooks.addNoop("postBlockGamut");
-
- // called with the text of a single block element before / after the span-level conversions (bold, code spans, etc.) have been made
- pluginHooks.addNoop("preSpanGamut");
- pluginHooks.addNoop("postSpanGamut");
-
- // called with the final cooked HTML code. The result of this plugin hook is the actual output of makeHtml
- pluginHooks.addNoop("postConversion");
-
- //
- // Private state of the converter instance:
- //
-
- // Global hashes, used by various utility routines
- var g_urls;
- var g_titles;
- var g_html_blocks;
-
- // Used to track when we're inside an ordered or unordered list
- // (see _ProcessListItems() for details):
- var g_list_level;
-
- this.makeHtml = function (text) {
-
- //
- // Main function. The order in which other subs are called here is
- // essential. Link and image substitutions need to happen before
- // _EscapeSpecialCharsWithinTagAttributes(), so that any *'s or _'s in the
- // and tags get encoded.
- //
-
- // This will only happen if makeHtml on the same converter instance is called from a plugin hook.
- // Don't do that.
- if (g_urls)
- throw new Error("Recursive call to converter.makeHtml");
-
- // Create the private state objects.
- g_urls = new SaveHash();
- g_titles = new SaveHash();
- g_html_blocks = [];
- g_list_level = 0;
-
- text = pluginHooks.preConversion(text);
-
- // attacklab: Replace ~ with ~T
- // This lets us use tilde as an escape char to avoid md5 hashes
- // The choice of character is arbitray; anything that isn't
- // magic in Markdown will work.
- text = text.replace(/~/g, "~T");
-
- // attacklab: Replace $ with ~D
- // RegExp interprets $ as a special character
- // when it's in a replacement string
- text = text.replace(/\$/g, "~D");
-
- // Standardize line endings
- text = text.replace(/\r\n/g, "\n"); // DOS to Unix
- text = text.replace(/\r/g, "\n"); // Mac to Unix
-
- // Make sure text begins and ends with a couple of newlines:
- text = "\n\n" + text + "\n\n";
-
- // Convert all tabs to spaces.
- text = _Detab(text);
-
- // Strip any lines consisting only of spaces and tabs.
- // This makes subsequent regexen easier to write, because we can
- // match consecutive blank lines with /\n+/ instead of something
- // contorted like /[ \t]*\n+/ .
- text = text.replace(/^[ \t]+$/mg, "");
-
- text = pluginHooks.postNormalization(text);
-
- // Turn block-level HTML blocks into hash entries
- text = _HashHTMLBlocks(text);
-
- // Strip link definitions, store in hashes.
- text = _StripLinkDefinitions(text);
-
- text = _RunBlockGamut(text);
-
- text = _UnescapeSpecialChars(text);
-
- // attacklab: Restore dollar signs
- text = text.replace(/~D/g, "$$");
-
- // attacklab: Restore tildes
- text = text.replace(/~T/g, "~");
-
- text = pluginHooks.postConversion(text);
-
- g_html_blocks = g_titles = g_urls = null;
-
- return text;
- };
-
- function _StripLinkDefinitions(text) {
- //
- // Strips link definitions from text, stores the URLs and titles in
- // hash references.
- //
-
- // Link defs are in the form: ^[id]: url "optional title"
-
- /*
- text = text.replace(/
- ^[ ]{0,3}\[(.+)\]: // id = $1 attacklab: g_tab_width - 1
- [ \t]*
- \n? // maybe *one* newline
- [ \t]*
- (\S+?)>? // url = $2
- (?=\s|$) // lookahead for whitespace instead of the lookbehind removed below
- [ \t]*
- \n? // maybe one newline
- [ \t]*
- ( // (potential) title = $3
- (\n*) // any lines skipped = $4 attacklab: lookbehind removed
- [ \t]+
- ["(]
- (.+?) // title = $5
- [")]
- [ \t]*
- )? // title is optional
- (?:\n+|$)
- /gm, function(){...});
- */
-
- text = text.replace(/^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*(\S+?)>?(?=\s|$)[ \t]*\n?[ \t]*((\n*)["(](.+?)[")][ \t]*)?(?:\n+)/gm,
- function (wholeMatch, m1, m2, m3, m4, m5) {
- m1 = m1.toLowerCase();
- g_urls.set(m1, _EncodeAmpsAndAngles(m2)); // Link IDs are case-insensitive
- if (m4) {
- // Oops, found blank lines, so it's not a title.
- // Put back the parenthetical statement we stole.
- return m3;
- } else if (m5) {
- g_titles.set(m1, m5.replace(/"/g, """));
- }
-
- // Completely remove the definition from the text
- return "";
- }
- );
-
- return text;
- }
-
- function _HashHTMLBlocks(text) {
-
- // Hashify HTML blocks:
- // We only want to do this for block-level HTML tags, such as headers,
- // lists, and tables. That's because we still want to wrap s around
- // "paragraphs" that are wrapped in non-block-level tags, such as anchors,
- // phrase emphasis, and spans. The list of tags we're looking for is
- // hard-coded:
- var block_tags_a = "p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del"
- var block_tags_b = "p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math"
-
- // First, look for nested blocks, e.g.:
- //
- //
- // tags for inner block must be indented.
- //
- //
- //
- // The outermost tags must start at the left margin for this to match, and
- // the inner nested divs must be indented.
- // We need to do this before the next, more liberal match, because the next
- // match will start at the first `` and stop at the first `
`.
-
- // attacklab: This regex can be expensive when it fails.
-
- /*
- text = text.replace(/
- ( // save in $1
- ^ // start of line (with /m)
- <($block_tags_a) // start tag = $2
- \b // word break
- // attacklab: hack around khtml/pcre bug...
- [^\r]*?\n // any number of lines, minimally matching
- \2> // the matching end tag
- [ \t]* // trailing spaces/tabs
- (?=\n+) // followed by a newline
- ) // attacklab: there are sentinel newlines at end of document
- /gm,function(){...}};
- */
- text = text.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^\r]*?\n<\/\2>[ \t]*(?=\n+))/gm, hashElement);
-
- //
- // Now match more liberally, simply from `\n` to ` \n`
- //
-
- /*
- text = text.replace(/
- ( // save in $1
- ^ // start of line (with /m)
- <($block_tags_b) // start tag = $2
- \b // word break
- // attacklab: hack around khtml/pcre bug...
- [^\r]*? // any number of lines, minimally matching
- .*\2> // the matching end tag
- [ \t]* // trailing spaces/tabs
- (?=\n+) // followed by a newline
- ) // attacklab: there are sentinel newlines at end of document
- /gm,function(){...}};
- */
- text = text.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math)\b[^\r]*?.*<\/\2>[ \t]*(?=\n+)\n)/gm, hashElement);
-
- // Special case just for . It was easier to make a special case than
- // to make the other regex more complicated.
-
- /*
- text = text.replace(/
- \n // Starting after a blank line
- [ ]{0,3}
- ( // save in $1
- (<(hr) // start tag = $2
- \b // word break
- ([^<>])*?
- \/?>) // the matching end tag
- [ \t]*
- (?=\n{2,}) // followed by a blank line
- )
- /g,hashElement);
- */
- text = text.replace(/\n[ ]{0,3}((<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g, hashElement);
-
- // Special case for standalone HTML comments:
-
- /*
- text = text.replace(/
- \n\n // Starting after a blank line
- [ ]{0,3} // attacklab: g_tab_width - 1
- ( // save in $1
- -]|-[^>])(?:[^-]|-[^-])*)--) // see http://www.w3.org/TR/html-markup/syntax.html#comments and http://meta.stackoverflow.com/q/95256
- >
- [ \t]*
- (?=\n{2,}) // followed by a blank line
- )
- /g,hashElement);
- */
- text = text.replace(/\n\n[ ]{0,3}(-]|-[^>])(?:[^-]|-[^-])*)--)>[ \t]*(?=\n{2,}))/g, hashElement);
-
- // PHP and ASP-style processor instructions (...?> and <%...%>)
-
- /*
- text = text.replace(/
- (?:
- \n\n // Starting after a blank line
- )
- ( // save in $1
- [ ]{0,3} // attacklab: g_tab_width - 1
- (?:
- <([?%]) // $2
- [^\r]*?
- \2>
- )
- [ \t]*
- (?=\n{2,}) // followed by a blank line
- )
- /g,hashElement);
- */
- text = text.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g, hashElement);
-
- return text;
- }
-
- function hashElement(wholeMatch, m1) {
- var blockText = m1;
-
- // Undo double lines
- blockText = blockText.replace(/^\n+/, "");
-
- // strip trailing blank lines
- blockText = blockText.replace(/\n+$/g, "");
-
- // Replace the element text with a marker ("~KxK" where x is its key)
- blockText = "\n\n~K" + (g_html_blocks.push(blockText) - 1) + "K\n\n";
-
- return blockText;
- }
-
- var blockGamutHookCallback = function (t) { return _RunBlockGamut(t); }
-
- function _RunBlockGamut(text, doNotUnhash) {
- //
- // These are all the transformations that form block-level
- // tags like paragraphs, headers, and list items.
- //
-
- text = pluginHooks.preBlockGamut(text, blockGamutHookCallback);
-
- text = _DoHeaders(text);
-
- // Do Horizontal Rules:
- var replacement = " \n";
- text = text.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm, replacement);
- text = text.replace(/^[ ]{0,2}([ ]?-[ ]?){3,}[ \t]*$/gm, replacement);
- text = text.replace(/^[ ]{0,2}([ ]?_[ ]?){3,}[ \t]*$/gm, replacement);
-
- text = _DoLists(text);
- text = _DoCodeBlocks(text);
- text = _DoBlockQuotes(text);
-
- text = pluginHooks.postBlockGamut(text, blockGamutHookCallback);
-
- // We already ran _HashHTMLBlocks() before, in Markdown(), but that
- // was to escape raw HTML in the original Markdown source. This time,
- // we're escaping the markup we've just created, so that we don't wrap
- // tags around block-level tags.
- text = _HashHTMLBlocks(text);
- text = _FormParagraphs(text, doNotUnhash);
-
- return text;
- }
-
- function _RunSpanGamut(text) {
- //
- // These are all the transformations that occur *within* block-level
- // tags like paragraphs, headers, and list items.
- //
-
- text = pluginHooks.preSpanGamut(text);
-
- text = _DoCodeSpans(text);
- text = _EscapeSpecialCharsWithinTagAttributes(text);
- text = _EncodeBackslashEscapes(text);
-
- // Process anchor and image tags. Images must come first,
- // because ![foo][f] looks like an anchor.
- text = _DoImages(text);
- text = _DoAnchors(text);
-
- // Make links out of things like ` `
- // Must come after _DoAnchors(), because you can use < and >
- // delimiters in inline links like [this]().
- text = _DoAutoLinks(text);
-
- text = text.replace(/~P/g, "://"); // put in place to prevent autolinking; reset now
-
- text = _EncodeAmpsAndAngles(text);
- text = _DoItalicsAndBold(text);
-
- // Do hard breaks:
- text = text.replace(/ +\n/g, " \n");
-
- text = pluginHooks.postSpanGamut(text);
-
- return text;
- }
-
- function _EscapeSpecialCharsWithinTagAttributes(text) {
- //
- // Within tags -- meaning between < and > -- encode [\ ` * _] so they
- // don't conflict with their use in Markdown for code, italics and strong.
- //
-
- // Build a regex to find HTML tags and comments. See Friedl's
- // "Mastering Regular Expressions", 2nd Ed., pp. 200-201.
-
- // SE: changed the comment part of the regex
-
- var regex = /(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|-]|-[^>])(?:[^-]|-[^-])*)--)>)/gi;
-
- text = text.replace(regex, function (wholeMatch) {
- var tag = wholeMatch.replace(/(.)<\/?code>(?=.)/g, "$1`");
- tag = escapeCharacters(tag, wholeMatch.charAt(1) == "!" ? "\\`*_/" : "\\`*_"); // also escape slashes in comments to prevent autolinking there -- http://meta.stackoverflow.com/questions/95987
- return tag;
- });
-
- return text;
- }
-
- function _DoAnchors(text) {
- //
- // Turn Markdown link shortcuts into XHTML tags.
- //
- //
- // First, handle reference-style links: [link text] [id]
- //
-
- /*
- text = text.replace(/
- ( // wrap whole match in $1
- \[
- (
- (?:
- \[[^\]]*\] // allow brackets nested one level
- |
- [^\[] // or anything else
- )*
- )
- \]
-
- [ ]? // one optional space
- (?:\n[ ]*)? // one optional newline followed by spaces
-
- \[
- (.*?) // id = $3
- \]
- )
- ()()()() // pad remaining backreferences
- /g, writeAnchorTag);
- */
- text = text.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g, writeAnchorTag);
-
- //
- // Next, inline-style links: [link text](url "optional title")
- //
-
- /*
- text = text.replace(/
- ( // wrap whole match in $1
- \[
- (
- (?:
- \[[^\]]*\] // allow brackets nested one level
- |
- [^\[\]] // or anything else
- )*
- )
- \]
- \( // literal paren
- [ \t]*
- () // no id, so leave $3 empty
- ( // href = $4
- (?:
- \([^)]*\) // allow one level of (correctly nested) parens (think MSDN)
- |
- [^()\s]
- )*?
- )>?
- [ \t]*
- ( // $5
- (['"]) // quote char = $6
- (.*?) // Title = $7
- \6 // matching quote
- [ \t]* // ignore any spaces/tabs between closing quote and )
- )? // title is optional
- \)
- )
- /g, writeAnchorTag);
- */
-
- text = text.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()((?:\([^)]*\)|[^()\s])*?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g, writeAnchorTag);
-
- //
- // Last, handle reference-style shortcuts: [link text]
- // These must come last in case you've also got [link test][1]
- // or [link test](/foo)
- //
-
- /*
- text = text.replace(/
- ( // wrap whole match in $1
- \[
- ([^\[\]]+) // link text = $2; can't contain '[' or ']'
- \]
- )
- ()()()()() // pad rest of backreferences
- /g, writeAnchorTag);
- */
- text = text.replace(/(\[([^\[\]]+)\])()()()()()/g, writeAnchorTag);
-
- return text;
- }
-
- function writeAnchorTag(wholeMatch, m1, m2, m3, m4, m5, m6, m7) {
- if (m7 == undefined) m7 = "";
- var whole_match = m1;
- var link_text = m2.replace(/:\/\//g, "~P"); // to prevent auto-linking withing the link. will be converted back after the auto-linker runs
- var link_id = m3.toLowerCase();
- var url = m4;
- var title = m7;
-
- if (url == "") {
- if (link_id == "") {
- // lower-case and turn embedded newlines into spaces
- link_id = link_text.toLowerCase().replace(/ ?\n/g, " ");
- }
- url = "#" + link_id;
-
- if (g_urls.get(link_id) != undefined) {
- url = g_urls.get(link_id);
- if (g_titles.get(link_id) != undefined) {
- title = g_titles.get(link_id);
- }
- }
- else {
- if (whole_match.search(/\(\s*\)$/m) > -1) {
- // Special case for explicit empty url
- url = "";
- } else {
- return whole_match;
- }
- }
- }
- url = encodeProblemUrlChars(url);
- url = escapeCharacters(url, "*_");
- var result = " " + link_text + " ";
-
- return result;
- }
-
- function _DoImages(text) {
- //
- // Turn Markdown image shortcuts into tags.
- //
-
- //
- // First, handle reference-style labeled images: ![alt text][id]
- //
-
- /*
- text = text.replace(/
- ( // wrap whole match in $1
- !\[
- (.*?) // alt text = $2
- \]
-
- [ ]? // one optional space
- (?:\n[ ]*)? // one optional newline followed by spaces
-
- \[
- (.*?) // id = $3
- \]
- )
- ()()()() // pad rest of backreferences
- /g, writeImageTag);
- */
- text = text.replace(/(!\[(.*?)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g, writeImageTag);
-
- //
- // Next, handle inline images: 
- // Don't forget: encode * and _
-
- /*
- text = text.replace(/
- ( // wrap whole match in $1
- !\[
- (.*?) // alt text = $2
- \]
- \s? // One optional whitespace character
- \( // literal paren
- [ \t]*
- () // no id, so leave $3 empty
- (\S+?)>? // src url = $4
- [ \t]*
- ( // $5
- (['"]) // quote char = $6
- (.*?) // title = $7
- \6 // matching quote
- [ \t]*
- )? // title is optional
- \)
- )
- /g, writeImageTag);
- */
- text = text.replace(/(!\[(.*?)\]\s?\([ \t]*()(\S+?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g, writeImageTag);
-
- return text;
- }
-
- function attributeEncode(text) {
- // unconditionally replace angle brackets here -- what ends up in an attribute (e.g. alt or title)
- // never makes sense to have verbatim HTML in it (and the sanitizer would totally break it)
- return text.replace(/>/g, ">").replace(/";
-
- return result;
- }
-
- function _DoHeaders(text) {
-
- // Setext-style headers:
- // Header 1
- // ========
- //
- // Header 2
- // --------
- //
- text = text.replace(/^(.+)[ \t]*\n=+[ \t]*\n+/gm,
- function (wholeMatch, m1) { return "" + _RunSpanGamut(m1) + " \n\n"; }
- );
-
- text = text.replace(/^(.+)[ \t]*\n-+[ \t]*\n+/gm,
- function (matchFound, m1) { return "" + _RunSpanGamut(m1) + " \n\n"; }
- );
-
- // atx-style headers:
- // # Header 1
- // ## Header 2
- // ## Header 2 with closing hashes ##
- // ...
- // ###### Header 6
- //
-
- /*
- text = text.replace(/
- ^(\#{1,6}) // $1 = string of #'s
- [ \t]*
- (.+?) // $2 = Header text
- [ \t]*
- \#* // optional closing #'s (not counted)
- \n+
- /gm, function() {...});
- */
-
- text = text.replace(/^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+/gm,
- function (wholeMatch, m1, m2) {
- var h_level = m1.length;
- return "" + _RunSpanGamut(m2) + " \n\n";
- }
- );
-
- return text;
- }
-
- function _DoLists(text) {
- //
- // Form HTML ordered (numbered) and unordered (bulleted) lists.
- //
-
- // attacklab: add sentinel to hack around khtml/safari bug:
- // http://bugs.webkit.org/show_bug.cgi?id=11231
- text += "~0";
-
- // Re-usable pattern to match any entirel ul or ol list:
-
- /*
- var whole_list = /
- ( // $1 = whole list
- ( // $2
- [ ]{0,3} // attacklab: g_tab_width - 1
- ([*+-]|\d+[.]) // $3 = first list item marker
- [ \t]+
- )
- [^\r]+?
- ( // $4
- ~0 // sentinel for workaround; should be $
- |
- \n{2,}
- (?=\S)
- (?! // Negative lookahead for another list item marker
- [ \t]*
- (?:[*+-]|\d+[.])[ \t]+
- )
- )
- )
- /g
- */
- var whole_list = /^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm;
-
- if (g_list_level) {
- text = text.replace(whole_list, function (wholeMatch, m1, m2) {
- var list = m1;
- var list_type = (m2.search(/[*+-]/g) > -1) ? "ul" : "ol";
-
- var result = _ProcessListItems(list, list_type);
-
- // Trim any trailing whitespace, to put the closing `$list_type>`
- // up on the preceding line, to get it past the current stupid
- // HTML block parser. This is a hack to work around the terrible
- // hack that is the HTML block parser.
- result = result.replace(/\s+$/, "");
- result = "<" + list_type + ">" + result + "" + list_type + ">\n";
- return result;
- });
- } else {
- whole_list = /(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/g;
- text = text.replace(whole_list, function (wholeMatch, m1, m2, m3) {
- var runup = m1;
- var list = m2;
-
- var list_type = (m3.search(/[*+-]/g) > -1) ? "ul" : "ol";
- var result = _ProcessListItems(list, list_type);
- result = runup + "<" + list_type + ">\n" + result + "" + list_type + ">\n";
- return result;
- });
- }
-
- // attacklab: strip sentinel
- text = text.replace(/~0/, "");
-
- return text;
- }
-
- var _listItemMarkers = { ol: "\\d+[.]", ul: "[*+-]" };
-
- function _ProcessListItems(list_str, list_type) {
- //
- // Process the contents of a single ordered or unordered list, splitting it
- // into individual list items.
- //
- // list_type is either "ul" or "ol".
-
- // The $g_list_level global keeps track of when we're inside a list.
- // Each time we enter a list, we increment it; when we leave a list,
- // we decrement. If it's zero, we're not in a list anymore.
- //
- // We do this because when we're not inside a list, we want to treat
- // something like this:
- //
- // I recommend upgrading to version
- // 8. Oops, now this line is treated
- // as a sub-list.
- //
- // As a single paragraph, despite the fact that the second line starts
- // with a digit-period-space sequence.
- //
- // Whereas when we're inside a list (or sub-list), that line will be
- // treated as the start of a sub-list. What a kludge, huh? This is
- // an aspect of Markdown's syntax that's hard to parse perfectly
- // without resorting to mind-reading. Perhaps the solution is to
- // change the syntax rules such that sub-lists must start with a
- // starting cardinal number; e.g. "1." or "a.".
-
- g_list_level++;
-
- // trim trailing blank lines:
- list_str = list_str.replace(/\n{2,}$/, "\n");
-
- // attacklab: add sentinel to emulate \z
- list_str += "~0";
-
- // In the original attacklab showdown, list_type was not given to this function, and anything
- // that matched /[*+-]|\d+[.]/ would just create the next , causing this mismatch:
- //
- // Markdown rendered by WMD rendered by MarkdownSharp
- // ------------------------------------------------------------------
- // 1. first 1. first 1. first
- // 2. second 2. second 2. second
- // - third 3. third * third
- //
- // We changed this to behave identical to MarkdownSharp. This is the constructed RegEx,
- // with {MARKER} being one of \d+[.] or [*+-], depending on list_type:
-
- /*
- list_str = list_str.replace(/
- (^[ \t]*) // leading whitespace = $1
- ({MARKER}) [ \t]+ // list marker = $2
- ([^\r]+? // list item text = $3
- (\n+)
- )
- (?=
- (~0 | \2 ({MARKER}) [ \t]+)
- )
- /gm, function(){...});
- */
-
- var marker = _listItemMarkers[list_type];
- var re = new RegExp("(^[ \\t]*)(" + marker + ")[ \\t]+([^\\r]+?(\\n+))(?=(~0|\\1(" + marker + ")[ \\t]+))", "gm");
- var last_item_had_a_double_newline = false;
- list_str = list_str.replace(re,
- function (wholeMatch, m1, m2, m3) {
- var item = m3;
- var leading_space = m1;
- var ends_with_double_newline = /\n\n$/.test(item);
- var contains_double_newline = ends_with_double_newline || item.search(/\n{2,}/) > -1;
-
- if (contains_double_newline || last_item_had_a_double_newline) {
- item = _RunBlockGamut(_Outdent(item), /* doNotUnhash = */true);
- }
- else {
- // Recursion for sub-lists:
- item = _DoLists(_Outdent(item));
- item = item.replace(/\n$/, ""); // chomp(item)
- item = _RunSpanGamut(item);
- }
- last_item_had_a_double_newline = ends_with_double_newline;
- return " " + item + " \n";
- }
- );
-
- // attacklab: strip sentinel
- list_str = list_str.replace(/~0/g, "");
-
- g_list_level--;
- return list_str;
- }
-
- function _DoCodeBlocks(text) {
- //
- // Process Markdown `` blocks.
- //
-
- /*
- text = text.replace(/
- (?:\n\n|^)
- ( // $1 = the code block -- one or more lines, starting with a space/tab
- (?:
- (?:[ ]{4}|\t) // Lines must start with a tab or a tab-width of spaces - attacklab: g_tab_width
- .*\n+
- )+
- )
- (\n*[ ]{0,3}[^ \t\n]|(?=~0)) // attacklab: g_tab_width
- /g ,function(){...});
- */
-
- // attacklab: sentinel workarounds for lack of \A and \Z, safari\khtml bug
- text += "~0";
-
- text = text.replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g,
- function (wholeMatch, m1, m2) {
- var codeblock = m1;
- var nextChar = m2;
-
- codeblock = _EncodeCode(_Outdent(codeblock));
- codeblock = _Detab(codeblock);
- codeblock = codeblock.replace(/^\n+/g, ""); // trim leading newlines
- codeblock = codeblock.replace(/\n+$/g, ""); // trim trailing whitespace
-
- codeblock = "" + codeblock + "\n ";
-
- return "\n\n" + codeblock + "\n\n" + nextChar;
- }
- );
-
- // attacklab: strip sentinel
- text = text.replace(/~0/, "");
-
- return text;
- }
-
- function hashBlock(text) {
- text = text.replace(/(^\n+|\n+$)/g, "");
- return "\n\n~K" + (g_html_blocks.push(text) - 1) + "K\n\n";
- }
-
- function _DoCodeSpans(text) {
- //
- // * Backtick quotes are used for spans.
- //
- // * You can use multiple backticks as the delimiters if you want to
- // include literal backticks in the code span. So, this input:
- //
- // Just type ``foo `bar` baz`` at the prompt.
- //
- // Will translate to:
- //
- // Just type foo `bar` baz at the prompt.
- //
- // There's no arbitrary limit to the number of backticks you
- // can use as delimters. If you need three consecutive backticks
- // in your code, use four for delimiters, etc.
- //
- // * You can use spaces to get literal backticks at the edges:
- //
- // ... type `` `bar` `` ...
- //
- // Turns to:
- //
- // ... type `bar` ...
- //
-
- /*
- text = text.replace(/
- (^|[^\\]) // Character before opening ` can't be a backslash
- (`+) // $2 = Opening run of `
- ( // $3 = The code block
- [^\r]*?
- [^`] // attacklab: work around lack of lookbehind
- )
- \2 // Matching closer
- (?!`)
- /gm, function(){...});
- */
-
- text = text.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,
- function (wholeMatch, m1, m2, m3, m4) {
- var c = m3;
- c = c.replace(/^([ \t]*)/g, ""); // leading whitespace
- c = c.replace(/[ \t]*$/g, ""); // trailing whitespace
- c = _EncodeCode(c);
- c = c.replace(/:\/\//g, "~P"); // to prevent auto-linking. Not necessary in code *blocks*, but in code spans. Will be converted back after the auto-linker runs.
- return m1 + "" + c + "";
- }
- );
-
- return text;
- }
-
- function _EncodeCode(text) {
- //
- // Encode/escape certain characters inside Markdown code runs.
- // The point is that in code, these characters are literals,
- // and lose their special Markdown meanings.
- //
- // Encode all ampersands; HTML entities are not
- // entities within a Markdown code span.
- text = text.replace(/&/g, "&");
-
- // Do the angle bracket song and dance:
- text = text.replace(//g, ">");
-
- // Now, escape characters that are magic in Markdown:
- text = escapeCharacters(text, "\*_{}[]\\", false);
-
- // jj the line above breaks this:
- //---
-
- //* Item
-
- // 1. Subitem
-
- // special char: *
- //---
-
- return text;
- }
-
- function _DoItalicsAndBold(text) {
-
- // must go first:
- text = text.replace(/([\W_]|^)(\*\*|__)(?=\S)([^\r]*?\S[\*_]*)\2([\W_]|$)/g,
- "$1$3 $4");
-
- text = text.replace(/([\W_]|^)(\*|_)(?=\S)([^\r\*_]*?\S)\2([\W_]|$)/g,
- "$1$3 $4");
-
- return text;
- }
-
- function _DoBlockQuotes(text) {
-
- /*
- text = text.replace(/
- ( // Wrap whole match in $1
- (
- ^[ \t]*>[ \t]? // '>' at the start of a line
- .+\n // rest of the first line
- (.+\n)* // subsequent consecutive lines
- \n* // blanks
- )+
- )
- /gm, function(){...});
- */
-
- text = text.replace(/((^[ \t]*>[ \t]?.+\n(.+\n)*\n*)+)/gm,
- function (wholeMatch, m1) {
- var bq = m1;
-
- // attacklab: hack around Konqueror 3.5.4 bug:
- // "----------bug".replace(/^-/g,"") == "bug"
-
- bq = bq.replace(/^[ \t]*>[ \t]?/gm, "~0"); // trim one level of quoting
-
- // attacklab: clean up hack
- bq = bq.replace(/~0/g, "");
-
- bq = bq.replace(/^[ \t]+$/gm, ""); // trim whitespace-only lines
- bq = _RunBlockGamut(bq); // recurse
-
- bq = bq.replace(/(^|\n)/g, "$1 ");
- // These leading spaces screw with content, so we need to fix that:
- bq = bq.replace(
- /(\s*[^\r]+?<\/pre>)/gm,
- function (wholeMatch, m1) {
- var pre = m1;
- // attacklab: hack around Konqueror 3.5.4 bug:
- pre = pre.replace(/^ /mg, "~0");
- pre = pre.replace(/~0/g, "");
- return pre;
- });
-
- return hashBlock("\n" + bq + "\n ");
- }
- );
- return text;
- }
-
- function _FormParagraphs(text, doNotUnhash) {
- //
- // Params:
- // $text - string to process with html tags
- //
-
- // Strip leading and trailing lines:
- text = text.replace(/^\n+/g, "");
- text = text.replace(/\n+$/g, "");
-
- var grafs = text.split(/\n{2,}/g);
- var grafsOut = [];
-
- var markerRe = /~K(\d+)K/;
-
- //
- // Wrap
tags.
- //
- var end = grafs.length;
- for (var i = 0; i < end; i++) {
- var str = grafs[i];
-
- // if this is an HTML marker, copy it
- if (markerRe.test(str)) {
- grafsOut.push(str);
- }
- else if (/\S/.test(str)) {
- str = _RunSpanGamut(str);
- str = str.replace(/^([ \t]*)/g, "
");
- str += "
"
- grafsOut.push(str);
- }
-
- }
- //
- // Unhashify HTML blocks
- //
- if (!doNotUnhash) {
- end = grafsOut.length;
- for (var i = 0; i < end; i++) {
- var foundAny = true;
- while (foundAny) { // we may need several runs, since the data may be nested
- foundAny = false;
- grafsOut[i] = grafsOut[i].replace(/~K(\d+)K/g, function (wholeMatch, id) {
- foundAny = true;
- return g_html_blocks[id];
- });
- }
- }
- }
- return grafsOut.join("\n\n");
- }
-
- function _EncodeAmpsAndAngles(text) {
- // Smart processing for ampersands and angle brackets that need to be encoded.
-
- // Ampersand-encoding based entirely on Nat Irons's Amputator MT plugin:
- // http://bumppo.net/projects/amputator/
- text = text.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g, "&");
-
- // Encode naked <'s
- text = text.replace(/<(?![a-z\/?!]|~D)/gi, "<");
-
- return text;
- }
-
- function _EncodeBackslashEscapes(text) {
- //
- // Parameter: String.
- // Returns: The string, with after processing the following backslash
- // escape sequences.
- //
-
- // attacklab: The polite way to do this is with the new
- // escapeCharacters() function:
- //
- // text = escapeCharacters(text,"\\",true);
- // text = escapeCharacters(text,"`*_{}[]()>#+-.!",true);
- //
- // ...but we're sidestepping its use of the (slow) RegExp constructor
- // as an optimization for Firefox. This function gets called a LOT.
-
- text = text.replace(/\\(\\)/g, escapeCharacters_callback);
- text = text.replace(/\\([`*_{}\[\]()>#+-.!])/g, escapeCharacters_callback);
- return text;
- }
-
- function handleTrailingParens(wholeMatch, lookbehind, protocol, link) {
- if (lookbehind)
- return wholeMatch;
- if (link.charAt(link.length - 1) !== ")")
- return "<" + protocol + link + ">";
- var parens = link.match(/[()]/g);
- var level = 0;
- for (var i = 0; i < parens.length; i++) {
- if (parens[i] === "(") {
- if (level <= 0)
- level = 1;
- else
- level++;
- }
- else {
- level--;
- }
- }
- var tail = "";
- if (level < 0) {
- var re = new RegExp("\\){1," + (-level) + "}$");
- link = link.replace(re, function (trailingParens) {
- tail = trailingParens;
- return "";
- });
- }
-
- return "<" + protocol + link + ">" + tail;
- }
-
- function _DoAutoLinks(text) {
-
- // note that at this point, all other URL in the text are already hyperlinked as
- // *except* for the case
-
- // automatically add < and > around unadorned raw hyperlinks
- // must be preceded by a non-word character (and not by =" or <) and followed by non-word/EOF character
- // simulating the lookbehind in a consuming way is okay here, since a URL can neither and with a " nor
- // with a <, so there is no risk of overlapping matches.
- text = text.replace(/(="|<)?\b(https?|ftp)(:\/\/[-A-Z0-9+&@#\/%?=~_|\[\]\(\)!:,\.;]*[-A-Z0-9+&@#\/%=~_|\[\])])(?=$|\W)/gi, handleTrailingParens);
-
- // autolink anything like
-
- var replacer = function (wholematch, m1) { return "" + pluginHooks.plainLinkText(m1) + " "; }
- text = text.replace(/<((https?|ftp):[^'">\s]+)>/gi, replacer);
-
- // Email addresses:
- /*
- text = text.replace(/
- <
- (?:mailto:)?
- (
- [-.\w]+
- \@
- [-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+
- )
- >
- /gi, _DoAutoLinks_callback());
- */
-
- /* disabling email autolinking, since we don't do that on the server, either
- text = text.replace(/<(?:mailto:)?([-.\w]+\@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,
- function(wholeMatch,m1) {
- return _EncodeEmailAddress( _UnescapeSpecialChars(m1) );
- }
- );
- */
- return text;
- }
-
- function _UnescapeSpecialChars(text) {
- //
- // Swap back in all the special characters we've hidden.
- //
- text = text.replace(/~E(\d+)E/g,
- function (wholeMatch, m1) {
- var charCodeToReplace = parseInt(m1);
- return String.fromCharCode(charCodeToReplace);
- }
- );
- return text;
- }
-
- function _Outdent(text) {
- //
- // Remove one level of line-leading tabs or spaces
- //
-
- // attacklab: hack around Konqueror 3.5.4 bug:
- // "----------bug".replace(/^-/g,"") == "bug"
-
- text = text.replace(/^(\t|[ ]{1,4})/gm, "~0"); // attacklab: g_tab_width
-
- // attacklab: clean up hack
- text = text.replace(/~0/g, "")
-
- return text;
- }
-
- function _Detab(text) {
- if (!/\t/.test(text))
- return text;
-
- var spaces = [" ", " ", " ", " "],
- skew = 0,
- v;
-
- return text.replace(/[\n\t]/g, function (match, offset) {
- if (match === "\n") {
- skew = offset + 1;
- return match;
- }
- v = (offset - skew) % 4;
- skew = offset + 1;
- return spaces[v];
- });
- }
-
- //
- // attacklab: Utility functions
- //
-
- var _problemUrlChars = /(?:["'*()[\]:]|~D)/g;
-
- // hex-encodes some unusual "problem" chars in URLs to avoid URL detection problems
- function encodeProblemUrlChars(url) {
- if (!url)
- return "";
-
- var len = url.length;
-
- return url.replace(_problemUrlChars, function (match, offset) {
- if (match == "~D") // escape for dollar
- return "%24";
- if (match == ":") {
- if (offset == len - 1 || /[0-9\/]/.test(url.charAt(offset + 1)))
- return ":"
- }
- return "%" + match.charCodeAt(0).toString(16);
- });
- }
-
-
- function escapeCharacters(text, charsToEscape, afterBackslash) {
- // First we have to escape the escape characters so that
- // we can build a character class out of them
- var regexString = "([" + charsToEscape.replace(/([\[\]\\])/g, "\\$1") + "])";
-
- if (afterBackslash) {
- regexString = "\\\\" + regexString;
- }
-
- var regex = new RegExp(regexString, "g");
- text = text.replace(regex, escapeCharacters_callback);
-
- return text;
- }
-
-
- function escapeCharacters_callback(wholeMatch, m1) {
- var charCodeToEscape = m1.charCodeAt(0);
- return "~E" + charCodeToEscape + "E";
- }
-
- }; // end of the Markdown.Converter constructor
-
-})();
diff --git a/collectedstatic/pagedown/LICENSE.txt b/collectedstatic/pagedown/LICENSE.txt
deleted file mode 100644
index a0c9467..0000000
--- a/collectedstatic/pagedown/LICENSE.txt
+++ /dev/null
@@ -1,32 +0,0 @@
-A javascript port of Markdown, as used on Stack Overflow
-and the rest of Stack Exchange network.
-
-Largely based on showdown.js by John Fraser (Attacklab).
-
-Original Markdown Copyright (c) 2004-2005 John Gruber
-
-
-
-Original Showdown code copyright (c) 2007 John Fraser
-
-Modifications and bugfixes (c) 2009 Dana Robinson
-Modifications and bugfixes (c) 2009-2011 Stack Exchange Inc.
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in
-all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
-THE SOFTWARE.
-
diff --git a/collectedstatic/pagedown/Markdown.Converter.js b/collectedstatic/pagedown/Markdown.Converter.js
deleted file mode 100644
index 58fc54a..0000000
--- a/collectedstatic/pagedown/Markdown.Converter.js
+++ /dev/null
@@ -1,1332 +0,0 @@
-var Markdown;
-
-if (typeof exports === "object" && typeof require === "function") // we're in a CommonJS (e.g. Node.js) module
- Markdown = exports;
-else
- Markdown = {};
-
-// The following text is included for historical reasons, but should
-// be taken with a pinch of salt; it's not all true anymore.
-
-//
-// Wherever possible, Showdown is a straight, line-by-line port
-// of the Perl version of Markdown.
-//
-// This is not a normal parser design; it's basically just a
-// series of string substitutions. It's hard to read and
-// maintain this way, but keeping Showdown close to the original
-// design makes it easier to port new features.
-//
-// More importantly, Showdown behaves like markdown.pl in most
-// edge cases. So web applications can do client-side preview
-// in Javascript, and then build identical HTML on the server.
-//
-// This port needs the new RegExp functionality of ECMA 262,
-// 3rd Edition (i.e. Javascript 1.5). Most modern web browsers
-// should do fine. Even with the new regular expression features,
-// We do a lot of work to emulate Perl's regex functionality.
-// The tricky changes in this file mostly have the "attacklab:"
-// label. Major or self-explanatory changes don't.
-//
-// Smart diff tools like Araxis Merge will be able to match up
-// this file with markdown.pl in a useful way. A little tweaking
-// helps: in a copy of markdown.pl, replace "#" with "//" and
-// replace "$text" with "text". Be sure to ignore whitespace
-// and line endings.
-//
-
-
-//
-// Usage:
-//
-// var text = "Markdown *rocks*.";
-//
-// var converter = new Markdown.Converter();
-// var html = converter.makeHtml(text);
-//
-// alert(html);
-//
-// Note: move the sample code to the bottom of this
-// file before uncommenting it.
-//
-
-(function () {
-
- function identity(x) { return x; }
- function returnFalse(x) { return false; }
-
- function HookCollection() { }
-
- HookCollection.prototype = {
-
- chain: function (hookname, func) {
- var original = this[hookname];
- if (!original)
- throw new Error("unknown hook " + hookname);
-
- if (original === identity)
- this[hookname] = func;
- else
- this[hookname] = function (x) { return func(original(x)); }
- },
- set: function (hookname, func) {
- if (!this[hookname])
- throw new Error("unknown hook " + hookname);
- this[hookname] = func;
- },
- addNoop: function (hookname) {
- this[hookname] = identity;
- },
- addFalse: function (hookname) {
- this[hookname] = returnFalse;
- }
- };
-
- Markdown.HookCollection = HookCollection;
-
- // g_urls and g_titles allow arbitrary user-entered strings as keys. This
- // caused an exception (and hence stopped the rendering) when the user entered
- // e.g. [push] or [__proto__]. Adding a prefix to the actual key prevents this
- // (since no builtin property starts with "s_"). See
- // http://meta.stackoverflow.com/questions/64655/strange-wmd-bug
- // (granted, switching from Array() to Object() alone would have left only __proto__
- // to be a problem)
- function SaveHash() { }
- SaveHash.prototype = {
- set: function (key, value) {
- this["s_" + key] = value;
- },
- get: function (key) {
- return this["s_" + key];
- }
- };
-
- Markdown.Converter = function () {
- var pluginHooks = this.hooks = new HookCollection();
- pluginHooks.addNoop("plainLinkText"); // given a URL that was encountered by itself (without markup), should return the link text that's to be given to this link
- pluginHooks.addNoop("preConversion"); // called with the orignal text as given to makeHtml. The result of this plugin hook is the actual markdown source that will be cooked
- pluginHooks.addNoop("postConversion"); // called with the final cooked HTML code. The result of this plugin hook is the actual output of makeHtml
-
- //
- // Private state of the converter instance:
- //
-
- // Global hashes, used by various utility routines
- var g_urls;
- var g_titles;
- var g_html_blocks;
-
- // Used to track when we're inside an ordered or unordered list
- // (see _ProcessListItems() for details):
- var g_list_level;
-
- this.makeHtml = function (text) {
-
- //
- // Main function. The order in which other subs are called here is
- // essential. Link and image substitutions need to happen before
- // _EscapeSpecialCharsWithinTagAttributes(), so that any *'s or _'s in the
- // and tags get encoded.
- //
-
- // This will only happen if makeHtml on the same converter instance is called from a plugin hook.
- // Don't do that.
- if (g_urls)
- throw new Error("Recursive call to converter.makeHtml");
-
- // Create the private state objects.
- g_urls = new SaveHash();
- g_titles = new SaveHash();
- g_html_blocks = [];
- g_list_level = 0;
-
- text = pluginHooks.preConversion(text);
-
- // attacklab: Replace ~ with ~T
- // This lets us use tilde as an escape char to avoid md5 hashes
- // The choice of character is arbitray; anything that isn't
- // magic in Markdown will work.
- text = text.replace(/~/g, "~T");
-
- // attacklab: Replace $ with ~D
- // RegExp interprets $ as a special character
- // when it's in a replacement string
- text = text.replace(/\$/g, "~D");
-
- // Standardize line endings
- text = text.replace(/\r\n/g, "\n"); // DOS to Unix
- text = text.replace(/\r/g, "\n"); // Mac to Unix
-
- // Make sure text begins and ends with a couple of newlines:
- text = "\n\n" + text + "\n\n";
-
- // Convert all tabs to spaces.
- text = _Detab(text);
-
- // Strip any lines consisting only of spaces and tabs.
- // This makes subsequent regexen easier to write, because we can
- // match consecutive blank lines with /\n+/ instead of something
- // contorted like /[ \t]*\n+/ .
- text = text.replace(/^[ \t]+$/mg, "");
-
- // Turn block-level HTML blocks into hash entries
- text = _HashHTMLBlocks(text);
-
- // Strip link definitions, store in hashes.
- text = _StripLinkDefinitions(text);
-
- text = _RunBlockGamut(text);
-
- text = _UnescapeSpecialChars(text);
-
- // attacklab: Restore dollar signs
- text = text.replace(/~D/g, "$$");
-
- // attacklab: Restore tildes
- text = text.replace(/~T/g, "~");
-
- text = pluginHooks.postConversion(text);
-
- g_html_blocks = g_titles = g_urls = null;
-
- return text;
- };
-
- function _StripLinkDefinitions(text) {
- //
- // Strips link definitions from text, stores the URLs and titles in
- // hash references.
- //
-
- // Link defs are in the form: ^[id]: url "optional title"
-
- /*
- text = text.replace(/
- ^[ ]{0,3}\[(.+)\]: // id = $1 attacklab: g_tab_width - 1
- [ \t]*
- \n? // maybe *one* newline
- [ \t]*
- (\S+?)>? // url = $2
- (?=\s|$) // lookahead for whitespace instead of the lookbehind removed below
- [ \t]*
- \n? // maybe one newline
- [ \t]*
- ( // (potential) title = $3
- (\n*) // any lines skipped = $4 attacklab: lookbehind removed
- [ \t]+
- ["(]
- (.+?) // title = $5
- [")]
- [ \t]*
- )? // title is optional
- (?:\n+|$)
- /gm, function(){...});
- */
-
- text = text.replace(/^[ ]{0,3}\[(.+)\]:[ \t]*\n?[ \t]*(\S+?)>?(?=\s|$)[ \t]*\n?[ \t]*((\n*)["(](.+?)[")][ \t]*)?(?:\n+)/gm,
- function (wholeMatch, m1, m2, m3, m4, m5) {
- m1 = m1.toLowerCase();
- g_urls.set(m1, _EncodeAmpsAndAngles(m2)); // Link IDs are case-insensitive
- if (m4) {
- // Oops, found blank lines, so it's not a title.
- // Put back the parenthetical statement we stole.
- return m3;
- } else if (m5) {
- g_titles.set(m1, m5.replace(/"/g, """));
- }
-
- // Completely remove the definition from the text
- return "";
- }
- );
-
- return text;
- }
-
- function _HashHTMLBlocks(text) {
-
- // Hashify HTML blocks:
- // We only want to do this for block-level HTML tags, such as headers,
- // lists, and tables. That's because we still want to wrap s around
- // "paragraphs" that are wrapped in non-block-level tags, such as anchors,
- // phrase emphasis, and spans. The list of tags we're looking for is
- // hard-coded:
- var block_tags_a = "p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del"
- var block_tags_b = "p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math"
-
- // First, look for nested blocks, e.g.:
- //
- //
- // tags for inner block must be indented.
- //
- //
- //
- // The outermost tags must start at the left margin for this to match, and
- // the inner nested divs must be indented.
- // We need to do this before the next, more liberal match, because the next
- // match will start at the first `` and stop at the first `
`.
-
- // attacklab: This regex can be expensive when it fails.
-
- /*
- text = text.replace(/
- ( // save in $1
- ^ // start of line (with /m)
- <($block_tags_a) // start tag = $2
- \b // word break
- // attacklab: hack around khtml/pcre bug...
- [^\r]*?\n // any number of lines, minimally matching
- \2> // the matching end tag
- [ \t]* // trailing spaces/tabs
- (?=\n+) // followed by a newline
- ) // attacklab: there are sentinel newlines at end of document
- /gm,function(){...}};
- */
- text = text.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math|ins|del)\b[^\r]*?\n<\/\2>[ \t]*(?=\n+))/gm, hashElement);
-
- //
- // Now match more liberally, simply from `\n` to ` \n`
- //
-
- /*
- text = text.replace(/
- ( // save in $1
- ^ // start of line (with /m)
- <($block_tags_b) // start tag = $2
- \b // word break
- // attacklab: hack around khtml/pcre bug...
- [^\r]*? // any number of lines, minimally matching
- .*\2> // the matching end tag
- [ \t]* // trailing spaces/tabs
- (?=\n+) // followed by a newline
- ) // attacklab: there are sentinel newlines at end of document
- /gm,function(){...}};
- */
- text = text.replace(/^(<(p|div|h[1-6]|blockquote|pre|table|dl|ol|ul|script|noscript|form|fieldset|iframe|math)\b[^\r]*?.*<\/\2>[ \t]*(?=\n+)\n)/gm, hashElement);
-
- // Special case just for . It was easier to make a special case than
- // to make the other regex more complicated.
-
- /*
- text = text.replace(/
- \n // Starting after a blank line
- [ ]{0,3}
- ( // save in $1
- (<(hr) // start tag = $2
- \b // word break
- ([^<>])*?
- \/?>) // the matching end tag
- [ \t]*
- (?=\n{2,}) // followed by a blank line
- )
- /g,hashElement);
- */
- text = text.replace(/\n[ ]{0,3}((<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g, hashElement);
-
- // Special case for standalone HTML comments:
-
- /*
- text = text.replace(/
- \n\n // Starting after a blank line
- [ ]{0,3} // attacklab: g_tab_width - 1
- ( // save in $1
- -]|-[^>])(?:[^-]|-[^-])*)--) // see http://www.w3.org/TR/html-markup/syntax.html#comments and http://meta.stackoverflow.com/q/95256
- >
- [ \t]*
- (?=\n{2,}) // followed by a blank line
- )
- /g,hashElement);
- */
- text = text.replace(/\n\n[ ]{0,3}(-]|-[^>])(?:[^-]|-[^-])*)--)>[ \t]*(?=\n{2,}))/g, hashElement);
-
- // PHP and ASP-style processor instructions (...?> and <%...%>)
-
- /*
- text = text.replace(/
- (?:
- \n\n // Starting after a blank line
- )
- ( // save in $1
- [ ]{0,3} // attacklab: g_tab_width - 1
- (?:
- <([?%]) // $2
- [^\r]*?
- \2>
- )
- [ \t]*
- (?=\n{2,}) // followed by a blank line
- )
- /g,hashElement);
- */
- text = text.replace(/(?:\n\n)([ ]{0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g, hashElement);
-
- return text;
- }
-
- function hashElement(wholeMatch, m1) {
- var blockText = m1;
-
- // Undo double lines
- blockText = blockText.replace(/^\n+/, "");
-
- // strip trailing blank lines
- blockText = blockText.replace(/\n+$/g, "");
-
- // Replace the element text with a marker ("~KxK" where x is its key)
- blockText = "\n\n~K" + (g_html_blocks.push(blockText) - 1) + "K\n\n";
-
- return blockText;
- }
-
- function _RunBlockGamut(text, doNotUnhash) {
- //
- // These are all the transformations that form block-level
- // tags like paragraphs, headers, and list items.
- //
- text = _DoHeaders(text);
-
- // Do Horizontal Rules:
- var replacement = " \n";
- text = text.replace(/^[ ]{0,2}([ ]?\*[ ]?){3,}[ \t]*$/gm, replacement);
- text = text.replace(/^[ ]{0,2}([ ]?-[ ]?){3,}[ \t]*$/gm, replacement);
- text = text.replace(/^[ ]{0,2}([ ]?_[ ]?){3,}[ \t]*$/gm, replacement);
-
- text = _DoLists(text);
- text = _DoCodeBlocks(text);
- text = _DoBlockQuotes(text);
-
- // We already ran _HashHTMLBlocks() before, in Markdown(), but that
- // was to escape raw HTML in the original Markdown source. This time,
- // we're escaping the markup we've just created, so that we don't wrap
- // tags around block-level tags.
- text = _HashHTMLBlocks(text);
- text = _FormParagraphs(text, doNotUnhash);
-
- return text;
- }
-
- function _RunSpanGamut(text) {
- //
- // These are all the transformations that occur *within* block-level
- // tags like paragraphs, headers, and list items.
- //
-
- text = _DoCodeSpans(text);
- text = _EscapeSpecialCharsWithinTagAttributes(text);
- text = _EncodeBackslashEscapes(text);
-
- // Process anchor and image tags. Images must come first,
- // because ![foo][f] looks like an anchor.
- text = _DoImages(text);
- text = _DoAnchors(text);
-
- // Make links out of things like ` `
- // Must come after _DoAnchors(), because you can use < and >
- // delimiters in inline links like [this]().
- text = _DoAutoLinks(text);
-
- text = text.replace(/~P/g, "://"); // put in place to prevent autolinking; reset now
-
- text = _EncodeAmpsAndAngles(text);
- text = _DoItalicsAndBold(text);
-
- // Do hard breaks:
- text = text.replace(/ +\n/g, " \n");
-
- return text;
- }
-
- function _EscapeSpecialCharsWithinTagAttributes(text) {
- //
- // Within tags -- meaning between < and > -- encode [\ ` * _] so they
- // don't conflict with their use in Markdown for code, italics and strong.
- //
-
- // Build a regex to find HTML tags and comments. See Friedl's
- // "Mastering Regular Expressions", 2nd Ed., pp. 200-201.
-
- // SE: changed the comment part of the regex
-
- var regex = /(<[a-z\/!$]("[^"]*"|'[^']*'|[^'">])*>|-]|-[^>])(?:[^-]|-[^-])*)--)>)/gi;
-
- text = text.replace(regex, function (wholeMatch) {
- var tag = wholeMatch.replace(/(.)<\/?code>(?=.)/g, "$1`");
- tag = escapeCharacters(tag, wholeMatch.charAt(1) == "!" ? "\\`*_/" : "\\`*_"); // also escape slashes in comments to prevent autolinking there -- http://meta.stackoverflow.com/questions/95987
- return tag;
- });
-
- return text;
- }
-
- function _DoAnchors(text) {
- //
- // Turn Markdown link shortcuts into XHTML tags.
- //
- //
- // First, handle reference-style links: [link text] [id]
- //
-
- /*
- text = text.replace(/
- ( // wrap whole match in $1
- \[
- (
- (?:
- \[[^\]]*\] // allow brackets nested one level
- |
- [^\[] // or anything else
- )*
- )
- \]
-
- [ ]? // one optional space
- (?:\n[ ]*)? // one optional newline followed by spaces
-
- \[
- (.*?) // id = $3
- \]
- )
- ()()()() // pad remaining backreferences
- /g, writeAnchorTag);
- */
- text = text.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g, writeAnchorTag);
-
- //
- // Next, inline-style links: [link text](url "optional title")
- //
-
- /*
- text = text.replace(/
- ( // wrap whole match in $1
- \[
- (
- (?:
- \[[^\]]*\] // allow brackets nested one level
- |
- [^\[\]] // or anything else
- )*
- )
- \]
- \( // literal paren
- [ \t]*
- () // no id, so leave $3 empty
- ( // href = $4
- (?:
- \([^)]*\) // allow one level of (correctly nested) parens (think MSDN)
- |
- [^()\s]
- )*?
- )>?
- [ \t]*
- ( // $5
- (['"]) // quote char = $6
- (.*?) // Title = $7
- \6 // matching quote
- [ \t]* // ignore any spaces/tabs between closing quote and )
- )? // title is optional
- \)
- )
- /g, writeAnchorTag);
- */
-
- text = text.replace(/(\[((?:\[[^\]]*\]|[^\[\]])*)\]\([ \t]*()((?:\([^)]*\)|[^()\s])*?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g, writeAnchorTag);
-
- //
- // Last, handle reference-style shortcuts: [link text]
- // These must come last in case you've also got [link test][1]
- // or [link test](/foo)
- //
-
- /*
- text = text.replace(/
- ( // wrap whole match in $1
- \[
- ([^\[\]]+) // link text = $2; can't contain '[' or ']'
- \]
- )
- ()()()()() // pad rest of backreferences
- /g, writeAnchorTag);
- */
- text = text.replace(/(\[([^\[\]]+)\])()()()()()/g, writeAnchorTag);
-
- return text;
- }
-
- function writeAnchorTag(wholeMatch, m1, m2, m3, m4, m5, m6, m7) {
- if (m7 == undefined) m7 = "";
- var whole_match = m1;
- var link_text = m2.replace(/:\/\//g, "~P"); // to prevent auto-linking withing the link. will be converted back after the auto-linker runs
- var link_id = m3.toLowerCase();
- var url = m4;
- var title = m7;
-
- if (url == "") {
- if (link_id == "") {
- // lower-case and turn embedded newlines into spaces
- link_id = link_text.toLowerCase().replace(/ ?\n/g, " ");
- }
- url = "#" + link_id;
-
- if (g_urls.get(link_id) != undefined) {
- url = g_urls.get(link_id);
- if (g_titles.get(link_id) != undefined) {
- title = g_titles.get(link_id);
- }
- }
- else {
- if (whole_match.search(/\(\s*\)$/m) > -1) {
- // Special case for explicit empty url
- url = "";
- } else {
- return whole_match;
- }
- }
- }
- url = encodeProblemUrlChars(url);
- url = escapeCharacters(url, "*_");
- var result = " " + link_text + " ";
-
- return result;
- }
-
- function _DoImages(text) {
- //
- // Turn Markdown image shortcuts into tags.
- //
-
- //
- // First, handle reference-style labeled images: ![alt text][id]
- //
-
- /*
- text = text.replace(/
- ( // wrap whole match in $1
- !\[
- (.*?) // alt text = $2
- \]
-
- [ ]? // one optional space
- (?:\n[ ]*)? // one optional newline followed by spaces
-
- \[
- (.*?) // id = $3
- \]
- )
- ()()()() // pad rest of backreferences
- /g, writeImageTag);
- */
- text = text.replace(/(!\[(.*?)\][ ]?(?:\n[ ]*)?\[(.*?)\])()()()()/g, writeImageTag);
-
- //
- // Next, handle inline images: 
- // Don't forget: encode * and _
-
- /*
- text = text.replace(/
- ( // wrap whole match in $1
- !\[
- (.*?) // alt text = $2
- \]
- \s? // One optional whitespace character
- \( // literal paren
- [ \t]*
- () // no id, so leave $3 empty
- (\S+?)>? // src url = $4
- [ \t]*
- ( // $5
- (['"]) // quote char = $6
- (.*?) // title = $7
- \6 // matching quote
- [ \t]*
- )? // title is optional
- \)
- )
- /g, writeImageTag);
- */
- text = text.replace(/(!\[(.*?)\]\s?\([ \t]*()(\S+?)>?[ \t]*((['"])(.*?)\6[ \t]*)?\))/g, writeImageTag);
-
- return text;
- }
-
- function attributeEncode(text) {
- // unconditionally replace angle brackets here -- what ends up in an attribute (e.g. alt or title)
- // never makes sense to have verbatim HTML in it (and the sanitizer would totally break it)
- return text.replace(/>/g, ">").replace(/";
-
- return result;
- }
-
- function _DoHeaders(text) {
-
- // Setext-style headers:
- // Header 1
- // ========
- //
- // Header 2
- // --------
- //
- text = text.replace(/^(.+)[ \t]*\n=+[ \t]*\n+/gm,
- function (wholeMatch, m1) { return "" + _RunSpanGamut(m1) + " \n\n"; }
- );
-
- text = text.replace(/^(.+)[ \t]*\n-+[ \t]*\n+/gm,
- function (matchFound, m1) { return "" + _RunSpanGamut(m1) + " \n\n"; }
- );
-
- // atx-style headers:
- // # Header 1
- // ## Header 2
- // ## Header 2 with closing hashes ##
- // ...
- // ###### Header 6
- //
-
- /*
- text = text.replace(/
- ^(\#{1,6}) // $1 = string of #'s
- [ \t]*
- (.+?) // $2 = Header text
- [ \t]*
- \#* // optional closing #'s (not counted)
- \n+
- /gm, function() {...});
- */
-
- text = text.replace(/^(\#{1,6})[ \t]*(.+?)[ \t]*\#*\n+/gm,
- function (wholeMatch, m1, m2) {
- var h_level = m1.length;
- return "" + _RunSpanGamut(m2) + " \n\n";
- }
- );
-
- return text;
- }
-
- function _DoLists(text) {
- //
- // Form HTML ordered (numbered) and unordered (bulleted) lists.
- //
-
- // attacklab: add sentinel to hack around khtml/safari bug:
- // http://bugs.webkit.org/show_bug.cgi?id=11231
- text += "~0";
-
- // Re-usable pattern to match any entirel ul or ol list:
-
- /*
- var whole_list = /
- ( // $1 = whole list
- ( // $2
- [ ]{0,3} // attacklab: g_tab_width - 1
- ([*+-]|\d+[.]) // $3 = first list item marker
- [ \t]+
- )
- [^\r]+?
- ( // $4
- ~0 // sentinel for workaround; should be $
- |
- \n{2,}
- (?=\S)
- (?! // Negative lookahead for another list item marker
- [ \t]*
- (?:[*+-]|\d+[.])[ \t]+
- )
- )
- )
- /g
- */
- var whole_list = /^(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm;
-
- if (g_list_level) {
- text = text.replace(whole_list, function (wholeMatch, m1, m2) {
- var list = m1;
- var list_type = (m2.search(/[*+-]/g) > -1) ? "ul" : "ol";
-
- var result = _ProcessListItems(list, list_type);
-
- // Trim any trailing whitespace, to put the closing `$list_type>`
- // up on the preceding line, to get it past the current stupid
- // HTML block parser. This is a hack to work around the terrible
- // hack that is the HTML block parser.
- result = result.replace(/\s+$/, "");
- result = "<" + list_type + ">" + result + "" + list_type + ">\n";
- return result;
- });
- } else {
- whole_list = /(\n\n|^\n?)(([ ]{0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(~0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/g;
- text = text.replace(whole_list, function (wholeMatch, m1, m2, m3) {
- var runup = m1;
- var list = m2;
-
- var list_type = (m3.search(/[*+-]/g) > -1) ? "ul" : "ol";
- var result = _ProcessListItems(list, list_type);
- result = runup + "<" + list_type + ">\n" + result + "" + list_type + ">\n";
- return result;
- });
- }
-
- // attacklab: strip sentinel
- text = text.replace(/~0/, "");
-
- return text;
- }
-
- var _listItemMarkers = { ol: "\\d+[.]", ul: "[*+-]" };
-
- function _ProcessListItems(list_str, list_type) {
- //
- // Process the contents of a single ordered or unordered list, splitting it
- // into individual list items.
- //
- // list_type is either "ul" or "ol".
-
- // The $g_list_level global keeps track of when we're inside a list.
- // Each time we enter a list, we increment it; when we leave a list,
- // we decrement. If it's zero, we're not in a list anymore.
- //
- // We do this because when we're not inside a list, we want to treat
- // something like this:
- //
- // I recommend upgrading to version
- // 8. Oops, now this line is treated
- // as a sub-list.
- //
- // As a single paragraph, despite the fact that the second line starts
- // with a digit-period-space sequence.
- //
- // Whereas when we're inside a list (or sub-list), that line will be
- // treated as the start of a sub-list. What a kludge, huh? This is
- // an aspect of Markdown's syntax that's hard to parse perfectly
- // without resorting to mind-reading. Perhaps the solution is to
- // change the syntax rules such that sub-lists must start with a
- // starting cardinal number; e.g. "1." or "a.".
-
- g_list_level++;
-
- // trim trailing blank lines:
- list_str = list_str.replace(/\n{2,}$/, "\n");
-
- // attacklab: add sentinel to emulate \z
- list_str += "~0";
-
- // In the original attacklab showdown, list_type was not given to this function, and anything
- // that matched /[*+-]|\d+[.]/ would just create the next , causing this mismatch:
- //
- // Markdown rendered by WMD rendered by MarkdownSharp
- // ------------------------------------------------------------------
- // 1. first 1. first 1. first
- // 2. second 2. second 2. second
- // - third 3. third * third
- //
- // We changed this to behave identical to MarkdownSharp. This is the constructed RegEx,
- // with {MARKER} being one of \d+[.] or [*+-], depending on list_type:
-
- /*
- list_str = list_str.replace(/
- (^[ \t]*) // leading whitespace = $1
- ({MARKER}) [ \t]+ // list marker = $2
- ([^\r]+? // list item text = $3
- (\n+)
- )
- (?=
- (~0 | \2 ({MARKER}) [ \t]+)
- )
- /gm, function(){...});
- */
-
- var marker = _listItemMarkers[list_type];
- var re = new RegExp("(^[ \\t]*)(" + marker + ")[ \\t]+([^\\r]+?(\\n+))(?=(~0|\\1(" + marker + ")[ \\t]+))", "gm");
- var last_item_had_a_double_newline = false;
- list_str = list_str.replace(re,
- function (wholeMatch, m1, m2, m3) {
- var item = m3;
- var leading_space = m1;
- var ends_with_double_newline = /\n\n$/.test(item);
- var contains_double_newline = ends_with_double_newline || item.search(/\n{2,}/) > -1;
-
- if (contains_double_newline || last_item_had_a_double_newline) {
- item = _RunBlockGamut(_Outdent(item), /* doNotUnhash = */true);
- }
- else {
- // Recursion for sub-lists:
- item = _DoLists(_Outdent(item));
- item = item.replace(/\n$/, ""); // chomp(item)
- item = _RunSpanGamut(item);
- }
- last_item_had_a_double_newline = ends_with_double_newline;
- return " " + item + " \n";
- }
- );
-
- // attacklab: strip sentinel
- list_str = list_str.replace(/~0/g, "");
-
- g_list_level--;
- return list_str;
- }
-
- function _DoCodeBlocks(text) {
- //
- // Process Markdown `` blocks.
- //
-
- /*
- text = text.replace(/
- (?:\n\n|^)
- ( // $1 = the code block -- one or more lines, starting with a space/tab
- (?:
- (?:[ ]{4}|\t) // Lines must start with a tab or a tab-width of spaces - attacklab: g_tab_width
- .*\n+
- )+
- )
- (\n*[ ]{0,3}[^ \t\n]|(?=~0)) // attacklab: g_tab_width
- /g ,function(){...});
- */
-
- // attacklab: sentinel workarounds for lack of \A and \Z, safari\khtml bug
- text += "~0";
-
- text = text.replace(/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=~0))/g,
- function (wholeMatch, m1, m2) {
- var codeblock = m1;
- var nextChar = m2;
-
- codeblock = _EncodeCode(_Outdent(codeblock));
- codeblock = _Detab(codeblock);
- codeblock = codeblock.replace(/^\n+/g, ""); // trim leading newlines
- codeblock = codeblock.replace(/\n+$/g, ""); // trim trailing whitespace
-
- codeblock = "" + codeblock + "\n ";
-
- return "\n\n" + codeblock + "\n\n" + nextChar;
- }
- );
-
- // attacklab: strip sentinel
- text = text.replace(/~0/, "");
-
- return text;
- }
-
- function hashBlock(text) {
- text = text.replace(/(^\n+|\n+$)/g, "");
- return "\n\n~K" + (g_html_blocks.push(text) - 1) + "K\n\n";
- }
-
- function _DoCodeSpans(text) {
- //
- // * Backtick quotes are used for spans.
- //
- // * You can use multiple backticks as the delimiters if you want to
- // include literal backticks in the code span. So, this input:
- //
- // Just type ``foo `bar` baz`` at the prompt.
- //
- // Will translate to:
- //
- // Just type foo `bar` baz at the prompt.
- //
- // There's no arbitrary limit to the number of backticks you
- // can use as delimters. If you need three consecutive backticks
- // in your code, use four for delimiters, etc.
- //
- // * You can use spaces to get literal backticks at the edges:
- //
- // ... type `` `bar` `` ...
- //
- // Turns to:
- //
- // ... type `bar` ...
- //
-
- /*
- text = text.replace(/
- (^|[^\\]) // Character before opening ` can't be a backslash
- (`+) // $2 = Opening run of `
- ( // $3 = The code block
- [^\r]*?
- [^`] // attacklab: work around lack of lookbehind
- )
- \2 // Matching closer
- (?!`)
- /gm, function(){...});
- */
-
- text = text.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,
- function (wholeMatch, m1, m2, m3, m4) {
- var c = m3;
- c = c.replace(/^([ \t]*)/g, ""); // leading whitespace
- c = c.replace(/[ \t]*$/g, ""); // trailing whitespace
- c = _EncodeCode(c);
- c = c.replace(/:\/\//g, "~P"); // to prevent auto-linking. Not necessary in code *blocks*, but in code spans. Will be converted back after the auto-linker runs.
- return m1 + "" + c + "";
- }
- );
-
- return text;
- }
-
- function _EncodeCode(text) {
- //
- // Encode/escape certain characters inside Markdown code runs.
- // The point is that in code, these characters are literals,
- // and lose their special Markdown meanings.
- //
- // Encode all ampersands; HTML entities are not
- // entities within a Markdown code span.
- text = text.replace(/&/g, "&");
-
- // Do the angle bracket song and dance:
- text = text.replace(//g, ">");
-
- // Now, escape characters that are magic in Markdown:
- text = escapeCharacters(text, "\*_{}[]\\", false);
-
- // jj the line above breaks this:
- //---
-
- //* Item
-
- // 1. Subitem
-
- // special char: *
- //---
-
- return text;
- }
-
- function _DoItalicsAndBold(text) {
-
- // must go first:
- text = text.replace(/([\W_]|^)(\*\*|__)(?=\S)([^\r]*?\S[\*_]*)\2([\W_]|$)/g,
- "$1$3 $4");
-
- text = text.replace(/([\W_]|^)(\*|_)(?=\S)([^\r\*_]*?\S)\2([\W_]|$)/g,
- "$1$3 $4");
-
- return text;
- }
-
- function _DoBlockQuotes(text) {
-
- /*
- text = text.replace(/
- ( // Wrap whole match in $1
- (
- ^[ \t]*>[ \t]? // '>' at the start of a line
- .+\n // rest of the first line
- (.+\n)* // subsequent consecutive lines
- \n* // blanks
- )+
- )
- /gm, function(){...});
- */
-
- text = text.replace(/((^[ \t]*>[ \t]?.+\n(.+\n)*\n*)+)/gm,
- function (wholeMatch, m1) {
- var bq = m1;
-
- // attacklab: hack around Konqueror 3.5.4 bug:
- // "----------bug".replace(/^-/g,"") == "bug"
-
- bq = bq.replace(/^[ \t]*>[ \t]?/gm, "~0"); // trim one level of quoting
-
- // attacklab: clean up hack
- bq = bq.replace(/~0/g, "");
-
- bq = bq.replace(/^[ \t]+$/gm, ""); // trim whitespace-only lines
- bq = _RunBlockGamut(bq); // recurse
-
- bq = bq.replace(/(^|\n)/g, "$1 ");
- // These leading spaces screw with content, so we need to fix that:
- bq = bq.replace(
- /(\s*[^\r]+?<\/pre>)/gm,
- function (wholeMatch, m1) {
- var pre = m1;
- // attacklab: hack around Konqueror 3.5.4 bug:
- pre = pre.replace(/^ /mg, "~0");
- pre = pre.replace(/~0/g, "");
- return pre;
- });
-
- return hashBlock("\n" + bq + "\n ");
- }
- );
- return text;
- }
-
- function _FormParagraphs(text, doNotUnhash) {
- //
- // Params:
- // $text - string to process with html tags
- //
-
- // Strip leading and trailing lines:
- text = text.replace(/^\n+/g, "");
- text = text.replace(/\n+$/g, "");
-
- var grafs = text.split(/\n{2,}/g);
- var grafsOut = [];
-
- var markerRe = /~K(\d+)K/;
-
- //
- // Wrap
tags.
- //
- var end = grafs.length;
- for (var i = 0; i < end; i++) {
- var str = grafs[i];
-
- // if this is an HTML marker, copy it
- if (markerRe.test(str)) {
- grafsOut.push(str);
- }
- else if (/\S/.test(str)) {
- str = _RunSpanGamut(str);
- str = str.replace(/^([ \t]*)/g, "
");
- str += "
"
- grafsOut.push(str);
- }
-
- }
- //
- // Unhashify HTML blocks
- //
- if (!doNotUnhash) {
- end = grafsOut.length;
- for (var i = 0; i < end; i++) {
- var foundAny = true;
- while (foundAny) { // we may need several runs, since the data may be nested
- foundAny = false;
- grafsOut[i] = grafsOut[i].replace(/~K(\d+)K/g, function (wholeMatch, id) {
- foundAny = true;
- return g_html_blocks[id];
- });
- }
- }
- }
- return grafsOut.join("\n\n");
- }
-
- function _EncodeAmpsAndAngles(text) {
- // Smart processing for ampersands and angle brackets that need to be encoded.
-
- // Ampersand-encoding based entirely on Nat Irons's Amputator MT plugin:
- // http://bumppo.net/projects/amputator/
- text = text.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g, "&");
-
- // Encode naked <'s
- text = text.replace(/<(?![a-z\/?\$!])/gi, "<");
-
- return text;
- }
-
- function _EncodeBackslashEscapes(text) {
- //
- // Parameter: String.
- // Returns: The string, with after processing the following backslash
- // escape sequences.
- //
-
- // attacklab: The polite way to do this is with the new
- // escapeCharacters() function:
- //
- // text = escapeCharacters(text,"\\",true);
- // text = escapeCharacters(text,"`*_{}[]()>#+-.!",true);
- //
- // ...but we're sidestepping its use of the (slow) RegExp constructor
- // as an optimization for Firefox. This function gets called a LOT.
-
- text = text.replace(/\\(\\)/g, escapeCharacters_callback);
- text = text.replace(/\\([`*_{}\[\]()>#+-.!])/g, escapeCharacters_callback);
- return text;
- }
-
- function _DoAutoLinks(text) {
-
- // note that at this point, all other URL in the text are already hyperlinked as
- // *except* for the case
-
- // automatically add < and > around unadorned raw hyperlinks
- // must be preceded by space/BOF and followed by non-word/EOF character
- text = text.replace(/(^|\s)(https?|ftp)(:\/\/[-A-Z0-9+&@#\/%?=~_|\[\]\(\)!:,\.;]*[-A-Z0-9+&@#\/%=~_|\[\]])($|\W)/gi, "$1<$2$3>$4");
-
- // autolink anything like
-
- var replacer = function (wholematch, m1) { return "" + pluginHooks.plainLinkText(m1) + " "; }
- text = text.replace(/<((https?|ftp):[^'">\s]+)>/gi, replacer);
-
- // Email addresses:
- /*
- text = text.replace(/
- <
- (?:mailto:)?
- (
- [-.\w]+
- \@
- [-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+
- )
- >
- /gi, _DoAutoLinks_callback());
- */
-
- /* disabling email autolinking, since we don't do that on the server, either
- text = text.replace(/<(?:mailto:)?([-.\w]+\@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,
- function(wholeMatch,m1) {
- return _EncodeEmailAddress( _UnescapeSpecialChars(m1) );
- }
- );
- */
- return text;
- }
-
- function _UnescapeSpecialChars(text) {
- //
- // Swap back in all the special characters we've hidden.
- //
- text = text.replace(/~E(\d+)E/g,
- function (wholeMatch, m1) {
- var charCodeToReplace = parseInt(m1);
- return String.fromCharCode(charCodeToReplace);
- }
- );
- return text;
- }
-
- function _Outdent(text) {
- //
- // Remove one level of line-leading tabs or spaces
- //
-
- // attacklab: hack around Konqueror 3.5.4 bug:
- // "----------bug".replace(/^-/g,"") == "bug"
-
- text = text.replace(/^(\t|[ ]{1,4})/gm, "~0"); // attacklab: g_tab_width
-
- // attacklab: clean up hack
- text = text.replace(/~0/g, "")
-
- return text;
- }
-
- function _Detab(text) {
- if (!/\t/.test(text))
- return text;
-
- var spaces = [" ", " ", " ", " "],
- skew = 0,
- v;
-
- return text.replace(/[\n\t]/g, function (match, offset) {
- if (match === "\n") {
- skew = offset + 1;
- return match;
- }
- v = (offset - skew) % 4;
- skew = offset + 1;
- return spaces[v];
- });
- }
-
- //
- // attacklab: Utility functions
- //
-
- var _problemUrlChars = /(?:["'*()[\]:]|~D)/g;
-
- // hex-encodes some unusual "problem" chars in URLs to avoid URL detection problems
- function encodeProblemUrlChars(url) {
- if (!url)
- return "";
-
- var len = url.length;
-
- return url.replace(_problemUrlChars, function (match, offset) {
- if (match == "~D") // escape for dollar
- return "%24";
- if (match == ":") {
- if (offset == len - 1 || /[0-9\/]/.test(url.charAt(offset + 1)))
- return ":"
- }
- return "%" + match.charCodeAt(0).toString(16);
- });
- }
-
-
- function escapeCharacters(text, charsToEscape, afterBackslash) {
- // First we have to escape the escape characters so that
- // we can build a character class out of them
- var regexString = "([" + charsToEscape.replace(/([\[\]\\])/g, "\\$1") + "])";
-
- if (afterBackslash) {
- regexString = "\\\\" + regexString;
- }
-
- var regex = new RegExp(regexString, "g");
- text = text.replace(regex, escapeCharacters_callback);
-
- return text;
- }
-
-
- function escapeCharacters_callback(wholeMatch, m1) {
- var charCodeToEscape = m1.charCodeAt(0);
- return "~E" + charCodeToEscape + "E";
- }
-
- }; // end of the Markdown.Converter constructor
-
-})();
diff --git a/collectedstatic/pagedown/Markdown.Editor.js b/collectedstatic/pagedown/Markdown.Editor.js
deleted file mode 100644
index 8ea33c3..0000000
--- a/collectedstatic/pagedown/Markdown.Editor.js
+++ /dev/null
@@ -1,2230 +0,0 @@
-// needs Markdown.Converter.js at the moment
-
-(function () {
-
- var util = {},
- position = {},
- ui = {},
- doc = window.document,
- re = window.RegExp,
- nav = window.navigator,
- SETTINGS = { lineLength: 72 },
-
- // Used to work around some browser bugs where we can't use feature testing.
- uaSniffed = {
- isIE: /msie/.test(nav.userAgent.toLowerCase()),
- isIE_5or6: /msie 6/.test(nav.userAgent.toLowerCase()) || /msie 5/.test(nav.userAgent.toLowerCase()),
- isOpera: /opera/.test(nav.userAgent.toLowerCase())
- };
-
- var defaultsStrings = {
- bold: "Strong Ctrl+B",
- boldexample: "strong text",
-
- italic: "Emphasis Ctrl+I",
- italicexample: "emphasized text",
-
- link: "Hyperlink Ctrl+L",
- linkdescription: "enter link description here",
- linkdialog: "Insert Hyperlink
http://example.com/ \"optional title\"
",
-
- quote: "Blockquote Ctrl+Q",
- quoteexample: "Blockquote",
-
- code: "Code Sample Ctrl+K",
- codeexample: "enter code here",
-
- image: "Image Ctrl+G",
- imagedescription: "enter image description here",
- imagedialog: "Insert Image
http://example.com/images/diagram.jpg \"optional title\" Need free image hosting?
",
-
- olist: "Numbered List Ctrl+O",
- ulist: "Bulleted List Ctrl+U",
- litem: "List item",
-
- heading: "Heading / Ctrl+H",
- headingexample: "Heading",
-
- hr: "Horizontal Rule Ctrl+R",
-
- undo: "Undo - Ctrl+Z",
- redo: "Redo - Ctrl+Y",
- redomac: "Redo - Ctrl+Shift+Z",
-
- help: "Markdown Editing Help"
- };
-
-
- // -------------------------------------------------------------------
- // YOUR CHANGES GO HERE
- //
- // I've tried to localize the things you are likely to change to
- // this area.
- // -------------------------------------------------------------------
-
- // The default text that appears in the dialog input box when entering
- // links.
- var imageDefaultText = "http://";
- var linkDefaultText = "http://";
-
- // -------------------------------------------------------------------
- // END OF YOUR CHANGES
- // -------------------------------------------------------------------
-
- // options, if given, can have the following properties:
- // options.helpButton = { handler: yourEventHandler }
- // options.strings = { italicexample: "slanted text" }
- // `yourEventHandler` is the click handler for the help button.
- // If `options.helpButton` isn't given, not help button is created.
- // `options.strings` can have any or all of the same properties as
- // `defaultStrings` above, so you can just override some string displayed
- // to the user on a case-by-case basis, or translate all strings to
- // a different language.
- //
- // For backwards compatibility reasons, the `options` argument can also
- // be just the `helpButton` object, and `strings.help` can also be set via
- // `helpButton.title`. This should be considered legacy.
- //
- // The constructed editor object has the methods:
- // - getConverter() returns the markdown converter object that was passed to the constructor
- // - run() actually starts the editor; should be called after all necessary plugins are registered. Calling this more than once is a no-op.
- // - refreshPreview() forces the preview to be updated. This method is only available after run() was called.
- Markdown.Editor = function (markdownConverter, idPostfix, options) {
-
- options = options || {};
-
- if (typeof options.handler === "function") { //backwards compatible behavior
- options = { helpButton: options };
- }
- options.strings = options.strings || {};
- if (options.helpButton) {
- options.strings.help = options.strings.help || options.helpButton.title;
- }
- var getString = function (identifier) { return options.strings[identifier] || defaultsStrings[identifier]; }
-
- idPostfix = idPostfix || "";
-
- // 'selectors' is a literal mapping the pagedown elements to class/id names:
- // {
- // 'button' : 'wmd-button-bar',
- // 'preview' : 'wmd-preview',
- // 'input' : 'wmd-input',
- // }
- idButton = "wmd-button-bar";
- idPreview = "wmd-preview";
- idInput = "wmd-input";
- if(options){
- if(options.hasOwnProperty('button'))
- idButton = options['button'];
- if(options.hasOwnProperty('preview'))
- idPreview = options['preview'];
- if(options.hasOwnProperty('input'))
- idInput = options['input'];
- }
-
- var hooks = this.hooks = new Markdown.HookCollection();
- hooks.addNoop("onPreviewRefresh"); // called with no arguments after the preview has been refreshed
- hooks.addNoop("postBlockquoteCreation"); // called with the user's selection *after* the blockquote was created; should return the actual to-be-inserted text
- hooks.addFalse("insertImageDialog"); /* called with one parameter: a callback to be called with the URL of the image. If the application creates
- * its own image insertion dialog, this hook should return true, and the callback should be called with the chosen
- * image url (or null if the user cancelled). If this hook returns false, the default dialog will be used.
- */
-
- this.getConverter = function () { return markdownConverter; }
-
- var that = this,
- panels;
-
- this.run = function () {
- if (panels)
- return; // already initialized
-
- panels = new PanelCollection(idButton, idPreview, idInput, idPostfix);
- var commandManager = new CommandManager(hooks, getString);
- var previewManager = new PreviewManager(markdownConverter, panels, function () { hooks.onPreviewRefresh(); });
- var undoManager, uiManager;
-
- if (!/\?noundo/.test(doc.location.href)) {
- undoManager = new UndoManager(function () {
- previewManager.refresh();
- if (uiManager) // not available on the first call
- uiManager.setUndoRedoButtonStates();
- }, panels);
- this.textOperation = function (f) {
- undoManager.setCommandMode();
- f();
- that.refreshPreview();
- }
- }
-
- uiManager = new UIManager(idPostfix, panels, undoManager, previewManager, commandManager, options.helpButton, getString);
- uiManager.setUndoRedoButtonStates();
-
- var forceRefresh = that.refreshPreview = function () { previewManager.refresh(true); };
-
- forceRefresh();
- };
-
- }
-
- // before: contains all the text in the input box BEFORE the selection.
- // after: contains all the text in the input box AFTER the selection.
- function Chunks() { }
-
- // startRegex: a regular expression to find the start tag
- // endRegex: a regular expresssion to find the end tag
- Chunks.prototype.findTags = function (startRegex, endRegex) {
-
- var chunkObj = this;
- var regex;
-
- if (startRegex) {
-
- regex = util.extendRegExp(startRegex, "", "$");
-
- this.before = this.before.replace(regex,
- function (match) {
- chunkObj.startTag = chunkObj.startTag + match;
- return "";
- });
-
- regex = util.extendRegExp(startRegex, "^", "");
-
- this.selection = this.selection.replace(regex,
- function (match) {
- chunkObj.startTag = chunkObj.startTag + match;
- return "";
- });
- }
-
- if (endRegex) {
-
- regex = util.extendRegExp(endRegex, "", "$");
-
- this.selection = this.selection.replace(regex,
- function (match) {
- chunkObj.endTag = match + chunkObj.endTag;
- return "";
- });
-
- regex = util.extendRegExp(endRegex, "^", "");
-
- this.after = this.after.replace(regex,
- function (match) {
- chunkObj.endTag = match + chunkObj.endTag;
- return "";
- });
- }
- };
-
- // If remove is false, the whitespace is transferred
- // to the before/after regions.
- //
- // If remove is true, the whitespace disappears.
- Chunks.prototype.trimWhitespace = function (remove) {
- var beforeReplacer, afterReplacer, that = this;
- if (remove) {
- beforeReplacer = afterReplacer = "";
- } else {
- beforeReplacer = function (s) { that.before += s; return ""; }
- afterReplacer = function (s) { that.after = s + that.after; return ""; }
- }
-
- this.selection = this.selection.replace(/^(\s*)/, beforeReplacer).replace(/(\s*)$/, afterReplacer);
- };
-
-
- Chunks.prototype.skipLines = function (nLinesBefore, nLinesAfter, findExtraNewlines) {
-
- if (nLinesBefore === undefined) {
- nLinesBefore = 1;
- }
-
- if (nLinesAfter === undefined) {
- nLinesAfter = 1;
- }
-
- nLinesBefore++;
- nLinesAfter++;
-
- var regexText;
- var replacementText;
-
- // chrome bug ... documented at: http://meta.stackoverflow.com/questions/63307/blockquote-glitch-in-editor-in-chrome-6-and-7/65985#65985
- if (navigator.userAgent.match(/Chrome/)) {
- "X".match(/()./);
- }
-
- this.selection = this.selection.replace(/(^\n*)/, "");
-
- this.startTag = this.startTag + re.$1;
-
- this.selection = this.selection.replace(/(\n*$)/, "");
- this.endTag = this.endTag + re.$1;
- this.startTag = this.startTag.replace(/(^\n*)/, "");
- this.before = this.before + re.$1;
- this.endTag = this.endTag.replace(/(\n*$)/, "");
- this.after = this.after + re.$1;
-
- if (this.before) {
-
- regexText = replacementText = "";
-
- while (nLinesBefore--) {
- regexText += "\\n?";
- replacementText += "\n";
- }
-
- if (findExtraNewlines) {
- regexText = "\\n*";
- }
- this.before = this.before.replace(new re(regexText + "$", ""), replacementText);
- }
-
- if (this.after) {
-
- regexText = replacementText = "";
-
- while (nLinesAfter--) {
- regexText += "\\n?";
- replacementText += "\n";
- }
- if (findExtraNewlines) {
- regexText = "\\n*";
- }
-
- this.after = this.after.replace(new re(regexText, ""), replacementText);
- }
- };
-
- // end of Chunks
-
- // A collection of the important regions on the page.
- // Cached so we don't have to keep traversing the DOM.
- // Also holds ieCachedRange and ieCachedScrollTop, where necessary; working around
- // this issue:
- // Internet explorer has problems with CSS sprite buttons that use HTML
- // lists. When you click on the background image "button", IE will
- // select the non-existent link text and discard the selection in the
- // textarea. The solution to this is to cache the textarea selection
- // on the button's mousedown event and set a flag. In the part of the
- // code where we need to grab the selection, we check for the flag
- // and, if it's set, use the cached area instead of querying the
- // textarea.
- //
- // This ONLY affects Internet Explorer (tested on versions 6, 7
- // and 8) and ONLY on button clicks. Keyboard shortcuts work
- // normally since the focus never leaves the textarea.
- function PanelCollection(idButton, idPreview, idInput, postfix) {
- this.buttonBar = doc.getElementById(idButton + postfix);
- this.preview = doc.getElementById(idPreview + postfix);
- this.input = doc.getElementById(idInput + postfix);
- }
-
- // Returns true if the DOM element is visible, false if it's hidden.
- // Checks if display is anything other than none.
- util.isVisible = function (elem) {
-
- if (window.getComputedStyle) {
- // Most browsers
- return window.getComputedStyle(elem, null).getPropertyValue("display") !== "none";
- }
- else if (elem.currentStyle) {
- // IE
- return elem.currentStyle["display"] !== "none";
- }
- };
-
-
- // Adds a listener callback to a DOM element which is fired on a specified
- // event.
- util.addEvent = function (elem, event, listener) {
- if (elem.attachEvent) {
- // IE only. The "on" is mandatory.
- elem.attachEvent("on" + event, listener);
- }
- else {
- // Other browsers.
- elem.addEventListener(event, listener, false);
- }
- };
-
-
- // Removes a listener callback from a DOM element which is fired on a specified
- // event.
- util.removeEvent = function (elem, event, listener) {
- if (elem.detachEvent) {
- // IE only. The "on" is mandatory.
- elem.detachEvent("on" + event, listener);
- }
- else {
- // Other browsers.
- elem.removeEventListener(event, listener, false);
- }
- };
-
- // Converts \r\n and \r to \n.
- util.fixEolChars = function (text) {
- text = text.replace(/\r\n/g, "\n");
- text = text.replace(/\r/g, "\n");
- return text;
- };
-
- // Extends a regular expression. Returns a new RegExp
- // using pre + regex + post as the expression.
- // Used in a few functions where we have a base
- // expression and we want to pre- or append some
- // conditions to it (e.g. adding "$" to the end).
- // The flags are unchanged.
- //
- // regex is a RegExp, pre and post are strings.
- util.extendRegExp = function (regex, pre, post) {
-
- if (pre === null || pre === undefined) {
- pre = "";
- }
- if (post === null || post === undefined) {
- post = "";
- }
-
- var pattern = regex.toString();
- var flags;
-
- // Replace the flags with empty space and store them.
- pattern = pattern.replace(/\/([gim]*)$/, function (wholeMatch, flagsPart) {
- flags = flagsPart;
- return "";
- });
-
- // Remove the slash delimiters on the regular expression.
- pattern = pattern.replace(/(^\/|\/$)/g, "");
- pattern = pre + pattern + post;
-
- return new re(pattern, flags);
- }
-
- // UNFINISHED
- // The assignment in the while loop makes jslint cranky.
- // I'll change it to a better loop later.
- position.getTop = function (elem, isInner) {
- var result = elem.offsetTop;
- if (!isInner) {
- while (elem = elem.offsetParent) {
- result += elem.offsetTop;
- }
- }
- return result;
- };
-
- position.getHeight = function (elem) {
- return elem.offsetHeight || elem.scrollHeight;
- };
-
- position.getWidth = function (elem) {
- return elem.offsetWidth || elem.scrollWidth;
- };
-
- position.getPageSize = function () {
-
- var scrollWidth, scrollHeight;
- var innerWidth, innerHeight;
-
- // It's not very clear which blocks work with which browsers.
- if (self.innerHeight && self.scrollMaxY) {
- scrollWidth = doc.body.scrollWidth;
- scrollHeight = self.innerHeight + self.scrollMaxY;
- }
- else if (doc.body.scrollHeight > doc.body.offsetHeight) {
- scrollWidth = doc.body.scrollWidth;
- scrollHeight = doc.body.scrollHeight;
- }
- else {
- scrollWidth = doc.body.offsetWidth;
- scrollHeight = doc.body.offsetHeight;
- }
-
- if (self.innerHeight) {
- // Non-IE browser
- innerWidth = self.innerWidth;
- innerHeight = self.innerHeight;
- }
- else if (doc.documentElement && doc.documentElement.clientHeight) {
- // Some versions of IE (IE 6 w/ a DOCTYPE declaration)
- innerWidth = doc.documentElement.clientWidth;
- innerHeight = doc.documentElement.clientHeight;
- }
- else if (doc.body) {
- // Other versions of IE
- innerWidth = doc.body.clientWidth;
- innerHeight = doc.body.clientHeight;
- }
-
- var maxWidth = Math.max(scrollWidth, innerWidth);
- var maxHeight = Math.max(scrollHeight, innerHeight);
- return [maxWidth, maxHeight, innerWidth, innerHeight];
- };
-
- // Handles pushing and popping TextareaStates for undo/redo commands.
- // I should rename the stack variables to list.
- function UndoManager(callback, panels) {
-
- var undoObj = this;
- var undoStack = []; // A stack of undo states
- var stackPtr = 0; // The index of the current state
- var mode = "none";
- var lastState; // The last state
- var timer; // The setTimeout handle for cancelling the timer
- var inputStateObj;
-
- // Set the mode for later logic steps.
- var setMode = function (newMode, noSave) {
- if (mode != newMode) {
- mode = newMode;
- if (!noSave) {
- saveState();
- }
- }
-
- if (!uaSniffed.isIE || mode != "moving") {
- timer = setTimeout(refreshState, 1);
- }
- else {
- inputStateObj = null;
- }
- };
-
- var refreshState = function (isInitialState) {
- inputStateObj = new TextareaState(panels, isInitialState);
- timer = undefined;
- };
-
- this.setCommandMode = function () {
- mode = "command";
- saveState();
- timer = setTimeout(refreshState, 0);
- };
-
- this.canUndo = function () {
- return stackPtr > 1;
- };
-
- this.canRedo = function () {
- if (undoStack[stackPtr + 1]) {
- return true;
- }
- return false;
- };
-
- // Removes the last state and restores it.
- this.undo = function () {
-
- if (undoObj.canUndo()) {
- if (lastState) {
- // What about setting state -1 to null or checking for undefined?
- lastState.restore();
- lastState = null;
- }
- else {
- undoStack[stackPtr] = new TextareaState(panels);
- undoStack[--stackPtr].restore();
-
- if (callback) {
- callback();
- }
- }
- }
-
- mode = "none";
- panels.input.focus();
- refreshState();
- };
-
- // Redo an action.
- this.redo = function () {
-
- if (undoObj.canRedo()) {
-
- undoStack[++stackPtr].restore();
-
- if (callback) {
- callback();
- }
- }
-
- mode = "none";
- panels.input.focus();
- refreshState();
- };
-
- // Push the input area state to the stack.
- var saveState = function () {
- var currState = inputStateObj || new TextareaState(panels);
-
- if (!currState) {
- return false;
- }
- if (mode == "moving") {
- if (!lastState) {
- lastState = currState;
- }
- return;
- }
- if (lastState) {
- if (undoStack[stackPtr - 1].text != lastState.text) {
- undoStack[stackPtr++] = lastState;
- }
- lastState = null;
- }
- undoStack[stackPtr++] = currState;
- undoStack[stackPtr + 1] = null;
- if (callback) {
- callback();
- }
- };
-
- var handleCtrlYZ = function (event) {
-
- var handled = false;
-
- if (event.ctrlKey || event.metaKey) {
-
- // IE and Opera do not support charCode.
- var keyCode = event.charCode || event.keyCode;
- var keyCodeChar = String.fromCharCode(keyCode);
-
- switch (keyCodeChar.toLowerCase()) {
-
- case "y":
- undoObj.redo();
- handled = true;
- break;
-
- case "z":
- if (!event.shiftKey) {
- undoObj.undo();
- }
- else {
- undoObj.redo();
- }
- handled = true;
- break;
- }
- }
-
- if (handled) {
- if (event.preventDefault) {
- event.preventDefault();
- }
- if (window.event) {
- window.event.returnValue = false;
- }
- return;
- }
- };
-
- // Set the mode depending on what is going on in the input area.
- var handleModeChange = function (event) {
-
- if (!event.ctrlKey && !event.metaKey) {
-
- var keyCode = event.keyCode;
-
- if ((keyCode >= 33 && keyCode <= 40) || (keyCode >= 63232 && keyCode <= 63235)) {
- // 33 - 40: page up/dn and arrow keys
- // 63232 - 63235: page up/dn and arrow keys on safari
- setMode("moving");
- }
- else if (keyCode == 8 || keyCode == 46 || keyCode == 127) {
- // 8: backspace
- // 46: delete
- // 127: delete
- setMode("deleting");
- }
- else if (keyCode == 13) {
- // 13: Enter
- setMode("newlines");
- }
- else if (keyCode == 27) {
- // 27: escape
- setMode("escape");
- }
- else if ((keyCode < 16 || keyCode > 20) && keyCode != 91) {
- // 16-20 are shift, etc.
- // 91: left window key
- // I think this might be a little messed up since there are
- // a lot of nonprinting keys above 20.
- setMode("typing");
- }
- }
- };
-
- var setEventHandlers = function () {
- util.addEvent(panels.input, "keypress", function (event) {
- // keyCode 89: y
- // keyCode 90: z
- if ((event.ctrlKey || event.metaKey) && (event.keyCode == 89 || event.keyCode == 90)) {
- event.preventDefault();
- }
- });
-
- var handlePaste = function () {
- if (uaSniffed.isIE || (inputStateObj && inputStateObj.text != panels.input.value)) {
- if (timer == undefined) {
- mode = "paste";
- saveState();
- refreshState();
- }
- }
- };
-
- util.addEvent(panels.input, "keydown", handleCtrlYZ);
- util.addEvent(panels.input, "keydown", handleModeChange);
- util.addEvent(panels.input, "mousedown", function () {
- setMode("moving");
- });
-
- panels.input.onpaste = handlePaste;
- panels.input.ondrop = handlePaste;
- };
-
- var init = function () {
- setEventHandlers();
- refreshState(true);
- saveState();
- };
-
- init();
- }
-
- // end of UndoManager
-
- // The input textarea state/contents.
- // This is used to implement undo/redo by the undo manager.
- function TextareaState(panels, isInitialState) {
-
- // Aliases
- var stateObj = this;
- var inputArea = panels.input;
- this.init = function () {
- if (!util.isVisible(inputArea)) {
- return;
- }
- if (!isInitialState && doc.activeElement && doc.activeElement !== inputArea) { // this happens when tabbing out of the input box
- return;
- }
-
- this.setInputAreaSelectionStartEnd();
- this.scrollTop = inputArea.scrollTop;
- if (!this.text && inputArea.selectionStart || inputArea.selectionStart === 0) {
- this.text = inputArea.value;
- }
-
- }
-
- // Sets the selected text in the input box after we've performed an
- // operation.
- this.setInputAreaSelection = function () {
-
- if (!util.isVisible(inputArea)) {
- return;
- }
-
- if (inputArea.selectionStart !== undefined && !uaSniffed.isOpera) {
-
- inputArea.focus();
- inputArea.selectionStart = stateObj.start;
- inputArea.selectionEnd = stateObj.end;
- inputArea.scrollTop = stateObj.scrollTop;
- }
- else if (doc.selection) {
-
- if (doc.activeElement && doc.activeElement !== inputArea) {
- return;
- }
-
- inputArea.focus();
- var range = inputArea.createTextRange();
- range.moveStart("character", -inputArea.value.length);
- range.moveEnd("character", -inputArea.value.length);
- range.moveEnd("character", stateObj.end);
- range.moveStart("character", stateObj.start);
- range.select();
- }
- };
-
- this.setInputAreaSelectionStartEnd = function () {
-
- if (!panels.ieCachedRange && (inputArea.selectionStart || inputArea.selectionStart === 0)) {
-
- stateObj.start = inputArea.selectionStart;
- stateObj.end = inputArea.selectionEnd;
- }
- else if (doc.selection) {
-
- stateObj.text = util.fixEolChars(inputArea.value);
-
- // IE loses the selection in the textarea when buttons are
- // clicked. On IE we cache the selection. Here, if something is cached,
- // we take it.
- var range = panels.ieCachedRange || doc.selection.createRange();
-
- var fixedRange = util.fixEolChars(range.text);
- var marker = "\x07";
- var markedRange = marker + fixedRange + marker;
- range.text = markedRange;
- var inputText = util.fixEolChars(inputArea.value);
-
- range.moveStart("character", -markedRange.length);
- range.text = fixedRange;
-
- stateObj.start = inputText.indexOf(marker);
- stateObj.end = inputText.lastIndexOf(marker) - marker.length;
-
- var len = stateObj.text.length - util.fixEolChars(inputArea.value).length;
-
- if (len) {
- range.moveStart("character", -fixedRange.length);
- while (len--) {
- fixedRange += "\n";
- stateObj.end += 1;
- }
- range.text = fixedRange;
- }
-
- if (panels.ieCachedRange)
- stateObj.scrollTop = panels.ieCachedScrollTop; // this is set alongside with ieCachedRange
-
- panels.ieCachedRange = null;
-
- this.setInputAreaSelection();
- }
- };
-
- // Restore this state into the input area.
- this.restore = function () {
-
- if (stateObj.text != undefined && stateObj.text != inputArea.value) {
- inputArea.value = stateObj.text;
- }
- this.setInputAreaSelection();
- inputArea.scrollTop = stateObj.scrollTop;
- };
-
- // Gets a collection of HTML chunks from the inptut textarea.
- this.getChunks = function () {
-
- var chunk = new Chunks();
- chunk.before = util.fixEolChars(stateObj.text.substring(0, stateObj.start));
- chunk.startTag = "";
- chunk.selection = util.fixEolChars(stateObj.text.substring(stateObj.start, stateObj.end));
- chunk.endTag = "";
- chunk.after = util.fixEolChars(stateObj.text.substring(stateObj.end));
- chunk.scrollTop = stateObj.scrollTop;
-
- return chunk;
- };
-
- // Sets the TextareaState properties given a chunk of markdown.
- this.setChunks = function (chunk) {
-
- chunk.before = chunk.before + chunk.startTag;
- chunk.after = chunk.endTag + chunk.after;
-
- this.start = chunk.before.length;
- this.end = chunk.before.length + chunk.selection.length;
- this.text = chunk.before + chunk.selection + chunk.after;
- this.scrollTop = chunk.scrollTop;
- };
- this.init();
- };
-
- function PreviewManager(converter, panels, previewRefreshCallback) {
-
- var managerObj = this;
- var timeout;
- var elapsedTime;
- var oldInputText;
- var maxDelay = 3000;
- var startType = "delayed"; // The other legal value is "manual"
-
- // Adds event listeners to elements
- var setupEvents = function (inputElem, listener) {
-
- util.addEvent(inputElem, "input", listener);
- inputElem.onpaste = listener;
- inputElem.ondrop = listener;
-
- util.addEvent(inputElem, "keypress", listener);
- util.addEvent(inputElem, "keydown", listener);
- };
-
- var getDocScrollTop = function () {
-
- var result = 0;
-
- if (window.innerHeight) {
- result = window.pageYOffset;
- }
- else
- if (doc.documentElement && doc.documentElement.scrollTop) {
- result = doc.documentElement.scrollTop;
- }
- else
- if (doc.body) {
- result = doc.body.scrollTop;
- }
-
- return result;
- };
-
- var makePreviewHtml = function () {
-
- // If there is no registered preview panel
- // there is nothing to do.
- if (!panels.preview)
- return;
-
-
- var text = panels.input.value;
- if (text && text == oldInputText) {
- return; // Input text hasn't changed.
- }
- else {
- oldInputText = text;
- }
-
- var prevTime = new Date().getTime();
-
- text = converter.makeHtml(text);
-
- // Calculate the processing time of the HTML creation.
- // It's used as the delay time in the event listener.
- var currTime = new Date().getTime();
- elapsedTime = currTime - prevTime;
-
- pushPreviewHtml(text);
- };
-
- // setTimeout is already used. Used as an event listener.
- var applyTimeout = function () {
-
- if (timeout) {
- clearTimeout(timeout);
- timeout = undefined;
- }
-
- if (startType !== "manual") {
-
- var delay = 0;
-
- if (startType === "delayed") {
- delay = elapsedTime;
- }
-
- if (delay > maxDelay) {
- delay = maxDelay;
- }
- timeout = setTimeout(makePreviewHtml, delay);
- }
- };
-
- var getScaleFactor = function (panel) {
- if (panel.scrollHeight <= panel.clientHeight) {
- return 1;
- }
- return panel.scrollTop / (panel.scrollHeight - panel.clientHeight);
- };
-
- var setPanelScrollTops = function () {
- if (panels.preview) {
- panels.preview.scrollTop = (panels.preview.scrollHeight - panels.preview.clientHeight) * getScaleFactor(panels.preview);
- }
- };
-
- this.refresh = function (requiresRefresh) {
-
- if (requiresRefresh) {
- oldInputText = "";
- makePreviewHtml();
- }
- else {
- applyTimeout();
- }
- };
-
- this.processingTime = function () {
- return elapsedTime;
- };
-
- var isFirstTimeFilled = true;
-
- // IE doesn't let you use innerHTML if the element is contained somewhere in a table
- // (which is the case for inline editing) -- in that case, detach the element, set the
- // value, and reattach. Yes, that *is* ridiculous.
- var ieSafePreviewSet = function (text) {
- var preview = panels.preview;
- var parent = preview.parentNode;
- var sibling = preview.nextSibling;
- parent.removeChild(preview);
- preview.innerHTML = text;
- if (!sibling)
- parent.appendChild(preview);
- else
- parent.insertBefore(preview, sibling);
- }
-
- var nonSuckyBrowserPreviewSet = function (text) {
- panels.preview.innerHTML = text;
- }
-
- var previewSetter;
-
- var previewSet = function (text) {
- if (previewSetter)
- return previewSetter(text);
-
- try {
- nonSuckyBrowserPreviewSet(text);
- previewSetter = nonSuckyBrowserPreviewSet;
- } catch (e) {
- previewSetter = ieSafePreviewSet;
- previewSetter(text);
- }
- };
-
- var pushPreviewHtml = function (text) {
-
- var emptyTop = position.getTop(panels.input) - getDocScrollTop();
-
- if (panels.preview) {
- previewSet(text);
- previewRefreshCallback();
- }
-
- setPanelScrollTops();
-
- if (isFirstTimeFilled) {
- isFirstTimeFilled = false;
- return;
- }
-
- var fullTop = position.getTop(panels.input) - getDocScrollTop();
-
- if (uaSniffed.isIE) {
- setTimeout(function () {
- window.scrollBy(0, fullTop - emptyTop);
- }, 0);
- }
- else {
- window.scrollBy(0, fullTop - emptyTop);
- }
- };
-
- var init = function () {
-
- setupEvents(panels.input, applyTimeout);
- makePreviewHtml();
-
- if (panels.preview) {
- panels.preview.scrollTop = 0;
- }
- };
-
- init();
- };
-
- // Creates the background behind the hyperlink text entry box.
- // And download dialog
- // Most of this has been moved to CSS but the div creation and
- // browser-specific hacks remain here.
- ui.createBackground = function () {
-
- var background = doc.createElement("div"),
- style = background.style;
-
- background.className = "wmd-prompt-background";
-
- style.position = "absolute";
- style.top = "0";
-
- style.zIndex = "1000";
-
- if (uaSniffed.isIE) {
- style.filter = "alpha(opacity=50)";
- }
- else {
- style.opacity = "0.5";
- }
-
- var pageSize = position.getPageSize();
- style.height = pageSize[1] + "px";
-
- if (uaSniffed.isIE) {
- style.left = doc.documentElement.scrollLeft;
- style.width = doc.documentElement.clientWidth;
- }
- else {
- style.left = "0";
- style.width = "100%";
- }
-
- doc.body.appendChild(background);
- return background;
- };
-
- // This simulates a modal dialog box and asks for the URL when you
- // click the hyperlink or image buttons.
- //
- // text: The html for the input box.
- // defaultInputText: The default value that appears in the input box.
- // callback: The function which is executed when the prompt is dismissed, either via OK or Cancel.
- // It receives a single argument; either the entered text (if OK was chosen) or null (if Cancel
- // was chosen).
- ui.prompt = function (text, defaultInputText, callback) {
-
- // These variables need to be declared at this level since they are used
- // in multiple functions.
- var dialog; // The dialog box.
- var input; // The text box where you enter the hyperlink.
-
-
- if (defaultInputText === undefined) {
- defaultInputText = "";
- }
-
- // Used as a keydown event handler. Esc dismisses the prompt.
- // Key code 27 is ESC.
- var checkEscape = function (key) {
- var code = (key.charCode || key.keyCode);
- if (code === 27) {
- close(true);
- }
- };
-
- // Dismisses the hyperlink input box.
- // isCancel is true if we don't care about the input text.
- // isCancel is false if we are going to keep the text.
- var close = function (isCancel) {
- util.removeEvent(doc.body, "keydown", checkEscape);
- var text = input.value;
-
- if (isCancel) {
- text = null;
- }
- else {
- // Fixes common pasting errors.
- text = text.replace(/^http:\/\/(https?|ftp):\/\//, '$1://');
- if (!/^(?:https?|ftp):\/\//.test(text))
- text = 'http://' + text;
- }
-
- dialog.parentNode.removeChild(dialog);
-
- callback(text);
- return false;
- };
-
-
-
- // Create the text input box form/window.
- var createDialog = function () {
-
- // The main dialog box.
- dialog = doc.createElement("div");
- dialog.className = "wmd-prompt-dialog";
- dialog.style.padding = "10px;";
- dialog.style.position = "fixed";
- dialog.style.width = "400px";
- dialog.style.zIndex = "1001";
-
- // The dialog text.
- var question = doc.createElement("div");
- question.innerHTML = text;
- question.style.padding = "5px";
- dialog.appendChild(question);
-
- // The web form container for the text box and buttons.
- var form = doc.createElement("form"),
- style = form.style;
- form.onsubmit = function () { return close(false); };
- style.padding = "0";
- style.margin = "0";
- style.cssFloat = "left";
- style.width = "100%";
- style.textAlign = "center";
- style.position = "relative";
- dialog.appendChild(form);
-
- // The input text box
- input = doc.createElement("input");
- input.type = "text";
- input.value = defaultInputText;
- style = input.style;
- style.display = "block";
- style.width = "80%";
- style.marginLeft = style.marginRight = "auto";
- form.appendChild(input);
-
- // The ok button
- var okButton = doc.createElement("input");
- okButton.type = "button";
- okButton.onclick = function () { return close(false); };
- okButton.value = "OK";
- style = okButton.style;
- style.margin = "10px";
- style.display = "inline";
- style.width = "7em";
-
-
- // The cancel button
- var cancelButton = doc.createElement("input");
- cancelButton.type = "button";
- cancelButton.onclick = function () { return close(true); };
- cancelButton.value = "Cancel";
- style = cancelButton.style;
- style.margin = "10px";
- style.display = "inline";
- style.width = "7em";
-
- form.appendChild(okButton);
- form.appendChild(cancelButton);
-
- util.addEvent(doc.body, "keydown", checkEscape);
- dialog.style.top = "50%";
- dialog.style.left = "50%";
- dialog.style.display = "block";
- if (uaSniffed.isIE_5or6) {
- dialog.style.position = "absolute";
- dialog.style.top = doc.documentElement.scrollTop + 200 + "px";
- dialog.style.left = "50%";
- }
- doc.body.appendChild(dialog);
-
- // This has to be done AFTER adding the dialog to the form if you
- // want it to be centered.
- dialog.style.marginTop = -(position.getHeight(dialog) / 2) + "px";
- dialog.style.marginLeft = -(position.getWidth(dialog) / 2) + "px";
-
- };
-
- // Why is this in a zero-length timeout?
- // Is it working around a browser bug?
- setTimeout(function () {
-
- createDialog();
-
- var defTextLen = defaultInputText.length;
- if (input.selectionStart !== undefined) {
- input.selectionStart = 0;
- input.selectionEnd = defTextLen;
- }
- else if (input.createTextRange) {
- var range = input.createTextRange();
- range.collapse(false);
- range.moveStart("character", -defTextLen);
- range.moveEnd("character", defTextLen);
- range.select();
- }
-
- input.focus();
- }, 0);
- };
-
- function UIManager(postfix, panels, undoManager, previewManager, commandManager, helpOptions, getString) {
-
- var inputBox = panels.input,
- buttons = {}; // buttons.undo, buttons.link, etc. The actual DOM elements.
-
- makeSpritedButtonRow();
-
- var keyEvent = "keydown";
- if (uaSniffed.isOpera) {
- keyEvent = "keypress";
- }
-
- util.addEvent(inputBox, keyEvent, function (key) {
-
- // Check to see if we have a button key and, if so execute the callback.
- if ((key.ctrlKey || key.metaKey) && !key.altKey && !key.shiftKey) {
-
- var keyCode = key.charCode || key.keyCode;
- var keyCodeStr = String.fromCharCode(keyCode).toLowerCase();
-
- switch (keyCodeStr) {
- case "b":
- doClick(buttons.bold);
- break;
- case "i":
- doClick(buttons.italic);
- break;
- case "l":
- doClick(buttons.link);
- break;
- case "q":
- doClick(buttons.quote);
- break;
- case "k":
- doClick(buttons.code);
- break;
- case "g":
- doClick(buttons.image);
- break;
- case "o":
- doClick(buttons.olist);
- break;
- case "u":
- doClick(buttons.ulist);
- break;
- case "h":
- doClick(buttons.heading);
- break;
- case "r":
- doClick(buttons.hr);
- break;
- case "y":
- doClick(buttons.redo);
- break;
- case "z":
- if (key.shiftKey) {
- doClick(buttons.redo);
- }
- else {
- doClick(buttons.undo);
- }
- break;
- default:
- return;
- }
-
-
- if (key.preventDefault) {
- key.preventDefault();
- }
-
- if (window.event) {
- window.event.returnValue = false;
- }
- }
- });
-
- // Auto-indent on shift-enter
- util.addEvent(inputBox, "keyup", function (key) {
- if (key.shiftKey && !key.ctrlKey && !key.metaKey) {
- var keyCode = key.charCode || key.keyCode;
- // Character 13 is Enter
- if (keyCode === 13) {
- var fakeButton = {};
- fakeButton.textOp = bindCommand("doAutoindent");
- doClick(fakeButton);
- }
- }
- });
-
- // special handler because IE clears the context of the textbox on ESC
- if (uaSniffed.isIE) {
- util.addEvent(inputBox, "keydown", function (key) {
- var code = key.keyCode;
- if (code === 27) {
- return false;
- }
- });
- }
-
-
- // Perform the button's action.
- function doClick(button) {
-
- inputBox.focus();
-
- if (button.textOp) {
-
- if (undoManager) {
- undoManager.setCommandMode();
- }
-
- var state = new TextareaState(panels);
-
- if (!state) {
- return;
- }
-
- var chunks = state.getChunks();
-
- // Some commands launch a "modal" prompt dialog. Javascript
- // can't really make a modal dialog box and the WMD code
- // will continue to execute while the dialog is displayed.
- // This prevents the dialog pattern I'm used to and means
- // I can't do something like this:
- //
- // var link = CreateLinkDialog();
- // makeMarkdownLink(link);
- //
- // Instead of this straightforward method of handling a
- // dialog I have to pass any code which would execute
- // after the dialog is dismissed (e.g. link creation)
- // in a function parameter.
- //
- // Yes this is awkward and I think it sucks, but there's
- // no real workaround. Only the image and link code
- // create dialogs and require the function pointers.
- var fixupInputArea = function () {
-
- inputBox.focus();
-
- if (chunks) {
- state.setChunks(chunks);
- }
-
- state.restore();
- previewManager.refresh();
- };
-
- var noCleanup = button.textOp(chunks, fixupInputArea);
-
- if (!noCleanup) {
- fixupInputArea();
- }
-
- }
-
- if (button.execute) {
- button.execute(undoManager);
- }
- };
-
- function setupButton(button, isEnabled) {
-
- var normalYShift = "0px";
- var disabledYShift = "-20px";
- var highlightYShift = "-40px";
- var image = button.getElementsByTagName("span")[0];
- if (isEnabled) {
- image.style.backgroundPosition = button.XShift + " " + normalYShift;
- button.onmouseover = function () {
- image.style.backgroundPosition = this.XShift + " " + highlightYShift;
- };
-
- button.onmouseout = function () {
- image.style.backgroundPosition = this.XShift + " " + normalYShift;
- };
-
- // IE tries to select the background image "button" text (it's
- // implemented in a list item) so we have to cache the selection
- // on mousedown.
- if (uaSniffed.isIE) {
- button.onmousedown = function () {
- if (doc.activeElement && doc.activeElement !== panels.input) { // we're not even in the input box, so there's no selection
- return;
- }
- panels.ieCachedRange = document.selection.createRange();
- panels.ieCachedScrollTop = panels.input.scrollTop;
- };
- }
-
- if (!button.isHelp) {
- button.onclick = function () {
- if (this.onmouseout) {
- this.onmouseout();
- }
- doClick(this);
- return false;
- }
- }
- }
- else {
- image.style.backgroundPosition = button.XShift + " " + disabledYShift;
- button.onmouseover = button.onmouseout = button.onclick = function () { };
- }
- }
-
- function bindCommand(method) {
- if (typeof method === "string")
- method = commandManager[method];
- return function () { method.apply(commandManager, arguments); }
- }
-
- function makeSpritedButtonRow() {
-
- var buttonBar = panels.buttonBar;
-
- var normalYShift = "0px";
- var disabledYShift = "-20px";
- var highlightYShift = "-40px";
-
- var buttonRow = document.createElement("ul");
- buttonRow.id = "wmd-button-row" + postfix;
- buttonRow.className = 'wmd-button-row';
- buttonRow = buttonBar.appendChild(buttonRow);
- var xPosition = 0;
- var makeButton = function (id, title, XShift, textOp) {
- var button = document.createElement("li");
- button.className = "wmd-button";
- button.style.left = xPosition + "px";
- xPosition += 25;
- var buttonImage = document.createElement("span");
- button.id = id + postfix;
- button.appendChild(buttonImage);
- button.title = title;
- button.XShift = XShift;
- if (textOp)
- button.textOp = textOp;
- setupButton(button, true);
- buttonRow.appendChild(button);
- return button;
- };
- var makeSpacer = function (num) {
- var spacer = document.createElement("li");
- spacer.className = "wmd-spacer wmd-spacer" + num;
- spacer.id = "wmd-spacer" + num + postfix;
- buttonRow.appendChild(spacer);
- xPosition += 25;
- }
-
- buttons.bold = makeButton("wmd-bold-button", getString("bold"), "0px", bindCommand("doBold"));
- buttons.italic = makeButton("wmd-italic-button", getString("italic"), "-20px", bindCommand("doItalic"));
- makeSpacer(1);
- buttons.link = makeButton("wmd-link-button", getString("link"), "-40px", bindCommand(function (chunk, postProcessing) {
- return this.doLinkOrImage(chunk, postProcessing, false);
- }));
- buttons.quote = makeButton("wmd-quote-button", getString("quote"), "-60px", bindCommand("doBlockquote"));
- buttons.code = makeButton("wmd-code-button", getString("code"), "-80px", bindCommand("doCode"));
- buttons.image = makeButton("wmd-image-button", getString("image"), "-100px", bindCommand(function (chunk, postProcessing) {
- return this.doLinkOrImage(chunk, postProcessing, true);
- }));
- makeSpacer(2);
- buttons.olist = makeButton("wmd-olist-button", getString("olist"), "-120px", bindCommand(function (chunk, postProcessing) {
- this.doList(chunk, postProcessing, true);
- }));
- buttons.ulist = makeButton("wmd-ulist-button", getString("ulist"), "-140px", bindCommand(function (chunk, postProcessing) {
- this.doList(chunk, postProcessing, false);
- }));
- buttons.heading = makeButton("wmd-heading-button", getString("heading"), "-160px", bindCommand("doHeading"));
- buttons.hr = makeButton("wmd-hr-button", getString("hr"), "-180px", bindCommand("doHorizontalRule"));
- makeSpacer(3);
- buttons.undo = makeButton("wmd-undo-button", getString("undo"), "-200px", null);
- buttons.undo.execute = function (manager) { if (manager) manager.undo(); };
-
- var redoTitle = /win/.test(nav.platform.toLowerCase()) ?
- getString("redo") :
- getString("redomac"); // mac and other non-Windows platforms
-
- buttons.redo = makeButton("wmd-redo-button", redoTitle, "-220px", null);
- buttons.redo.execute = function (manager) { if (manager) manager.redo(); };
-
- if (helpOptions) {
- var helpButton = document.createElement("li");
- var helpButtonImage = document.createElement("span");
- helpButton.appendChild(helpButtonImage);
- helpButton.className = "wmd-button wmd-help-button";
- helpButton.id = "wmd-help-button" + postfix;
- helpButton.XShift = "-240px";
- helpButton.isHelp = true;
- helpButton.style.right = "0px";
- helpButton.title = getString("help");
- helpButton.onclick = helpOptions.handler;
-
- setupButton(helpButton, true);
- buttonRow.appendChild(helpButton);
- buttons.help = helpButton;
- }
-
- setUndoRedoButtonStates();
- }
-
- function setUndoRedoButtonStates() {
- if (undoManager) {
- setupButton(buttons.undo, undoManager.canUndo());
- setupButton(buttons.redo, undoManager.canRedo());
- }
- };
-
- this.setUndoRedoButtonStates = setUndoRedoButtonStates;
-
- }
-
- function CommandManager(pluginHooks, getString) {
- this.hooks = pluginHooks;
- this.getString = getString;
- }
-
- var commandProto = CommandManager.prototype;
-
- // The markdown symbols - 4 spaces = code, > = blockquote, etc.
- commandProto.prefixes = "(?:\\s{4,}|\\s*>|\\s*-\\s+|\\s*\\d+\\.|=|\\+|-|_|\\*|#|\\s*\\[[^\n]]+\\]:)";
-
- // Remove markdown symbols from the chunk selection.
- commandProto.unwrap = function (chunk) {
- var txt = new re("([^\\n])\\n(?!(\\n|" + this.prefixes + "))", "g");
- chunk.selection = chunk.selection.replace(txt, "$1 $2");
- };
-
- commandProto.wrap = function (chunk, len) {
- this.unwrap(chunk);
- var regex = new re("(.{1," + len + "})( +|$\\n?)", "gm"),
- that = this;
-
- chunk.selection = chunk.selection.replace(regex, function (line, marked) {
- if (new re("^" + that.prefixes, "").test(line)) {
- return line;
- }
- return marked + "\n";
- });
-
- chunk.selection = chunk.selection.replace(/\s+$/, "");
- };
-
- commandProto.doBold = function (chunk, postProcessing) {
- return this.doBorI(chunk, postProcessing, 2, this.getString("boldexample"));
- };
-
- commandProto.doItalic = function (chunk, postProcessing) {
- return this.doBorI(chunk, postProcessing, 1, this.getString("italicexample"));
- };
-
- // chunk: The selected region that will be enclosed with */**
- // nStars: 1 for italics, 2 for bold
- // insertText: If you just click the button without highlighting text, this gets inserted
- commandProto.doBorI = function (chunk, postProcessing, nStars, insertText) {
-
- // Get rid of whitespace and fixup newlines.
- chunk.trimWhitespace();
- chunk.selection = chunk.selection.replace(/\n{2,}/g, "\n");
-
- // Look for stars before and after. Is the chunk already marked up?
- // note that these regex matches cannot fail
- var starsBefore = /(\**$)/.exec(chunk.before)[0];
- var starsAfter = /(^\**)/.exec(chunk.after)[0];
-
- var prevStars = Math.min(starsBefore.length, starsAfter.length);
-
- // Remove stars if we have to since the button acts as a toggle.
- if ((prevStars >= nStars) && (prevStars != 2 || nStars != 1)) {
- chunk.before = chunk.before.replace(re("[*]{" + nStars + "}$", ""), "");
- chunk.after = chunk.after.replace(re("^[*]{" + nStars + "}", ""), "");
- }
- else if (!chunk.selection && starsAfter) {
- // It's not really clear why this code is necessary. It just moves
- // some arbitrary stuff around.
- chunk.after = chunk.after.replace(/^([*_]*)/, "");
- chunk.before = chunk.before.replace(/(\s?)$/, "");
- var whitespace = re.$1;
- chunk.before = chunk.before + starsAfter + whitespace;
- }
- else {
-
- // In most cases, if you don't have any selected text and click the button
- // you'll get a selected, marked up region with the default text inserted.
- if (!chunk.selection && !starsAfter) {
- chunk.selection = insertText;
- }
-
- // Add the true markup.
- var markup = nStars <= 1 ? "*" : "**"; // shouldn't the test be = ?
- chunk.before = chunk.before + markup;
- chunk.after = markup + chunk.after;
- }
-
- return;
- };
-
- commandProto.stripLinkDefs = function (text, defsToAdd) {
-
- text = text.replace(/^[ ]{0,3}\[(\d+)\]:[ \t]*\n?[ \t]*(\S+?)>?[ \t]*\n?[ \t]*(?:(\n*)["(](.+?)[")][ \t]*)?(?:\n+|$)/gm,
- function (totalMatch, id, link, newlines, title) {
- defsToAdd[id] = totalMatch.replace(/\s*$/, "");
- if (newlines) {
- // Strip the title and return that separately.
- defsToAdd[id] = totalMatch.replace(/["(](.+?)[")]$/, "");
- return newlines + title;
- }
- return "";
- });
-
- return text;
- };
-
- commandProto.addLinkDef = function (chunk, linkDef) {
-
- var refNumber = 0; // The current reference number
- var defsToAdd = {}; //
- // Start with a clean slate by removing all previous link definitions.
- chunk.before = this.stripLinkDefs(chunk.before, defsToAdd);
- chunk.selection = this.stripLinkDefs(chunk.selection, defsToAdd);
- chunk.after = this.stripLinkDefs(chunk.after, defsToAdd);
-
- var defs = "";
- var regex = /(\[)((?:\[[^\]]*\]|[^\[\]])*)(\][ ]?(?:\n[ ]*)?\[)(\d+)(\])/g;
-
- var addDefNumber = function (def) {
- refNumber++;
- def = def.replace(/^[ ]{0,3}\[(\d+)\]:/, " [" + refNumber + "]:");
- defs += "\n" + def;
- };
-
- // note that
- // a) the recursive call to getLink cannot go infinite, because by definition
- // of regex, inner is always a proper substring of wholeMatch, and
- // b) more than one level of nesting is neither supported by the regex
- // nor making a lot of sense (the only use case for nesting is a linked image)
- var getLink = function (wholeMatch, before, inner, afterInner, id, end) {
- inner = inner.replace(regex, getLink);
- if (defsToAdd[id]) {
- addDefNumber(defsToAdd[id]);
- return before + inner + afterInner + refNumber + end;
- }
- return wholeMatch;
- };
-
- chunk.before = chunk.before.replace(regex, getLink);
-
- if (linkDef) {
- addDefNumber(linkDef);
- }
- else {
- chunk.selection = chunk.selection.replace(regex, getLink);
- }
-
- var refOut = refNumber;
-
- chunk.after = chunk.after.replace(regex, getLink);
-
- if (chunk.after) {
- chunk.after = chunk.after.replace(/\n*$/, "");
- }
- if (!chunk.after) {
- chunk.selection = chunk.selection.replace(/\n*$/, "");
- }
-
- chunk.after += "\n\n" + defs;
-
- return refOut;
- };
-
- // takes the line as entered into the add link/as image dialog and makes
- // sure the URL and the optinal title are "nice".
- function properlyEncoded(linkdef) {
- return linkdef.replace(/^\s*(.*?)(?:\s+"(.+)")?\s*$/, function (wholematch, link, title) {
- link = link.replace(/\?.*$/, function (querypart) {
- return querypart.replace(/\+/g, " "); // in the query string, a plus and a space are identical
- });
- link = decodeURIComponent(link); // unencode first, to prevent double encoding
- link = encodeURI(link).replace(/'/g, '%27').replace(/\(/g, '%28').replace(/\)/g, '%29');
- link = link.replace(/\?.*$/, function (querypart) {
- return querypart.replace(/\+/g, "%2b"); // since we replaced plus with spaces in the query part, all pluses that now appear where originally encoded
- });
- if (title) {
- title = title.trim ? title.trim() : title.replace(/^\s*/, "").replace(/\s*$/, "");
- title = title.replace(/"/g, "quot;").replace(/\(/g, "(").replace(/\)/g, ")").replace(//g, ">");
- }
- return title ? link + ' "' + title + '"' : link;
- });
- }
-
- commandProto.doLinkOrImage = function (chunk, postProcessing, isImage) {
-
- chunk.trimWhitespace();
- chunk.findTags(/\s*!?\[/, /\][ ]?(?:\n[ ]*)?(\[.*?\])?/);
- var background;
-
- if (chunk.endTag.length > 1 && chunk.startTag.length > 0) {
-
- chunk.startTag = chunk.startTag.replace(/!?\[/, "");
- chunk.endTag = "";
- this.addLinkDef(chunk, null);
-
- }
- else {
-
- // We're moving start and end tag back into the selection, since (as we're in the else block) we're not
- // *removing* a link, but *adding* one, so whatever findTags() found is now back to being part of the
- // link text. linkEnteredCallback takes care of escaping any brackets.
- chunk.selection = chunk.startTag + chunk.selection + chunk.endTag;
- chunk.startTag = chunk.endTag = "";
-
- if (/\n\n/.test(chunk.selection)) {
- this.addLinkDef(chunk, null);
- return;
- }
- var that = this;
- // The function to be executed when you enter a link and press OK or Cancel.
- // Marks up the link and adds the ref.
- var linkEnteredCallback = function (link) {
-
- background.parentNode.removeChild(background);
-
- if (link !== null) {
- // ( $1
- // [^\\] anything that's not a backslash
- // (?:\\\\)* an even number (this includes zero) of backslashes
- // )
- // (?= followed by
- // [[\]] an opening or closing bracket
- // )
- //
- // In other words, a non-escaped bracket. These have to be escaped now to make sure they
- // don't count as the end of the link or similar.
- // Note that the actual bracket has to be a lookahead, because (in case of to subsequent brackets),
- // the bracket in one match may be the "not a backslash" character in the next match, so it
- // should not be consumed by the first match.
- // The "prepend a space and finally remove it" steps makes sure there is a "not a backslash" at the
- // start of the string, so this also works if the selection begins with a bracket. We cannot solve
- // this by anchoring with ^, because in the case that the selection starts with two brackets, this
- // would mean a zero-width match at the start. Since zero-width matches advance the string position,
- // the first bracket could then not act as the "not a backslash" for the second.
- chunk.selection = (" " + chunk.selection).replace(/([^\\](?:\\\\)*)(?=[[\]])/g, "$1\\").substr(1);
-
- var linkDef = " [999]: " + properlyEncoded(link);
-
- var num = that.addLinkDef(chunk, linkDef);
- chunk.startTag = isImage ? "![" : "[";
- chunk.endTag = "][" + num + "]";
-
- if (!chunk.selection) {
- if (isImage) {
- chunk.selection = that.getString("imagedescription");
- }
- else {
- chunk.selection = that.getString("linkdescription");
- }
- }
- }
- postProcessing();
- };
-
- background = ui.createBackground();
-
- if (isImage) {
- if (!this.hooks.insertImageDialog(linkEnteredCallback))
- ui.prompt(this.getString("imagedialog"), imageDefaultText, linkEnteredCallback);
- }
- else {
- ui.prompt(this.getString("linkdialog"), linkDefaultText, linkEnteredCallback);
- }
- return true;
- }
- };
-
- // When making a list, hitting shift-enter will put your cursor on the next line
- // at the current indent level.
- commandProto.doAutoindent = function (chunk, postProcessing) {
-
- var commandMgr = this,
- fakeSelection = false;
-
- chunk.before = chunk.before.replace(/(\n|^)[ ]{0,3}([*+-]|\d+[.])[ \t]*\n$/, "\n\n");
- chunk.before = chunk.before.replace(/(\n|^)[ ]{0,3}>[ \t]*\n$/, "\n\n");
- chunk.before = chunk.before.replace(/(\n|^)[ \t]+\n$/, "\n\n");
-
- // There's no selection, end the cursor wasn't at the end of the line:
- // The user wants to split the current list item / code line / blockquote line
- // (for the latter it doesn't really matter) in two. Temporarily select the
- // (rest of the) line to achieve this.
- if (!chunk.selection && !/^[ \t]*(?:\n|$)/.test(chunk.after)) {
- chunk.after = chunk.after.replace(/^[^\n]*/, function (wholeMatch) {
- chunk.selection = wholeMatch;
- return "";
- });
- fakeSelection = true;
- }
-
- if (/(\n|^)[ ]{0,3}([*+-]|\d+[.])[ \t]+.*\n$/.test(chunk.before)) {
- if (commandMgr.doList) {
- commandMgr.doList(chunk);
- }
- }
- if (/(\n|^)[ ]{0,3}>[ \t]+.*\n$/.test(chunk.before)) {
- if (commandMgr.doBlockquote) {
- commandMgr.doBlockquote(chunk);
- }
- }
- if (/(\n|^)(\t|[ ]{4,}).*\n$/.test(chunk.before)) {
- if (commandMgr.doCode) {
- commandMgr.doCode(chunk);
- }
- }
-
- if (fakeSelection) {
- chunk.after = chunk.selection + chunk.after;
- chunk.selection = "";
- }
- };
-
- commandProto.doBlockquote = function (chunk, postProcessing) {
-
- chunk.selection = chunk.selection.replace(/^(\n*)([^\r]+?)(\n*)$/,
- function (totalMatch, newlinesBefore, text, newlinesAfter) {
- chunk.before += newlinesBefore;
- chunk.after = newlinesAfter + chunk.after;
- return text;
- });
-
- chunk.before = chunk.before.replace(/(>[ \t]*)$/,
- function (totalMatch, blankLine) {
- chunk.selection = blankLine + chunk.selection;
- return "";
- });
-
- chunk.selection = chunk.selection.replace(/^(\s|>)+$/, "");
- chunk.selection = chunk.selection || this.getString("quoteexample");
-
- // The original code uses a regular expression to find out how much of the
- // text *directly before* the selection already was a blockquote:
-
- /*
- if (chunk.before) {
- chunk.before = chunk.before.replace(/\n?$/, "\n");
- }
- chunk.before = chunk.before.replace(/(((\n|^)(\n[ \t]*)*>(.+\n)*.*)+(\n[ \t]*)*$)/,
- function (totalMatch) {
- chunk.startTag = totalMatch;
- return "";
- });
- */
-
- // This comes down to:
- // Go backwards as many lines a possible, such that each line
- // a) starts with ">", or
- // b) is almost empty, except for whitespace, or
- // c) is preceeded by an unbroken chain of non-empty lines
- // leading up to a line that starts with ">" and at least one more character
- // and in addition
- // d) at least one line fulfills a)
- //
- // Since this is essentially a backwards-moving regex, it's susceptible to
- // catstrophic backtracking and can cause the browser to hang;
- // see e.g. http://meta.stackoverflow.com/questions/9807.
- //
- // Hence we replaced this by a simple state machine that just goes through the
- // lines and checks for a), b), and c).
-
- var match = "",
- leftOver = "",
- line;
- if (chunk.before) {
- var lines = chunk.before.replace(/\n$/, "").split("\n");
- var inChain = false;
- for (var i = 0; i < lines.length; i++) {
- var good = false;
- line = lines[i];
- inChain = inChain && line.length > 0; // c) any non-empty line continues the chain
- if (/^>/.test(line)) { // a)
- good = true;
- if (!inChain && line.length > 1) // c) any line that starts with ">" and has at least one more character starts the chain
- inChain = true;
- } else if (/^[ \t]*$/.test(line)) { // b)
- good = true;
- } else {
- good = inChain; // c) the line is not empty and does not start with ">", so it matches if and only if we're in the chain
- }
- if (good) {
- match += line + "\n";
- } else {
- leftOver += match + line;
- match = "\n";
- }
- }
- if (!/(^|\n)>/.test(match)) { // d)
- leftOver += match;
- match = "";
- }
- }
-
- chunk.startTag = match;
- chunk.before = leftOver;
-
- // end of change
-
- if (chunk.after) {
- chunk.after = chunk.after.replace(/^\n?/, "\n");
- }
-
- chunk.after = chunk.after.replace(/^(((\n|^)(\n[ \t]*)*>(.+\n)*.*)+(\n[ \t]*)*)/,
- function (totalMatch) {
- chunk.endTag = totalMatch;
- return "";
- }
- );
-
- var replaceBlanksInTags = function (useBracket) {
-
- var replacement = useBracket ? "> " : "";
-
- if (chunk.startTag) {
- chunk.startTag = chunk.startTag.replace(/\n((>|\s)*)\n$/,
- function (totalMatch, markdown) {
- return "\n" + markdown.replace(/^[ ]{0,3}>?[ \t]*$/gm, replacement) + "\n";
- });
- }
- if (chunk.endTag) {
- chunk.endTag = chunk.endTag.replace(/^\n((>|\s)*)\n/,
- function (totalMatch, markdown) {
- return "\n" + markdown.replace(/^[ ]{0,3}>?[ \t]*$/gm, replacement) + "\n";
- });
- }
- };
-
- if (/^(?![ ]{0,3}>)/m.test(chunk.selection)) {
- this.wrap(chunk, SETTINGS.lineLength - 2);
- chunk.selection = chunk.selection.replace(/^/gm, "> ");
- replaceBlanksInTags(true);
- chunk.skipLines();
- } else {
- chunk.selection = chunk.selection.replace(/^[ ]{0,3}> ?/gm, "");
- this.unwrap(chunk);
- replaceBlanksInTags(false);
-
- if (!/^(\n|^)[ ]{0,3}>/.test(chunk.selection) && chunk.startTag) {
- chunk.startTag = chunk.startTag.replace(/\n{0,2}$/, "\n\n");
- }
-
- if (!/(\n|^)[ ]{0,3}>.*$/.test(chunk.selection) && chunk.endTag) {
- chunk.endTag = chunk.endTag.replace(/^\n{0,2}/, "\n\n");
- }
- }
-
- chunk.selection = this.hooks.postBlockquoteCreation(chunk.selection);
-
- if (!/\n/.test(chunk.selection)) {
- chunk.selection = chunk.selection.replace(/^(> *)/,
- function (wholeMatch, blanks) {
- chunk.startTag += blanks;
- return "";
- });
- }
- };
-
- commandProto.doCode = function (chunk, postProcessing) {
-
- var hasTextBefore = /\S[ ]*$/.test(chunk.before);
- var hasTextAfter = /^[ ]*\S/.test(chunk.after);
-
- // Use 'four space' markdown if the selection is on its own
- // line or is multiline.
- if ((!hasTextAfter && !hasTextBefore) || /\n/.test(chunk.selection)) {
-
- chunk.before = chunk.before.replace(/[ ]{4}$/,
- function (totalMatch) {
- chunk.selection = totalMatch + chunk.selection;
- return "";
- });
-
- var nLinesBack = 1;
- var nLinesForward = 1;
-
- if (/(\n|^)(\t|[ ]{4,}).*\n$/.test(chunk.before)) {
- nLinesBack = 0;
- }
- if (/^\n(\t|[ ]{4,})/.test(chunk.after)) {
- nLinesForward = 0;
- }
-
- chunk.skipLines(nLinesBack, nLinesForward);
-
- if (!chunk.selection) {
- chunk.startTag = " ";
- chunk.selection = this.getString("codeexample");
- }
- else {
- if (/^[ ]{0,3}\S/m.test(chunk.selection)) {
- if (/\n/.test(chunk.selection))
- chunk.selection = chunk.selection.replace(/^/gm, " ");
- else // if it's not multiline, do not select the four added spaces; this is more consistent with the doList behavior
- chunk.before += " ";
- }
- else {
- chunk.selection = chunk.selection.replace(/^[ ]{4}/gm, "");
- }
- }
- }
- else {
- // Use backticks (`) to delimit the code block.
-
- chunk.trimWhitespace();
- chunk.findTags(/`/, /`/);
-
- if (!chunk.startTag && !chunk.endTag) {
- chunk.startTag = chunk.endTag = "`";
- if (!chunk.selection) {
- chunk.selection = this.getString("codeexample");
- }
- }
- else if (chunk.endTag && !chunk.startTag) {
- chunk.before += chunk.endTag;
- chunk.endTag = "";
- }
- else {
- chunk.startTag = chunk.endTag = "";
- }
- }
- };
-
- commandProto.doList = function (chunk, postProcessing, isNumberedList) {
-
- // These are identical except at the very beginning and end.
- // Should probably use the regex extension function to make this clearer.
- var previousItemsRegex = /(\n|^)(([ ]{0,3}([*+-]|\d+[.])[ \t]+.*)(\n.+|\n{2,}([*+-].*|\d+[.])[ \t]+.*|\n{2,}[ \t]+\S.*)*)\n*$/;
- var nextItemsRegex = /^\n*(([ ]{0,3}([*+-]|\d+[.])[ \t]+.*)(\n.+|\n{2,}([*+-].*|\d+[.])[ \t]+.*|\n{2,}[ \t]+\S.*)*)\n*/;
-
- // The default bullet is a dash but others are possible.
- // This has nothing to do with the particular HTML bullet,
- // it's just a markdown bullet.
- var bullet = "-";
-
- // The number in a numbered list.
- var num = 1;
-
- // Get the item prefix - e.g. " 1. " for a numbered list, " - " for a bulleted list.
- var getItemPrefix = function () {
- var prefix;
- if (isNumberedList) {
- prefix = " " + num + ". ";
- num++;
- }
- else {
- prefix = " " + bullet + " ";
- }
- return prefix;
- };
-
- // Fixes the prefixes of the other list items.
- var getPrefixedItem = function (itemText) {
-
- // The numbering flag is unset when called by autoindent.
- if (isNumberedList === undefined) {
- isNumberedList = /^\s*\d/.test(itemText);
- }
-
- // Renumber/bullet the list element.
- itemText = itemText.replace(/^[ ]{0,3}([*+-]|\d+[.])\s/gm,
- function (_) {
- return getItemPrefix();
- });
-
- return itemText;
- };
-
- chunk.findTags(/(\n|^)*[ ]{0,3}([*+-]|\d+[.])\s+/, null);
-
- if (chunk.before && !/\n$/.test(chunk.before) && !/^\n/.test(chunk.startTag)) {
- chunk.before += chunk.startTag;
- chunk.startTag = "";
- }
-
- if (chunk.startTag) {
-
- var hasDigits = /\d+[.]/.test(chunk.startTag);
- chunk.startTag = "";
- chunk.selection = chunk.selection.replace(/\n[ ]{4}/g, "\n");
- this.unwrap(chunk);
- chunk.skipLines();
-
- if (hasDigits) {
- // Have to renumber the bullet points if this is a numbered list.
- chunk.after = chunk.after.replace(nextItemsRegex, getPrefixedItem);
- }
- if (isNumberedList == hasDigits) {
- return;
- }
- }
-
- var nLinesUp = 1;
-
- chunk.before = chunk.before.replace(previousItemsRegex,
- function (itemText) {
- if (/^\s*([*+-])/.test(itemText)) {
- bullet = re.$1;
- }
- nLinesUp = /[^\n]\n\n[^\n]/.test(itemText) ? 1 : 0;
- return getPrefixedItem(itemText);
- });
-
- if (!chunk.selection) {
- chunk.selection = this.getString("litem");
- }
-
- var prefix = getItemPrefix();
-
- var nLinesDown = 1;
-
- chunk.after = chunk.after.replace(nextItemsRegex,
- function (itemText) {
- nLinesDown = /[^\n]\n\n[^\n]/.test(itemText) ? 1 : 0;
- return getPrefixedItem(itemText);
- });
-
- chunk.trimWhitespace(true);
- chunk.skipLines(nLinesUp, nLinesDown, true);
- chunk.startTag = prefix;
- var spaces = prefix.replace(/./g, " ");
- this.wrap(chunk, SETTINGS.lineLength - spaces.length);
- chunk.selection = chunk.selection.replace(/\n/g, "\n" + spaces);
-
- };
-
- commandProto.doHeading = function (chunk, postProcessing) {
-
- // Remove leading/trailing whitespace and reduce internal spaces to single spaces.
- chunk.selection = chunk.selection.replace(/\s+/g, " ");
- chunk.selection = chunk.selection.replace(/(^\s+|\s+$)/g, "");
-
- // If we clicked the button with no selected text, we just
- // make a level 2 hash header around some default text.
- if (!chunk.selection) {
- chunk.startTag = "## ";
- chunk.selection = this.getString("headingexample");
- chunk.endTag = " ##";
- return;
- }
-
- var headerLevel = 0; // The existing header level of the selected text.
-
- // Remove any existing hash heading markdown and save the header level.
- chunk.findTags(/#+[ ]*/, /[ ]*#+/);
- if (/#+/.test(chunk.startTag)) {
- headerLevel = re.lastMatch.length;
- }
- chunk.startTag = chunk.endTag = "";
-
- // Try to get the current header level by looking for - and = in the line
- // below the selection.
- chunk.findTags(null, /\s?(-+|=+)/);
- if (/=+/.test(chunk.endTag)) {
- headerLevel = 1;
- }
- if (/-+/.test(chunk.endTag)) {
- headerLevel = 2;
- }
-
- // Skip to the next line so we can create the header markdown.
- chunk.startTag = chunk.endTag = "";
- chunk.skipLines(1, 1);
-
- // We make a level 2 header if there is no current header.
- // If there is a header level, we substract one from the header level.
- // If it's already a level 1 header, it's removed.
- var headerLevelToCreate = headerLevel == 0 ? 2 : headerLevel - 1;
-
- if (headerLevelToCreate > 0) {
-
- // The button only creates level 1 and 2 underline headers.
- // Why not have it iterate over hash header levels? Wouldn't that be easier and cleaner?
- var headerChar = headerLevelToCreate >= 2 ? "-" : "=";
- var len = chunk.selection.length;
- if (len > SETTINGS.lineLength) {
- len = SETTINGS.lineLength;
- }
- chunk.endTag = "\n";
- while (len--) {
- chunk.endTag += headerChar;
- }
- }
- };
-
- commandProto.doHorizontalRule = function (chunk, postProcessing) {
- chunk.startTag = "----------\n";
- chunk.selection = "";
- chunk.skipLines(2, 1, true);
- }
-
-
-})();
\ No newline at end of file
diff --git a/collectedstatic/pagedown/Markdown.Sanitizer.js b/collectedstatic/pagedown/Markdown.Sanitizer.js
deleted file mode 100644
index cc5826f..0000000
--- a/collectedstatic/pagedown/Markdown.Sanitizer.js
+++ /dev/null
@@ -1,108 +0,0 @@
-(function () {
- var output, Converter;
- if (typeof exports === "object" && typeof require === "function") { // we're in a CommonJS (e.g. Node.js) module
- output = exports;
- Converter = require("./Markdown.Converter").Converter;
- } else {
- output = window.Markdown;
- Converter = output.Converter;
- }
-
- output.getSanitizingConverter = function () {
- var converter = new Converter();
- converter.hooks.chain("postConversion", sanitizeHtml);
- converter.hooks.chain("postConversion", balanceTags);
- return converter;
- }
-
- function sanitizeHtml(html) {
- return html.replace(/<[^>]*>?/gi, sanitizeTag);
- }
-
- // (tags that can be opened/closed) | (tags that stand alone)
- var basic_tag_whitelist = /^(<\/?(b|blockquote|code|del|dd|dl|dt|em|h1|h2|h3|i|kbd|li|ol|p|pre|s|sup|sub|strong|strike|ul)>|<(br|hr)\s?\/?>)$/i;
- // |
- var a_white = /^(]+")?\s?>|<\/a>)$/i;
-
- // ]*")?(\stitle="[^"<>]*")?\s?\/?>)$/i;
-
- function sanitizeTag(tag) {
- if (tag.match(basic_tag_whitelist) || tag.match(a_white) || tag.match(img_white))
- return tag;
- else
- return "";
- }
-
- ///
- /// attempt to balance HTML tags in the html string
- /// by removing any unmatched opening or closing tags
- /// IMPORTANT: we *assume* HTML has *already* been
- /// sanitized and is safe/sane before balancing!
- ///
- /// adapted from CODESNIPPET: A8591DBA-D1D3-11DE-947C-BA5556D89593
- ///
- function balanceTags(html) {
-
- if (html == "")
- return "";
-
- var re = /<\/?\w+[^>]*(\s|$|>)/g;
- // convert everything to lower case; this makes
- // our case insensitive comparisons easier
- var tags = html.toLowerCase().match(re);
-
- // no HTML tags present? nothing to do; exit now
- var tagcount = (tags || []).length;
- if (tagcount == 0)
- return html;
-
- var tagname, tag;
- var ignoredtags = "
";
- var match;
- var tagpaired = [];
- var tagremove = [];
- var needsRemoval = false;
-
- // loop through matched tags in forward order
- for (var ctag = 0; ctag < tagcount; ctag++) {
- tagname = tags[ctag].replace(/<\/?(\w+).*/, "$1");
- // skip any already paired tags
- // and skip tags in our ignore list; assume they're self-closed
- if (tagpaired[ctag] || ignoredtags.search("<" + tagname + ">") > -1)
- continue;
-
- tag = tags[ctag];
- match = -1;
-
- if (!/^<\//.test(tag)) {
- // this is an opening tag
- // search forwards (next tags), look for closing tags
- for (var ntag = ctag + 1; ntag < tagcount; ntag++) {
- if (!tagpaired[ntag] && tags[ntag] == "" + tagname + ">") {
- match = ntag;
- break;
- }
- }
- }
-
- if (match == -1)
- needsRemoval = tagremove[ctag] = true; // mark for removal
- else
- tagpaired[match] = true; // mark paired
- }
-
- if (!needsRemoval)
- return html;
-
- // delete all orphaned tags from the string
-
- var ctag = 0;
- html = html.replace(re, function (match) {
- var res = tagremove[ctag] ? "" : match;
- ctag++;
- return res;
- });
- return html;
- }
-})();
diff --git a/collectedstatic/pagedown/demo/browser/demo.css b/collectedstatic/pagedown/demo/browser/demo.css
deleted file mode 100644
index 5860ba8..0000000
--- a/collectedstatic/pagedown/demo/browser/demo.css
+++ /dev/null
@@ -1,119 +0,0 @@
-body
-{
- background-color: White;
-}
-
-.wmd-panel
-{
- margin-left: 25%;
- margin-right: 25%;
- width: 50%;
- min-width: 500px;
-}
-
-.wmd-button-bar
-{
- width: 100%;
- background-color: Silver;
-}
-
-.wmd-input
-{
- height: 300px;
- width: 100%;
- background-color: Gainsboro;
- border: 1px solid DarkGray;
-}
-
-.wmd-preview
-{
- background-color: #c0e0ff;
-}
-
-.wmd-button-row
-{
- position: relative;
- margin-left: 5px;
- margin-right: 5px;
- margin-bottom: 5px;
- margin-top: 10px;
- padding: 0px;
- height: 20px;
-}
-
-.wmd-spacer
-{
- width: 1px;
- height: 20px;
- margin-left: 14px;
-
- position: absolute;
- background-color: Silver;
- display: inline-block;
- list-style: none;
-}
-
-.wmd-button {
- width: 20px;
- height: 20px;
- padding-left: 2px;
- padding-right: 3px;
- position: absolute;
- display: inline-block;
- list-style: none;
- cursor: pointer;
-}
-
-.wmd-button > span {
- background-image: url(../../wmd-buttons.png);
- background-repeat: no-repeat;
- background-position: 0px 0px;
- width: 20px;
- height: 20px;
- display: inline-block;
-}
-
-.wmd-spacer1
-{
- left: 50px;
-}
-.wmd-spacer2
-{
- left: 175px;
-}
-.wmd-spacer3
-{
- left: 300px;
-}
-
-
-
-
-.wmd-prompt-background
-{
- background-color: Black;
-}
-
-.wmd-prompt-dialog
-{
- border: 1px solid #999999;
- background-color: #F5F5F5;
-}
-
-.wmd-prompt-dialog > div {
- font-size: 0.8em;
- font-family: arial, helvetica, sans-serif;
-}
-
-
-.wmd-prompt-dialog > form > input[type="text"] {
- border: 1px solid #999999;
- color: black;
-}
-
-.wmd-prompt-dialog > form > input[type="button"]{
- border: 1px solid #888888;
- font-family: trebuchet MS, helvetica, sans-serif;
- font-size: 0.8em;
- font-weight: bold;
-}
diff --git a/collectedstatic/pagedown/demo/browser/demo.html b/collectedstatic/pagedown/demo/browser/demo.html
deleted file mode 100644
index 51cdcf6..0000000
--- a/collectedstatic/pagedown/demo/browser/demo.html
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
-
- PageDown Demo Page
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/collectedstatic/pagedown/demo/node/demo.js b/collectedstatic/pagedown/demo/node/demo.js
deleted file mode 100644
index 097222d..0000000
--- a/collectedstatic/pagedown/demo/node/demo.js
+++ /dev/null
@@ -1,44 +0,0 @@
-// NOTE: This is just a demo -- in a production environment,
-// be sure to spend a few more thoughts on sanitizing user input.
-// (also, you probably wouldn't use a get request)
-
-var http = require("http"),
- url = require("url"),
- querystring = require("querystring"),
- Converter = require("../../Markdown.Converter").Converter,
- getSanitizingConverter = require("../../Markdown.Sanitizer").getSanitizingConverter,
- conv = new Converter(),
- saneConv = getSanitizingConverter();
-
-http.createServer(function (req, res) {
-
- var route = url.parse(req.url);
- if (route.pathname !== "/") {
- res.writeHead(404);
- res.end("Page not found");
- return;
- }
-
- var query = querystring.parse(route.query);
-
- res.writeHead(200, { "Content-type": "text/html" });
- res.write("");
-
- var markdown = query.md || "## Hello!\n\nI'm walking \n\nVisit [Stack Overflow](http://stackoverflow.com)\n\nThis is never closed!";
-
- res.write("Your output, sanitized: \n" + saneConv.makeHtml(markdown))
- res.write("Your output, unsanitized: \n" + conv.makeHtml(markdown))
-
- res.write(
- "Enter Markdown \n" +
- ""
- );
-
- res.end("");
-
-}).listen(8000);
diff --git a/collectedstatic/pagedown/local/Markdown.local.fr.js b/collectedstatic/pagedown/local/Markdown.local.fr.js
deleted file mode 100644
index 3b8d585..0000000
--- a/collectedstatic/pagedown/local/Markdown.local.fr.js
+++ /dev/null
@@ -1,43 +0,0 @@
-// Usage:
-//
-// var myConverter = new Markdown.Converter(myEditor, null, { strings: Markdown.local.fr });
-
-(function () {
- Markdown.local = Markdown.local || {};
- Markdown.local.fr = {
- bold: "Gras Ctrl+B",
- boldexample: "texte en gras",
-
- italic: "Italique Ctrl+I",
- italicexample: "texte en italique",
-
- link: "Hyperlien Ctrl+L",
- linkdescription: "description de l'hyperlien",
- linkdialog: "Insérer un hyperlien
http://example.com/ \"titre optionnel\"
",
-
- quote: "Citation Ctrl+Q",
- quoteexample: "Citation",
-
- code: "Extrait de code Ctrl+K",
- codeexample: "votre extrait de code",
-
- image: "Image Ctrl+G",
- imagedescription: "description de l'image",
- imagedialog: "Insérer une image
http://example.com/images/diagram.jpg \"titre optionnel\"Vous chercher un hébergement d'image grauit ?
",
-
- olist: "Liste numérotée Ctrl+O",
- ulist: "Liste à point Ctrl+U",
- litem: "Elément de liste",
-
- heading: "Titre / Ctrl+H",
- headingexample: "Titre",
-
- hr: "Trait horizontal Ctrl+R",
-
- undo: "Annuler - Ctrl+Z",
- redo: "Refaire - Ctrl+Y",
- redomac: "Refaire - Ctrl+Shift+Z",
-
- help: "Aide sur Markdown"
- };
-})();
\ No newline at end of file
diff --git a/collectedstatic/pagedown/node-pagedown.js b/collectedstatic/pagedown/node-pagedown.js
deleted file mode 100644
index e214548..0000000
--- a/collectedstatic/pagedown/node-pagedown.js
+++ /dev/null
@@ -1,2 +0,0 @@
-exports.Converter = require("./Markdown.Converter").Converter;
-exports.getSanitizingConverter = require("./Markdown.Sanitizer").getSanitizingConverter;
diff --git a/collectedstatic/pagedown/wmd-buttons.png b/collectedstatic/pagedown/wmd-buttons.png
deleted file mode 100644
index 50b3709..0000000
Binary files a/collectedstatic/pagedown/wmd-buttons.png and /dev/null differ
diff --git a/collectedstatic/pagedown_init.js b/collectedstatic/pagedown_init.js
deleted file mode 100644
index 593fb82..0000000
--- a/collectedstatic/pagedown_init.js
+++ /dev/null
@@ -1,71 +0,0 @@
-var DjangoPagedown = DjangoPagedown | {};
-
-DjangoPagedown = (function() {
-
- var converter,
- editors,
- elements;
-
- var that = this;
-
- var isPagedownable = function(el) {
- if ( (' ' + el.className + ' ').indexOf(' wmd-input ') > -1 ) {
- return true;
- }
- return false;
- };
-
- var createEditor = function(el) {
- if ( isPagedownable(el) ) {
- if ( ! that.editors.hasOwnProperty(el.id) ) {
- var selectors = {
- input : el.id,
- button : el.id + "_wmd_button_bar",
- preview : el.id + "_wmd_preview",
- };
- that.editors[el.id] = new Markdown.Editor(that.converter, "", selectors);
- that.editors[el.id].run();
- return true;
- } else {
- console.log("Pagedown editor already attached to element: <#" + el.id + ">");
- }
- }
- return false;
- };
-
- var destroyEditor = function(el) {
- if ( that.editors.hasOwnProperty(el.id)) {
- delete that.editors[el.id];
- return true;
- }
- return false;
- };
-
- var init = function() {
- that.converter = Markdown.getSanitizingConverter();
- Markdown.Extra.init(that.converter, {
- extensions: "all"
- });
- that.elements = document.getElementsByTagName("textarea");
- that.editors = {};
- for (var i = 0; i < that.elements.length; ++i){
- if ( isPagedownable(that.elements[i]) ) {
- createEditor(that.elements[i]);
- }
- }
- };
-
- return {
- init: function() {
- return init();
- },
- createEditor: function(el) {
- return createEditor(el);
- },
- destroyEditor: function(el) {
- return destroyEditor(el);
- },
- };
-})();
-
-window.onload = DjangoPagedown.init;
\ No newline at end of file