peach-devdocs/src/theme/highlight.js

2 lines
84 KiB
JavaScript
Raw Normal View History

/*! highlight.js v9.15.8 | BSD3 License | git.io/hljslicense */
!function(e){var t="object"==typeof window&&window||"object"==typeof self&&self;"undefined"!=typeof exports?e(exports):t&&(t.hljs=e({}),"function"==typeof define&&define.amd&&define([],function(){return t.hljs}))}(function(n){var m=[],o=Object.keys,g={},u={},t=/^(no-?highlight|plain|text)$/i,v=/\blang(?:uage)?-([\w-]+)\b/i,s=/((^(<[^>]+>|\t|)+|(?:\n)))/gm,r={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",relevance:"r",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"},h="</span>",w={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0};function x(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}function b(e){return e.nodeName.toLowerCase()}function N(e,t){var s=e&&e.exec(t);return s&&0===s.index}function f(e){return t.test(e)}function p(e){var t,s={},r=Array.prototype.slice.call(arguments,1);for(t in e)s[t]=e[t];return r.forEach(function(e){for(t in e)s[t]=e[t]}),s}function _(e){var n=[];return function e(t,s){for(var r=t.firstChild;r;r=r.nextSibling)3===r.nodeType?s+=r.nodeValue.length:1===r.nodeType&&(n.push({event:"start",offset:s,node:r}),s=e(r,s),b(r).match(/br|hr|img|input/)||n.push({event:"stop",offset:s,node:r}));return s}(e,0),n}function a(e){if(r&&!e.langApiRestored){for(var t in e.langApiRestored=!0,r)e[t]&&(e[r[t]]=e[t]);(e.c||[]).concat(e.v||[]).forEach(a)}}function q(i){function d(e){return e&&e.source||e}function c(e,t){return new RegExp(d(e),"m"+(i.cI?"i":"")+(t?"g":""))}!function t(s,e){if(!s.compiled){if(s.compiled=!0,s.k=s.k||s.bK,s.k){var r={},n=function(s,e){i.cI&&(e=e.toLowerCase()),e.split(" ").forEach(function(e){var t=e.split("|");r[t[0]]=[s,t[1]?Number(t[1]):1]})};"string"==typeof s.k?n("keyword",s.k):o(s.k).forEach(function(e){n(e,s.k[e])}),s.k=r}s.lR=c(s.l||/\w+/,!0),e&&(s.bK&&(s.b="\\b("+s.bK.split(" ").join("|")+")\\b"),s.b||(s.b=/\B|\b/),s.bR=c(s.b),s.endSameAsBegin&&(s.e=s.b),s.e||s.eW||(s.e=/\B|\b/),s.e&&(s.eR=c(s.e)),s.tE=d(s.e)||"",s.eW&&e.tE&&(s.tE+=(s.e?"|":"")+e.tE)),s.i&&(s.iR=c(s.i)),null==s.r&&(s.r=1),s.c||(s.c=[]),s.c=Array.prototype.concat.apply([],s.c.map(function(e){return(t="self"===e?s:e).v&&!t.cached_variants&&(t.cached_variants=t.v.map(function(e){return p(t,{v:null},e)})),t.cached_variants||t.eW&&[p(t)]||[t];var t})),s.c.forEach(function(e){t(e,s)}),s.starts&&t(s.starts,e);var a=s.c.map(function(e){return e.bK?"\\.?(?:"+e.b+")\\.?":e.b}).concat([s.tE,s.i]).map(d).filter(Boolean);s.t=a.length?c(function(e,t){for(var s=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./,r=0,n="",a=0;a<e.length;a++){var i=r,c=d(e[a]);for(0<a&&(n+=t);0<c.length;){var o=s.exec(c);if(null==o){n+=c;break}n+=c.substring(0,o.index),c=c.substring(o.index+o[0].length),"\\"==o[0][0]&&o[1]?n+="\\"+String(Number(o[1])+i):(n+=o[0],"("==o[0]&&r++)}}return n}(a,"|"),!0):{exec:function(){return null}}}}(i)}function y(e,t,c,s){function o(e,t,s,r){var n='<span class="'+(r?"":w.classPrefix);return e?(n+=e+'">')+t+(s?"":h):t}function d(){u+=null!=m.sL?function(){var e="string"==typeof m.sL;if(e&&!g[m.sL])return x(v);var t=e?y(m.sL,v,!0,a[m.sL]):E(v,m.sL.length?m.sL:void 0);return 0<m.r&&(b+=t.r),e&&(a[m.sL]=t.top),o(t.language,t.value,!1,!0)}():function(){var e,t,s,r,n,a,i;if(!m.k)return x(v);for(r="",t=0,m.lR.lastIndex=0,s=m.lR.exec(v);s;)r+=x(v.substring(t,s.index)),n=m,a=s,i=l.cI?a[0].toLowerCase():a[0],(e=n.k.hasOwnProperty(i)&&n.k[i])?(b+=e[1],r+=o(e[0],x(s[0]))):r+=x(s[0]),t=m.lR.lastIndex,s=m.lR.exec(