mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-11-23 11:01:37 +01:00
1 line
72 KiB
JavaScript
1 line
72 KiB
JavaScript
|
/*!highlight.js v9.18.3 | BSD3 License | git.io/hljslicense*/!function(e){var t="object"==typeof window&&window||"object"==typeof self&&self;"undefined"==typeof exports||exports.nodeType?t&&(t.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return t.hljs})):e(exports)}(function(n){var u=[],i=Object.keys,w=Object.create(null),c=Object.create(null),x=!0,t=/^(no-?highlight|plain|text)$/i,o=/\blang(?:uage)?-([\w-]+)\b/i,r=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,a={case_insensitive:"cI",lexemes:"l",contains:"c",keywords:"k",subLanguage:"sL",className:"cN",begin:"b",beginKeywords:"bK",end:"e",endsWithParent:"eW",illegal:"i",excludeBegin:"eB",excludeEnd:"eE",returnBegin:"rB",returnEnd:"rE",variants:"v",IDENT_RE:"IR",UNDERSCORE_IDENT_RE:"UIR",NUMBER_RE:"NR",C_NUMBER_RE:"CNR",BINARY_NUMBER_RE:"BNR",RE_STARTERS_RE:"RSR",BACKSLASH_ESCAPE:"BE",APOS_STRING_MODE:"ASM",QUOTE_STRING_MODE:"QSM",PHRASAL_WORDS_MODE:"PWM",C_LINE_COMMENT_MODE:"CLCM",C_BLOCK_COMMENT_MODE:"CBCM",HASH_COMMENT_MODE:"HCM",NUMBER_MODE:"NM",C_NUMBER_MODE:"CNM",BINARY_NUMBER_MODE:"BNM",CSS_NUMBER_MODE:"CSSNM",REGEXP_MODE:"RM",TITLE_MODE:"TM",UNDERSCORE_TITLE_MODE:"UTM",COMMENT:"C",beginRe:"bR",endRe:"eR",illegalRe:"iR",lexemesRe:"lR",terminators:"t",terminator_end:"tE"},k="</span>",E="Could not find the language '{}', did you forget to load/include a language module?",M={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0},s="of and for in not or if then".split(" ");function C(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}function b(e){return e.nodeName.toLowerCase()}function l(e){return t.test(e)}function d(e){var t,r={},a=Array.prototype.slice.call(arguments,1);for(t in e)r[t]=e[t];return a.forEach(function(e){for(t in e)r[t]=e[t]}),r}function p(e){var n=[];return function e(t,r){for(var a=t.firstChild;a;a=a.nextSibling)3===a.nodeType?r+=a.nodeValue.length:1===a.nodeType&&(n.push({event:"start",offset:r,node:a}),r=e(a,r),b(a).match(/br|hr|img|input/)||n.push({event:"stop",offset:r,node:a}));return r}(e,0),n}function f(e,t,r){var a=0,n="",i=[];function s(){return e.length&&t.length?e[0].offset!==t[0].offset?e[0].offset<t[0].offset?e:t:"start"===t[0].event?e:t:e.length?e:t}function c(e){n+="<"+b(e)+u.map.call(e.attributes,function(e){return" "+e.nodeName+'="'+C(e.value).replace(/"/g,""")+'"'}).join("")+">"}function o(e){n+="</"+b(e)+">"}function l(e){("start"===e.event?c:o)(e.node)}for(;e.length||t.length;){var d=s();if(n+=C(r.substring(a,d[0].offset)),a=d[0].offset,d===e){for(i.reverse().forEach(o);l(d.splice(0,1)[0]),(d=s())===e&&d.length&&d[0].offset===a;);i.reverse().forEach(c)}else"start"===d[0].event?i.push(d[0].node):i.pop(),l(d.splice(0,1)[0])}return n+C(r.substr(a))}function m(t){return t.v&&!t.cached_variants&&(t.cached_variants=t.v.map(function(e){return d(t,{v:null},e)})),t.cached_variants?t.cached_variants:function e(t){return!!t&&(t.eW||e(t.starts))}(t)?[d(t,{starts:t.starts?d(t.starts):null})]:Object.isFrozen(t)?[d(t)]:[t]}function g(e){if(a&&!e.langApiRestored){for(var t in e.langApiRestored=!0,a)e[t]&&(e[a[t]]=e[t]);(e.c||[]).concat(e.v||[]).forEach(g)}}function _(t,a){var n={};return"string"==typeof t?r("keyword",t):i(t).forEach(function(e){r(e,t[e])}),n;function r(r,e){a&&(e=e.toLowerCase()),e.split(" ").forEach(function(e){var t=e.split("|");n[t[0]]=[r,function(e,t){return t?Number(t):function(e){return-1!=s.indexOf(e.toLowerCase())}(e)?0:1}(t[0],t[1])]})}}function B(a){function d(e){return e&&e.source||e}function u(e,t){return new RegExp(d(e),"m"+(a.cI?"i":"")+(t?"g":""))}function n(n){var i,e,s={},c=[],o={},r=1;function t(e,t){s[r]=e,c.push([e,t]),r+=function(e){return new RegExp(e.toString()+"|").exec("").length-1}(t)+1}for(var a=0;a<n.c.length;a++){t(e=n.c[a],e.bK?"\\.?(?:"+e.b+")\\.?":e.b)}n.tE&&t("end",n.tE),n.i&&t("illegal",n.i);var l=c.map(function(e){return e[1]});return i=u(function(e,t){for(var r=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./,a=0,n="",i=0;i<e.length;i++){var s=a+=1,c=d(e[i]);for(0<i&&(n+=t),n+="(";0<c.length;){var o=r.exec(c);if(null==o){n+=c;break}n+=c.subs
|