补充主题静态资源与归档模板
This commit is contained in:
1 parent
1268a55dd0
commit
3247db7ed1
265 files changed
+59174
No files matched your search
+2
@@ -0,0 +1,2 @@
|
||||
var EnlighterJS=function(e){"use strict";function t(e,t,r,n,s){return{text:e,type:t,index:n||0,end:e.length+n,filter:r||null,priority:s||0}}function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function s(e,t,r){null===e&&(e=Function.prototype);var n=Object.getOwnPropertyDescriptor(e,t);if(void 0===n){var i=Object.getPrototypeOf(e);return null===i?void 0:s(i,t,r)}if("value"in n)return n.value;var o=n.get;return void 0!==o?o.call(r):void 0}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function o(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(){r(this,a),this.rules=[],this.setupLanguage()}function g(){return r(this,g),o(this,(g.__proto__||Object.getPrototypeOf(g)).apply(this,arguments))}function l(){return r(this,l),o(this,(l.__proto__||Object.getPrototypeOf(l)).apply(this,arguments))}function p(){return r(this,p),o(this,(p.__proto__||Object.getPrototypeOf(p)).apply(this,arguments))}function u(){return r(this,u),o(this,(u.__proto__||Object.getPrototypeOf(u)).apply(this,arguments))}function c(e,r,n){for(var s=[],i=0,o=void 0;null!=(o=r.exec(e.text));){i<o.index&&s.push(t(e.text.substring(i,o.index),e.type,null,i));for(var a=n(o,e.type)||[],g=0;g<a.length;g++)s.push(a[g]);i=o.index+o[0].length,r.lastIndex=i}return 0==s.length?[e]:(i<e.text.length&&s.push(t(e.text.substring(i),e.type,null,i)),s)}function y(){return r(this,y),o(this,(y.__proto__||Object.getPrototypeOf(y)).apply(this,arguments))}function b(){return r(this,b),o(this,(b.__proto__||Object.getPrototypeOf(b)).apply(this,arguments))}function f(){return r(this,f),o(this,(f.__proto__||Object.getPrototypeOf(f)).apply(this,arguments))}function h(){return r(this,h),o(this,(h.__proto__||Object.getPrototypeOf(h)).apply(this,arguments))}function d(){return r(this,d),o(this,(d.__proto__||Object.getPrototypeOf(d)).apply(this,arguments))}function x(){return r(this,x),o(this,(x.__proto__||Object.getPrototypeOf(x)).apply(this,arguments))}function m(){return r(this,m),o(this,(m.__proto__||Object.getPrototypeOf(m)).apply(this,arguments))}function k(){return r(this,k),o(this,(k.__proto__||Object.getPrototypeOf(k)).apply(this,arguments))}function _(){return r(this,_),o(this,(_.__proto__||Object.getPrototypeOf(_)).apply(this,arguments))}function w(){return r(this,w),o(this,(w.__proto__||Object.getPrototypeOf(w)).apply(this,arguments))}function v(){return r(this,v),o(this,(v.__proto__||Object.getPrototypeOf(v)).apply(this,arguments))}function C(){return r(this,C),o(this,(C.__proto__||Object.getPrototypeOf(C)).apply(this,arguments))}function O(){return r(this,O),o(this,(O.__proto__||Object.getPrototypeOf(O)).apply(this,arguments))}function S(){return r(this,S),o(this,(S.__proto__||Object.getPrototypeOf(S)).apply(this,arguments))}function A(){return r(this,A),o(this,(A.__proto__||Object.getPrototypeOf(A)).apply(this,arguments))}function L(){return r(this,L),o(this,(L.__proto__||Object.getPrototypeOf(L)).apply(this,arguments))}function j(){return r(this,j),o(this,(j.__proto__||Object.getPrototypeOf(j)).apply(this,arguments))}function q(){return r(this,q),o(this,(q.__proto__||Object.getPrototypeOf(q)).apply(this,arguments))}function E(){return r(this,E),o(this,(E.__proto__||Object.getPrototypeOf(E)).apply(this,arguments))}function P(){return r(this,P),o(this,(P.__proto__||Object.getPrototypeOf(P)).apply(this,arguments))}function W(){return r(this,W),o(this,(W.__proto__||Object.getPrototypeOf(W)).apply(this,arguments))}function $(){return r(this,$),o(this,($.__proto__||Object.getPrototypeOf($)).apply(this,arguments))}function I(){return r(this,I),o(this,(I.__proto__||Object.getPrototypeOf(I)).apply(this,arguments))}function N(){return r(this,N),o(this,(N.__proto__||Object.getPrototypeOf(N)).apply(this,arguments))}function F(){return r(this,F),o(this,(F.__proto__||Object.getPrototypeOf(F)).apply(this,arguments))}function D(){return r(this,D),o(this,(D.__proto__||Object.getPrototypeOf(D)).apply(this,arguments))}function T(){return r(this,T),o(this,(T.__proto__||Object.getPrototypeOf(T)).apply(this,arguments))}function R(){return r(this,R),o(this,(R.__proto__||Object.getPrototypeOf(R)).apply(this,arguments))}function Z(){return r(this,Z),o(this,(Z.__proto__||Object.getPrototypeOf(Z)).apply(this,arguments))}function z(){return r(this,z),o(this,(z.__proto__||Object.getPrototypeOf(z)).apply(this,arguments))}function B(){return r(this,B),o(this,(B.__proto__||Object.getPrototypeOf(B)).apply(this,argumentLine truncated
|
||||
regex:/\b(Data|Do|DynamicParam|Exit|Filter|From|Function|In|InlineScript|Hidden|Parallel|Param|Process|Return|Sequence|Trap|Workflow)\b/gi,type:"k0"},{regex:/\b([A-Z]\w+(?:-\w+)+)\b/g,type:"m0"},{regex:/<#[\S\s]+?#>/gi,type:"c1"},ve.poundComments,{regex:/\$[A-Z_][\w]*/gim,type:"k7"},ve.mCalls,ve.fCalls,ve.int,ve.floats,ve.brackets]}}]),W),Xe=(i($,Se),Ce($,[{key:"setupLanguage",value:function(){this.rules=[{regex:/(%.*)$/gm,type:"c0"},ve.blockComments,ve.dqStrings,ve.sqStrings,{regex:/^(\w+)(?:\(.*?\))?\s*(?::-|\.)/gm,type:"k9"},{regex:/\b(true|false|Yes|No|not|fail)\b/gi,type:"e0"},{regex:/\b(catch|throw|repeat)\b/g,type:"k1"},{regex:/^(\?-)/g,type:"k9"},{regex:/\b(is)\b/g,type:"k3"},{regex:/[A-Z_][\w]*/g,type:"k7"},ve.brackets,ve.floats,ve.int,ve.fCalls]}}]),$),Ke=(i(I,Se),Ce(I,[{key:"setupLanguage",value:function(){this.rules=[ve.dqStrings,ve.prop,{regex:/\b([A-Z]\w+)\b/g,type:"k5"},{regex:/^(import)(\s+[\w.]+)/gm,type:["k0","k5"]},{regex:/\b(bool|char|double|float|int|long|short|void|string)\b/g,type:"k5"},ve.mCalls,ve.null,ve.boolean,ve.slashComments,ve.blockComments,ve.int,ve.floats,ve.brackets]}}]),I),et=(i(N,Se),Ce(N,[{key:"setupLanguage",value:function(){this.rules=[{regex:/^(.*?)$/g,type:"text"}]}}]),N),tt=(i(F,Se),Ce(F,[{key:"setupLanguage",value:function(){function e(e){return e.text.match(/^%r/)?e.type="e2":e.text.match(/^%x/)&&(e.type="e4"),[e]}this.rules=[ve.dqStrings,ve.sqStrings,ve.heredoc,{regex:/(`(?:[^`\\]|\\.)*`)/g,type:"e4"},ve.boolean,{regex:/\b(nil)\b/gi,type:"e1"},ve.fCalls,ve.prop,{regex:/@{1,2}[A-Za-z_]\w*\W/g,type:"k7"},{regex:/[^:](:[\w]+)\b/g,type:"k6"},{regex:/(\$[a-z0-9_-]+|\$.)\W/gi,type:"k9"},{regex:/\b(begin|break|case|do|else|elsif|end|ensure|for|if|in|next|redo|rescue|retry|then|unless|until|when|while)\b/gi,type:"k1"},{regex:/\b((?:__)?[A-Z][A-Z0-9_]+)\b/g,type:"e3"},{regex:/\b(alias|class|defined\?|undef|def|module|return|self|super|yield)\W/gi,type:"k0"},{regex:/\b(and|not|or)\b/gi,type:"k3"},ve.poundComments,{regex:/^=begin[\S\s]*?^=end/gim,type:"c2"},{regex:/(%[iqrswx](\W)(?:[^\2\n\\]|\\.)*\2[iomx]*)/gim,type:"s2",filter:e},{regex:/(%[iqrswx]?(\{(?:[^}\\]|\\.)*}|\[(?:[^}\\]|\\.)*]|\((?:[^)\\]|\\.)*\))[iomx]*)/gim,type:"s2",filter:e},{regex:/\W(\/(?:[^/\\]|\\.)*\/\w*)\W/g,type:"e2"},{regex:/\W\?(?:\w|\\M|\\C)(?:-\w|-\\M|-\\C)*\b/g,type:"n1"},{regex:/[\b\W](-?\d[\d_]+?)(?!\.)\b/g,type:"n1"},{regex:/[\b\W](-?0x[A-F0-9][A-F0-9_]+)\b/gi,type:"n2"},{regex:/[\b\W](-?0b[01][01_]+)\b/gi,type:"n3"},{regex:/[\b\W](-?[\d_]+(?:\.[\d_]+)?(?:e[+-]?\d+)?[ji]?)\b/gi,type:"n0"},ve.brackets]}}]),F),rt=(i(D,Se),Ce(D,[{key:"setupLanguage",value:function(){this.rules=[ve.char,{regex:/r((#+)".*?"\2)/gm,type:"s0"},{regex:/("(?:\\.|\\\s*\n|\\s*\r\n|[^\\"])*")/g,type:"s0"},{regex:/^\s*#.*$/gm,type:"k4"},{regex:/fn\s+([\w]+)\s*(<\w+\s*>)?\(/gm,type:"k0"},{regex:/\b\.?([\w]+)\s*(\(|::)/gm,type:"k1"},{regex:/\b([\w]+)!/gm,type:"k9"},{regex:/\bself\b/gi,type:"k9"},ve.boolean,{regex:/\b(while|loop|in|for|if|else|do|continue|break)\b/g,type:"k1"},{regex:/\b(type|struct|let|enum)\b/g,type:"k2"},{regex:/\b(const)\b/g,type:"k8"},{regex:/\b(yield|where|virtual|use|unsized|unsafe|trait|super|static|return|ref|pure|pub|proc|priv|override|offsetof|mut|move|mod|match|macro|impl|fn|final|extern|crate|box|become|as|alignof|abstract)\b/g,type:"k0"},{regex:/\b(sizeof|typeof)\b/g,type:"k3"},{regex:/\b([0-9_]+\.?[0-9_]+?(e\+[0-9_]+)?)(?:f32|f64)?\b/gim,type:"n0"},{regex:/\b([0-9_]+|0o[0-9_]+|0x[A-F0-9_]+|0b[0-1_]+)(?:u8|i8|u16|i16|u32|i32|u64|i64|isize|usize)?\b/gim,type:"n1"},ve.slashComments,ve.blockComments,{regex:/(?:^|[^\\])\/\/[/!].*$/gm,type:"c2"},{regex:/\/\*[*!][\s\S]*?\*\//gm,type:"c2"},ve.brackets,{regex:/\W(&)\w/g,type:"k3"}]}}]),D),nt=(i(T,Se),Ce(T,[{key:"setupLanguage",value:function(){this.rules=[ve.dqStrings,ve.char,{regex:/s"(?:[^"\\]|\\.)*"/g,type:"s2"},{regex:/`(?:[^`\\]|\\.)*`/g,type:"k7"},{regex:/@[\W\w_][\w]+/g,type:"s9"},{regex:/\b([A-Z]\w*)\b/g,type:"k5"},{regex:/\b(while|try|catch|else|throw|break|if|do|goto|switch|for|match)\b/g,type:"k1"},{regex:/(package|import)(\s+[\w.]+)/gm,type:["k0","k10"]},{regex:/[\b\w\s)](_|:|@|#|<-|←|<:|<%|=|=>|⇒|>:)[\b\w\s]/g,type:"k3"},{regex:/\b(abstract|class|case|extends|final|finally|forSome|implicit|lazy|object|override|private|protected|return|sealed|trait|with|yield)\b/g,type:"k0"},{regex:/\b(def)\s+(\w+)\b/gm,type:["k2","m0"]},{regex:/\b(type)\s+(\w+)\b/gm,type:["k2","k5"]},{regex:/\b(val)\s+(\w+)\b/gm,type:["k2","k7"]},{regex:/\b(var)\s+(\w+)\b/gm,type:["k2","k7"]},{regex:/\b(this|super)\b/g,type:"k9"},{regex:/\b(new)\b/g,type:"k3"},ve.mCalls,ve.fCalls,ve.null,ve.boolean,ve.slashComments,ve.blockComments,ve.docComments,ve.int,ve.floats,ve.bin,ve.brackets]}}]),T),st=(i(R,Pe),Ce(R,[{key:"setupLanguage",value:function(){s(R.prototype.__proto__||Object.getPrototypeOf(R.prototype),"setupLanguage",this).call(this);var e=[ve.slashComments,{regex:/\b([\w-]+)\s*\(/gm,type:"m0"},{regex:/\$[\w-]+\b/g,type:"k7"},{regex:/@[\w-]+\b/g,type:"k9"},{regex:/&/gi,Line truncated
|
||||
Reference in new issue
Block a user