@highlightjs/cdn-assets
Advanced tools
Comparing version 11.0.0-alpha1 to 11.0.0-beta0
hljs.registerLanguage("accesslog",(()=>{"use strict";function e(e){ | ||
return e?"string"==typeof e?e:e.source:null}function n(...n){ | ||
return n.map((n=>e(n))).join("")}function a(...n){ | ||
return"("+n.map((n=>e(n))).join("|")+")"}return e=>{ | ||
const l=["GET","POST","HEAD","PUT","DELETE","CONNECT","OPTIONS","PATCH","TRACE"] | ||
return n.map((n=>e(n))).join("")}function l(...n){return"("+((e=>{ | ||
const n=e[e.length-1] | ||
;return"object"==typeof n&&n.constructor===Object?(e.splice(e.length-1,1),n):{} | ||
})(n).capture?"":"?:")+n.map((n=>e(n))).join("|")+")"}return e=>{ | ||
const a=["GET","POST","HEAD","PUT","DELETE","CONNECT","OPTIONS","PATCH","TRACE"] | ||
;return{name:"Apache Access Log",contains:[{className:"number", | ||
begin:/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}(:\d{1,5})?\b/,relevance:5},{ | ||
className:"number",begin:/\b\d+\b/,relevance:0},{className:"string", | ||
begin:n(/"/,a(...l)),end:/"/,keywords:l,illegal:/\n/,relevance:5,contains:[{ | ||
begin:n(/"/,l(...a)),end:/"/,keywords:a,illegal:/\n/,relevance:5,contains:[{ | ||
begin:/HTTP\/[12]\.\d'/,relevance:5}]},{className:"string", | ||
@@ -11,0 +13,0 @@ begin:/\[\d[^\]\n]{8,}\]/,illegal:/\n/,relevance:1},{className:"string", |
hljs.registerLanguage("applescript",(()=>{"use strict";function e(e){ | ||
return e?"string"==typeof e?e:e.source:null}function t(...t){ | ||
return t.map((t=>e(t))).join("")}function n(...t){ | ||
return"("+t.map((t=>e(t))).join("|")+")"}return e=>{ | ||
return t.map((t=>e(t))).join("")}function n(...t){return"("+((e=>{ | ||
const t=e[e.length-1] | ||
;return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{} | ||
})(t).capture?"":"?:")+t.map((t=>e(t))).join("|")+")"}return e=>{ | ||
const r=e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),i={className:"params", | ||
@@ -6,0 +8,0 @@ begin:/\(/,end:/\)/,contains:["self",e.C_NUMBER_MODE,r] |
hljs.registerLanguage("arduino",(()=>{"use strict";function e(e){ | ||
return t("(",e,")?")}function t(...e){return e.map((e=>{ | ||
return t("(?:",e,")?")}function t(...e){return e.map((e=>{ | ||
return(t=e)?"string"==typeof t?t:t.source:null;var t})).join("")}return r=>{ | ||
@@ -36,6 +36,7 @@ const n=(r=>{const n=r.COMMENT("//","$",{contains:[{begin:/\\\n/}] | ||
returnBegin:!0,contains:[d],relevance:0},{begin:/::/,relevance:0},{begin:/:/, | ||
endsWithParent:!0,contains:[o,l]},{className:"params",begin:/\(/,end:/\)/, | ||
keywords:m,relevance:0,contains:[n,r.C_BLOCK_COMMENT_MODE,o,l,s,{begin:/\(/, | ||
end:/\)/,keywords:m,relevance:0,contains:["self",n,r.C_BLOCK_COMMENT_MODE,o,l,s] | ||
}]},s,n,r.C_BLOCK_COMMENT_MODE,c]};return{name:"C++", | ||
endsWithParent:!0,contains:[o,l]},{relevance:0,match:/,/},{className:"params", | ||
begin:/\(/,end:/\)/,keywords:m,relevance:0, | ||
contains:[n,r.C_BLOCK_COMMENT_MODE,o,l,s,{begin:/\(/,end:/\)/,keywords:m, | ||
relevance:0,contains:["self",n,r.C_BLOCK_COMMENT_MODE,o,l,s]}] | ||
},s,n,r.C_BLOCK_COMMENT_MODE,c]};return{name:"C++", | ||
aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:m,illegal:"</", | ||
@@ -42,0 +43,0 @@ classNameAliases:{"function.dispatch":"built_in"}, |
hljs.registerLanguage("c",(()=>{"use strict";function e(e){ | ||
return((...e)=>e.map((e=>(e=>e?"string"==typeof e?e:e.source:null)(e))).join(""))("(",e,")?") | ||
return((...e)=>e.map((e=>(e=>e?"string"==typeof e?e:e.source:null)(e))).join(""))("(?:",e,")?") | ||
}return n=>{const t=n.COMMENT("//","$",{contains:[{begin:/\\\n/}] | ||
@@ -32,6 +32,6 @@ }),s="[a-zA-Z_]\\w*::",r="(decltype\\(auto\\)|"+e(s)+"[a-zA-Z_]\\w*"+e("<[^<>]+>")+")",a={ | ||
keywords:u,relevance:0},{begin:d,returnBegin:!0,contains:[n.inherit(o,{ | ||
className:"title.function"})],relevance:0},{className:"params",begin:/\(/, | ||
end:/\)/,keywords:u,relevance:0,contains:[t,n.C_BLOCK_COMMENT_MODE,i,l,a,{ | ||
begin:/\(/,end:/\)/,keywords:u,relevance:0, | ||
contains:["self",t,n.C_BLOCK_COMMENT_MODE,i,l,a]}] | ||
className:"title.function"})],relevance:0},{relevance:0,match:/,/},{ | ||
className:"params",begin:/\(/,end:/\)/,keywords:u,relevance:0, | ||
contains:[t,n.C_BLOCK_COMMENT_MODE,i,l,a,{begin:/\(/,end:/\)/,keywords:u, | ||
relevance:0,contains:["self",t,n.C_BLOCK_COMMENT_MODE,i,l,a]}] | ||
},a,t,n.C_BLOCK_COMMENT_MODE,c]};return{name:"C",aliases:["h"],keywords:u, | ||
@@ -38,0 +38,0 @@ disableAutodetect:!0,illegal:"</",contains:[].concat(m,_,g,[c,{ |
hljs.registerLanguage("coffeescript",(()=>{"use strict" | ||
;const e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],n=["true","false","null","undefined","NaN","Infinity"],a=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer","BigInt64Array","BigUint64Array","BigInt"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]) | ||
;return r=>{const t={ | ||
;const e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],n=["true","false","null","undefined","NaN","Infinity"],r=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer","BigInt64Array","BigUint64Array","BigInt"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]) | ||
;return a=>{const t={ | ||
keyword:e.concat(["then","unless","until","loop","by","when","and","or","is","isnt","not"]).filter((i=["var","const","let","function","static"], | ||
e=>!i.includes(e))),literal:n.concat(["yes","no","on","off"]), | ||
built_in:a.concat(["npm","print"])};var i;const s="[A-Za-z$_][0-9A-Za-z$_]*",o={ | ||
built_in:r.concat(["npm","print"])};var i;const s="[A-Za-z$_][0-9A-Za-z$_]*",o={ | ||
className:"subst",begin:/#\{/,end:/\}/,keywords:t | ||
},c=[r.BINARY_NUMBER_MODE,r.inherit(r.C_NUMBER_MODE,{starts:{end:"(\\s*/)?", | ||
},c=[a.BINARY_NUMBER_MODE,a.inherit(a.C_NUMBER_MODE,{starts:{end:"(\\s*/)?", | ||
relevance:0}}),{className:"string",variants:[{begin:/'''/,end:/'''/, | ||
contains:[r.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[r.BACKSLASH_ESCAPE] | ||
},{begin:/"""/,end:/"""/,contains:[r.BACKSLASH_ESCAPE,o]},{begin:/"/,end:/"/, | ||
contains:[r.BACKSLASH_ESCAPE,o]}]},{className:"regexp",variants:[{begin:"///", | ||
end:"///",contains:[o,r.HASH_COMMENT_MODE]},{begin:"//[gim]{0,3}(?=\\W)", | ||
contains:[a.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[a.BACKSLASH_ESCAPE] | ||
},{begin:/"""/,end:/"""/,contains:[a.BACKSLASH_ESCAPE,o]},{begin:/"/,end:/"/, | ||
contains:[a.BACKSLASH_ESCAPE,o]}]},{className:"regexp",variants:[{begin:"///", | ||
end:"///",contains:[o,a.HASH_COMMENT_MODE]},{begin:"//[gim]{0,3}(?=\\W)", | ||
relevance:0},{begin:/\/(?![ *]).*?(?![\\]).\/[gim]{0,3}(?=\W)/}]},{begin:"@"+s | ||
},{subLanguage:"javascript",excludeBegin:!0,excludeEnd:!0,variants:[{ | ||
begin:"```",end:"```"},{begin:"`",end:"`"}]}];o.contains=c | ||
;const l=r.inherit(r.TITLE_MODE,{begin:s}),d="(\\(.*\\)\\s*)?\\B[-=]>",g={ | ||
;const l=a.inherit(a.TITLE_MODE,{begin:s}),d="(\\(.*\\)\\s*)?\\B[-=]>",g={ | ||
className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/, | ||
end:/\)/,keywords:t,contains:["self"].concat(c)}]};return{name:"CoffeeScript", | ||
aliases:["coffee","cson","iced"],keywords:t,illegal:/\/\*/, | ||
contains:[...c,r.COMMENT("###","###"),r.HASH_COMMENT_MODE,{className:"function", | ||
contains:[...c,a.COMMENT("###","###"),a.HASH_COMMENT_MODE,{className:"function", | ||
begin:"^\\s*"+s+"\\s*=\\s*"+d,end:"[-=]>",returnBegin:!0,contains:[l,g]},{ | ||
@@ -23,0 +23,0 @@ begin:/[:\(,=]\s*/,relevance:0,contains:[{className:"function",begin:d, |
hljs.registerLanguage("cpp",(()=>{"use strict";function e(e){ | ||
return t("(",e,")?")}function t(...e){return e.map((e=>{ | ||
return t("(?:",e,")?")}function t(...e){return e.map((e=>{ | ||
return(t=e)?"string"==typeof t?t:t.source:null;var t})).join("")}return n=>{ | ||
@@ -36,6 +36,7 @@ const r=n.COMMENT("//","$",{contains:[{begin:/\\\n/}] | ||
returnBegin:!0,contains:[d],relevance:0},{begin:/::/,relevance:0},{begin:/:/, | ||
endsWithParent:!0,contains:[c,o]},{className:"params",begin:/\(/,end:/\)/, | ||
keywords:m,relevance:0,contains:[r,n.C_BLOCK_COMMENT_MODE,c,o,s,{begin:/\(/, | ||
end:/\)/,keywords:m,relevance:0,contains:["self",r,n.C_BLOCK_COMMENT_MODE,c,o,s] | ||
}]},s,r,n.C_BLOCK_COMMENT_MODE,l]};return{name:"C++", | ||
endsWithParent:!0,contains:[c,o]},{relevance:0,match:/,/},{className:"params", | ||
begin:/\(/,end:/\)/,keywords:m,relevance:0, | ||
contains:[r,n.C_BLOCK_COMMENT_MODE,c,o,s,{begin:/\(/,end:/\)/,keywords:m, | ||
relevance:0,contains:["self",r,n.C_BLOCK_COMMENT_MODE,c,o,s]}] | ||
},s,r,n.C_BLOCK_COMMENT_MODE,l]};return{name:"C++", | ||
aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:m,illegal:"</", | ||
@@ -42,0 +43,0 @@ classNameAliases:{"function.dispatch":"built_in"}, |
hljs.registerLanguage("diff",(()=>{"use strict";function e(...e){ | ||
return"("+e.map((e=>{return(n=e)?"string"==typeof n?n:n.source:null;var n | ||
})).join("|")+")"}return n=>({name:"Diff",aliases:["patch"],contains:[{ | ||
return"("+((e=>{const n=e[e.length-1] | ||
;return"object"==typeof n&&n.constructor===Object?(e.splice(e.length-1,1),n):{} | ||
})(e).capture?"":"?:")+e.map((e=>{return(n=e)?"string"==typeof n?n:n.source:null | ||
;var n})).join("|")+")"}return n=>({name:"Diff",aliases:["patch"],contains:[{ | ||
className:"meta",relevance:10, | ||
@@ -5,0 +7,0 @@ match:e(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/) |
@@ -1,5 +0,5 @@ | ||
hljs.registerLanguage("dts",(()=>{"use strict";return e=>{const n={ | ||
hljs.registerLanguage("dts",(()=>{"use strict";return e=>{const a={ | ||
className:"string",variants:[e.inherit(e.QUOTE_STRING_MODE,{ | ||
begin:'((u8?|U)|L)?"'}),{begin:'(u8?|U)?R"',end:'"', | ||
contains:[e.BACKSLASH_ESCAPE]},{begin:"'\\\\?.",end:"'",illegal:"."}]},a={ | ||
contains:[e.BACKSLASH_ESCAPE]},{begin:"'\\\\?.",end:"'",illegal:"."}]},n={ | ||
className:"number",variants:[{ | ||
@@ -10,13 +10,14 @@ begin:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},{begin:e.C_NUMBER_RE}], | ||
begin:/\\\n/,relevance:0},{beginKeywords:"include",end:"$",keywords:{ | ||
"meta-keyword":"include"},contains:[e.inherit(n,{className:"meta-string"}),{ | ||
"meta-keyword":"include"},contains:[e.inherit(a,{className:"meta-string"}),{ | ||
className:"meta-string",begin:"<",end:">",illegal:"\\n"}] | ||
},n,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},i={className:"variable", | ||
begin:/&[a-z\d_]*\b/},d={className:"meta-keyword",begin:"/[a-z][a-z\\d-]*/"},l={ | ||
className:"symbol",begin:"^\\s*[a-zA-Z_][a-zA-Z\\d_]*:"},r={className:"params", | ||
begin:"<",end:">",contains:[a,i]},_={className:"class", | ||
begin:/[a-zA-Z_][a-zA-Z\d_@]*\s\{/,end:/[{;=]/,returnBegin:!0,excludeEnd:!0} | ||
;return{name:"Device Tree",keywords:"",contains:[{className:"class", | ||
begin:"/\\s*\\{",end:/\};/,relevance:10, | ||
contains:[i,d,l,_,r,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,n] | ||
},i,d,l,_,r,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,n,s,{ | ||
begin:e.IDENT_RE+"::",keywords:""}]}}})()); | ||
},a,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},i={className:"variable", | ||
begin:/&[a-z\d_]*\b/};return{name:"Device Tree",contains:[{ | ||
className:"title.class",begin:/^\/(?=\s*\{)/,relevance:10},i,{className:"meta", | ||
begin:"/[a-z][a-z\\d-]*/"},{className:"symbol", | ||
begin:"^\\s*[a-zA-Z_][a-zA-Z\\d_]*:"},{className:"title.class", | ||
begin:/[a-zA-Z_][a-zA-Z\d_@-]*(?=\s\{)/},{relevance:0, | ||
match:[/[a-z][a-z-,]+/,/\s*/,/=/],scope:{1:"attr",3:"operator"}},{ | ||
match:/[a-z][a-z-,]+(?=;)/,relevance:0,scope:"attr"},{className:"params", | ||
relevance:0,begin:"<",end:">",contains:[n,i] | ||
},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,a,s,{scope:"punctuation", | ||
relevance:0,match:/\};|[;{}]/},{begin:e.IDENT_RE+"::",keywords:""}]}}})()); |
@@ -14,3 +14,3 @@ hljs.registerLanguage("gams",(()=>{"use strict";function e(...e){ | ||
endsWithParent:!0,contains:[s,o,{className:"comment", | ||
begin:e(t,(l=e(/[ ]+/,t),e("(",l,")*"))),relevance:0}]};var l;return{ | ||
begin:e(t,(l=e(/[ ]+/,t),e("(?:",l,")*"))),relevance:0}]};var l;return{ | ||
name:"GAMS",aliases:["gms"],case_insensitive:!0,keywords:a, | ||
@@ -17,0 +17,0 @@ contains:[n.COMMENT(/^\$ontext/,/^\$offtext/),{className:"meta", |
hljs.registerLanguage("haml",(()=>{"use strict";return e=>({name:"HAML", | ||
case_insensitive:!0,contains:[{className:"meta", | ||
begin:"^!!!( (5|1\\.1|Strict|Frameset|Basic|Mobile|RDFa|XML\\b.*))?$", | ||
relevance:10},e.COMMENT("^\\s*(!=#|=#|-#|/).*$",!1,{relevance:0}),{ | ||
begin:"^\\s*(-|=|!=)(?!#)",starts:{end:"\\n",subLanguage:"ruby"}},{ | ||
className:"tag",begin:"^\\s*%",contains:[{className:"selector-tag",begin:"\\w+" | ||
},{className:"selector-id",begin:"#[\\w-]+"},{className:"selector-class", | ||
begin:"\\.[\\w-]+"},{begin:/\{\s*/,end:/\s*\}/,contains:[{begin:":\\w+\\s*=>", | ||
end:",\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"attr", | ||
begin:":\\w+"},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{begin:"\\w+",relevance:0 | ||
}]}]},{begin:"\\(\\s*",end:"\\s*\\)",excludeEnd:!0,contains:[{begin:"\\w+\\s*=", | ||
relevance:10},e.COMMENT("^\\s*(!=#|=#|-#|/).*$",null,{relevance:0}),{ | ||
begin:"^\\s*(-|=|!=)(?!#)",end:/$/,subLanguage:"ruby",excludeBegin:!0, | ||
excludeEnd:!0},{className:"tag",begin:"^\\s*%",contains:[{ | ||
className:"selector-tag",begin:"\\w+"},{className:"selector-id",begin:"#[\\w-]+" | ||
},{className:"selector-class",begin:"\\.[\\w-]+"},{begin:/\{\s*/,end:/\s*\}/, | ||
contains:[{begin:":\\w+\\s*=>",end:",\\s+",returnBegin:!0,endsWithParent:!0, | ||
contains:[{className:"attr",begin:":\\w+" | ||
},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{begin:"\\w+",relevance:0}]}]},{ | ||
begin:"\\(\\s*",end:"\\s*\\)",excludeEnd:!0,contains:[{begin:"\\w+\\s*=", | ||
end:"\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"attr", | ||
begin:"\\w+",relevance:0},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{begin:"\\w+", | ||
relevance:0}]}]}]},{begin:"^\\s*[=~]\\s*"},{begin:/#\{/,starts:{end:/\}/, | ||
subLanguage:"ruby"}}]})})()); | ||
relevance:0}]}]}]},{begin:"^\\s*[=~]\\s*"},{begin:/#\{/,end:/\}/, | ||
subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0}]})})()); |
hljs.registerLanguage("handlebars",(()=>{"use strict";function e(e){ | ||
return e?"string"==typeof e?e:e.source:null}function n(...n){ | ||
return n.map((n=>e(n))).join("")}return a=>{const t={$pattern:/[\w.\/]+/, | ||
return n.map((n=>e(n))).join("")}return t=>{const a={$pattern:/[\w.\/]+/, | ||
built_in:["action","bindattr","collection","component","concat","debugger","each","each-in","get","hash","if","in","input","link-to","loc","log","lookup","mut","outlet","partial","query-params","render","template","textarea","unbound","unless","view","with","yield"] | ||
},s=/\[\]|\[[^\]]+\]/,i=/[^\s!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~]+/,r=((...n)=>"("+n.map((n=>e(n))).join("|")+")")(/""|"[^"]+"/,/''|'[^']+'/,s,i),l=n(n("(",/\.|\.\/|\//,")?"),r,(h=n(/(\.|\/)/,r), | ||
n("(",h,")*"))),c=n("(",s,"|",i,")(?==)"),o={begin:l},m=a.inherit(o,{keywords:{ | ||
$pattern:/[\w.\/]+/,literal:["true","false","undefined","null"]}}),d={ | ||
},s=/\[\]|\[[^\]]+\]/,i=/[^\s!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~]+/,r=function(...n){ | ||
return"("+((e=>{const n=e[e.length-1] | ||
;return"object"==typeof n&&n.constructor===Object?(e.splice(e.length-1,1),n):{} | ||
})(n).capture?"":"?:")+n.map((n=>e(n))).join("|")+")" | ||
}(/""|"[^"]+"/,/''|'[^']+'/,s,i),l=n(n("(?:",/\.|\.\/|\//,")?"),r,(p=n(/(\.|\/)/,r), | ||
n("(?:",p,")*"))),c=n("(",s,"|",i,")(?==)"),o={begin:l},m=t.inherit(o,{ | ||
keywords:{$pattern:/[\w.\/]+/,literal:["true","false","undefined","null"]}}),d={ | ||
begin:/\(/,end:/\)/},g={className:"attr",begin:c,relevance:0,starts:{begin:/=/, | ||
end:/=/,starts:{ | ||
contains:[a.NUMBER_MODE,a.QUOTE_STRING_MODE,a.APOS_STRING_MODE,m,d]}}},b={ | ||
contains:[a.NUMBER_MODE,a.QUOTE_STRING_MODE,a.APOS_STRING_MODE,{begin:/as\s+\|/, | ||
contains:[t.NUMBER_MODE,t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,m,d]}}},u={ | ||
contains:[t.NUMBER_MODE,t.QUOTE_STRING_MODE,t.APOS_STRING_MODE,{begin:/as\s+\|/, | ||
keywords:{keyword:"as"},end:/\|/,contains:[{begin:/\w+/}]},g,m,d],returnEnd:!0 | ||
},u=a.inherit(o,{className:"name",keywords:t,starts:a.inherit(b,{end:/\)/})}) | ||
;var h;d.contains=[u];const p=a.inherit(o,{keywords:t,className:"name", | ||
starts:a.inherit(b,{end:/\}\}/})}),N=a.inherit(o,{keywords:t,className:"name" | ||
}),w=a.inherit(o,{className:"name",keywords:t,starts:a.inherit(b,{end:/\}\}/})}) | ||
},b=t.inherit(o,{className:"name",keywords:a,starts:t.inherit(u,{end:/\)/})}) | ||
;var p;d.contains=[b];const h=t.inherit(o,{keywords:a,className:"name", | ||
starts:t.inherit(u,{end:/\}\}/})}),N=t.inherit(o,{keywords:a,className:"name" | ||
}),w=t.inherit(o,{className:"name",keywords:a,starts:t.inherit(u,{end:/\}\}/})}) | ||
;return{name:"Handlebars", | ||
aliases:["hbs","html.hbs","html.handlebars","htmlbars"],case_insensitive:!0, | ||
subLanguage:"xml",contains:[{begin:/\\\{\{/,skip:!0},{begin:/\\\\(?=\{\{)/, | ||
skip:!0},a.COMMENT(/\{\{!--/,/--\}\}/),a.COMMENT(/\{\{!/,/\}\}/),{ | ||
className:"template-tag",begin:/\{\{\{\{(?!\/)/,end:/\}\}\}\}/,contains:[p], | ||
skip:!0},t.COMMENT(/\{\{!--/,/--\}\}/),t.COMMENT(/\{\{!/,/\}\}/),{ | ||
className:"template-tag",begin:/\{\{\{\{(?!\/)/,end:/\}\}\}\}/,contains:[h], | ||
starts:{end:/\{\{\{\{\//,returnEnd:!0,subLanguage:"xml"}},{ | ||
className:"template-tag",begin:/\{\{\{\{\//,end:/\}\}\}\}/,contains:[N]},{ | ||
className:"template-tag",begin:/\{\{#/,end:/\}\}/,contains:[p]},{ | ||
className:"template-tag",begin:/\{\{#/,end:/\}\}/,contains:[h]},{ | ||
className:"template-tag",begin:/\{\{(?=else\}\})/,end:/\}\}/,keywords:"else"},{ | ||
@@ -26,0 +30,0 @@ className:"template-tag",begin:/\{\{(?=else if)/,end:/\}\}/,keywords:"else if" |
@@ -5,13 +5,15 @@ hljs.registerLanguage("ini",(()=>{"use strict";function e(e){ | ||
relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:s.NUMBER_RE}] | ||
},i=s.COMMENT();i.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const t={ | ||
},t=s.COMMENT();t.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const i={ | ||
className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/ | ||
}]},r={className:"literal",begin:/\bon|off|true|false|yes|no\b/},l={ | ||
}]},r={className:"literal",begin:/\bon|off|true|false|yes|no\b/},c={ | ||
className:"string",contains:[s.BACKSLASH_ESCAPE],variants:[{begin:"'''", | ||
end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"' | ||
},{begin:"'",end:"'"}]},c={begin:/\[/,end:/\]/,contains:[i,r,t,l,a,"self"], | ||
relevance:0 | ||
},g="("+[/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/].map((n=>e(n))).join("|")+")" | ||
;return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/, | ||
contains:[i,{className:"section",begin:/\[+/,end:/\]+/},{ | ||
begin:n(g,"(\\s*\\.\\s*",g,")*",n("(?=",/\s*=\s*[^#\s]/,")")),className:"attr", | ||
starts:{end:/$/,contains:[i,c,r,t,l,a]}}]}}})()); | ||
},{begin:"'",end:"'"}]},l={begin:/\[/,end:/\]/,contains:[t,r,i,c,a,"self"], | ||
relevance:0},o=function(...n){return"("+((e=>{const n=e[e.length-1] | ||
;return"object"==typeof n&&n.constructor===Object?(e.splice(e.length-1,1),n):{} | ||
})(n).capture?"":"?:")+n.map((n=>e(n))).join("|")+")" | ||
}(/[A-Za-z0-9_-]+/,/"(\\"|[^"])*"/,/'[^']*'/);return{name:"TOML, also INI", | ||
aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[t,{ | ||
className:"section",begin:/\[+/,end:/\]+/},{ | ||
begin:n(o,"(\\s*\\.\\s*",o,")*",n("(?=",/\s*=\s*[^#\s]/,")")),className:"attr", | ||
starts:{end:/$/,contains:[t,l,r,i,c,a]}}]}}})()); |
hljs.registerLanguage("javascript",(()=>{"use strict" | ||
;const e="[A-Za-z$_][0-9A-Za-z$_]*",n=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],a=["true","false","null","undefined","NaN","Infinity"],s=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer","BigInt64Array","BigUint64Array","BigInt"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]) | ||
;function r(e){return t("(?=",e,")")}function t(...e){return e.map((e=>{ | ||
return(n=e)?"string"==typeof n?n:n.source:null;var n})).join("")}return i=>{ | ||
const c=e,o={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/, | ||
isTrulyOpeningTag:(e,n)=>{const a=e[0].length+e.index,s=e.input[a] | ||
;"<"!==s?">"===s&&(((e,{after:n})=>{const a="</"+e[0].slice(1) | ||
;const e="[A-Za-z$_][0-9A-Za-z$_]*",n=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],a=["true","false","null","undefined","NaN","Infinity"],t=["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer","BigInt64Array","BigUint64Array","BigInt"],s=["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],r=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],i=["arguments","this","super","console","window","document","localStorage","module","global"],c=[].concat(r,t,s) | ||
;function o(e){return l("(?=",e,")")}function l(...e){return e.map((e=>{ | ||
return(n=e)?"string"==typeof n?n:n.source:null;var n})).join("")}return b=>{ | ||
const g=e,d={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/, | ||
isTrulyOpeningTag:(e,n)=>{const a=e[0].length+e.index,t=e.input[a] | ||
;"<"!==t?">"===t&&(((e,{after:n})=>{const a="</"+e[0].slice(1) | ||
;return-1!==e.input.indexOf(a,n)})(e,{after:a | ||
})||n.ignoreMatch()):n.ignoreMatch()}},l={$pattern:e,keyword:n,literal:a, | ||
built_in:s},g="\\.([0-9](_?[0-9])*)",b="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",d={ | ||
})||n.ignoreMatch()):n.ignoreMatch()}},u={$pattern:e,keyword:n,literal:a, | ||
built_in:c,"variable.language":i | ||
},m="\\.([0-9](_?[0-9])*)",E="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",y={ | ||
className:"number",variants:[{ | ||
begin:`(\\b(${b})((${g})|\\.)?|(${g}))[eE][+-]?([0-9](_?[0-9])*)\\b`},{ | ||
begin:`\\b(${b})\\b((${g})\\b|\\.)?|(${g})\\b`},{ | ||
begin:`(\\b(${E})((${m})|\\.)?|(${m}))[eE][+-]?([0-9](_?[0-9])*)\\b`},{ | ||
begin:`\\b(${E})\\b((${m})\\b|\\.)?|(${m})\\b`},{ | ||
begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{ | ||
begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{ | ||
begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{ | ||
begin:"\\b0[0-7]+n?\\b"}],relevance:0},E={className:"subst",begin:"\\$\\{", | ||
end:"\\}",keywords:l,contains:[]},u={begin:"html`",end:"",starts:{end:"`", | ||
returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,E],subLanguage:"xml"}},_={ | ||
begin:"\\b0[0-7]+n?\\b"}],relevance:0},_={className:"subst",begin:"\\$\\{", | ||
end:"\\}",keywords:u,contains:[]},N={begin:"html`",end:"",starts:{end:"`", | ||
returnEnd:!1,contains:[b.BACKSLASH_ESCAPE,_],subLanguage:"xml"}},f={ | ||
begin:"css`",end:"",starts:{end:"`",returnEnd:!1, | ||
contains:[i.BACKSLASH_ESCAPE,E],subLanguage:"css"}},y={className:"string", | ||
begin:"`",end:"`",contains:[i.BACKSLASH_ESCAPE,E]},m={className:"comment", | ||
variants:[i.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{ | ||
className:"doctag",begin:"@[A-Za-z]+",contains:[{className:"type",begin:"\\{", | ||
end:"\\}",relevance:0},{className:"variable",begin:c+"(?=\\s*(-)|$)", | ||
contains:[b.BACKSLASH_ESCAPE,_],subLanguage:"css"}},A={className:"string", | ||
begin:"`",end:"`",contains:[b.BACKSLASH_ESCAPE,_]},v={className:"comment", | ||
variants:[b.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{ | ||
begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag", | ||
begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0, | ||
excludeBegin:!0,relevance:0},{className:"variable",begin:g+"(?=\\s*(-)|$)", | ||
endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}] | ||
}),i.C_BLOCK_COMMENT_MODE,i.C_LINE_COMMENT_MODE] | ||
},N=[i.APOS_STRING_MODE,i.QUOTE_STRING_MODE,u,_,y,d,i.REGEXP_MODE] | ||
;E.contains=N.concat({begin:/\{/,end:/\}/,keywords:l,contains:["self"].concat(N) | ||
});const A=[].concat(m,E.contains),p=A.concat([{begin:/\(/,end:/\)/,keywords:l, | ||
contains:["self"].concat(A)}]),f={className:"params",begin:/\(/,end:/\)/, | ||
excludeBegin:!0,excludeEnd:!0,keywords:l,contains:p};return{name:"Javascript", | ||
aliases:["js","jsx","mjs","cjs"],keywords:l,exports:{PARAMS_CONTAINS:p}, | ||
illegal:/#(?![$_A-z])/,contains:[i.SHEBANG({label:"shebang",binary:"node", | ||
}),b.C_BLOCK_COMMENT_MODE,b.C_LINE_COMMENT_MODE] | ||
},p=[b.APOS_STRING_MODE,b.QUOTE_STRING_MODE,N,f,A,y,b.REGEXP_MODE] | ||
;_.contains=p.concat({begin:/\{/,end:/\}/,keywords:u,contains:["self"].concat(p) | ||
});const h=[].concat(v,_.contains),S=h.concat([{begin:/\(/,end:/\)/,keywords:u, | ||
contains:["self"].concat(h)}]),w={className:"params",begin:/\(/,end:/\)/, | ||
excludeBegin:!0,excludeEnd:!0,keywords:u,contains:S},R={variants:[{ | ||
match:[/class/,/\s+/,g],scope:{1:"keyword",3:"title.class"}},{ | ||
match:[/extends/,/\s+/,l(g,"(",l(/\./,g),")*")],scope:{1:"keyword", | ||
3:"title.class.inherited"}}]},O={relevance:0, | ||
match:/\b[A-Z][a-z]+([A-Z][a-z]+)*/,className:"title.class",keywords:{ | ||
_:[...t,...s]}},I={variants:[{match:[/function/,/\s+/,g,/(?=\s*\()/]},{ | ||
match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"}, | ||
label:"func.def",contains:[w],illegal:/%/},T={ | ||
match:l(/\b/,(x=[...r,"super"],l("(?!",x.join("|"),")")),g,o(/\(/)), | ||
className:"title.function",relevance:0};var x;const M={ | ||
begin:l(/\./,o(l(g,/(?![0-9A-Za-z$_(])/))),end:g,excludeBegin:!0, | ||
keywords:"prototype",className:"property",relevance:0},k={ | ||
match:[/get|set/,/\s+/,g,/(?=\()/],className:{1:"keyword",3:"title.function"}, | ||
contains:[{begin:/\(\)/},w] | ||
},C="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+b.UNDERSCORE_IDENT_RE+")\\s*=>",B={ | ||
match:[/const|var|let/,/\s+/,g,/\s*/,/=\s*/,o(C)],className:{1:"keyword", | ||
3:"title.function"},contains:[w]};return{name:"Javascript", | ||
aliases:["js","jsx","mjs","cjs"],keywords:u,exports:{PARAMS_CONTAINS:S}, | ||
illegal:/#(?![$_A-z])/,contains:[b.SHEBANG({label:"shebang",binary:"node", | ||
relevance:5}),{label:"use_strict",className:"meta",relevance:10, | ||
begin:/^\s*['"]use (strict|asm)['"]/ | ||
},i.APOS_STRING_MODE,i.QUOTE_STRING_MODE,u,_,y,m,d,{ | ||
begin:t(/[{,\n]\s*/,r(t(/(((\/\/.*$)|(\/\*(\*[^/]|[^*])*\*\/))\s*)*/,c+"\\s*:"))), | ||
relevance:0,contains:[{className:"attr",begin:c+r("\\s*:"),relevance:0}]},{ | ||
begin:"("+i.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*", | ||
keywords:"return throw case",contains:[m,i.REGEXP_MODE,{className:"function", | ||
begin:"(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+i.UNDERSCORE_IDENT_RE+")\\s*=>", | ||
returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{ | ||
begin:i.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0 | ||
},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:p}]}] | ||
},{begin:/,/,relevance:0},{className:"",begin:/\s/,end:/\s*/,skip:!0},{ | ||
variants:[{begin:"<>",end:"</>"},{begin:o.begin,"on:begin":o.isTrulyOpeningTag, | ||
end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0, | ||
contains:["self"]}]}],relevance:0},{className:"function", | ||
beginKeywords:"function",end:/[{;]/,excludeEnd:!0,keywords:l, | ||
contains:["self",i.inherit(i.TITLE_MODE,{begin:c}),f],illegal:/%/},{ | ||
beginKeywords:"while if switch catch for"},{className:"function", | ||
begin:i.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{", | ||
returnBegin:!0,contains:[f,i.inherit(i.TITLE_MODE,{begin:c})]},{begin:/\.\.\./, | ||
relevance:0},{begin:t(/\./,r(c)),end:c,excludeBegin:!0,keywords:"prototype", | ||
className:"property",relevance:0},{variants:[{begin:"\\."+c},{begin:"\\$"+c}], | ||
relevance:0},{className:"class",beginKeywords:"class",end:/[{;=]/,excludeEnd:!0, | ||
illegal:/[:"[\]]/,contains:[{beginKeywords:"extends"},i.UNDERSCORE_TITLE_MODE] | ||
},{begin:/\b(?=constructor)/,end:/[{;]/,excludeEnd:!0, | ||
contains:[i.inherit(i.TITLE_MODE,{begin:c}),"self",f]},{ | ||
begin:"(get|set)\\s+(?="+c+"\\()",end:/\{/,keywords:"get set", | ||
contains:[i.inherit(i.TITLE_MODE,{begin:c}),{begin:/\(\)/},f]},{begin:/\$[(.]/}] | ||
}}})()); | ||
},b.APOS_STRING_MODE,b.QUOTE_STRING_MODE,N,f,A,v,y,O,{className:"attr", | ||
begin:g+o(":"),relevance:0},B,{ | ||
begin:"("+b.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*", | ||
keywords:"return throw case",relevance:0,contains:[v,b.REGEXP_MODE,{ | ||
className:"function",begin:C,returnBegin:!0,end:"\\s*=>",contains:[{ | ||
className:"params",variants:[{begin:b.UNDERSCORE_IDENT_RE,relevance:0},{ | ||
className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0, | ||
excludeEnd:!0,keywords:u,contains:S}]}]},{begin:/,/,relevance:0},{match:/\s+/, | ||
relevance:0},{variants:[{begin:"<>",end:"</>"},{begin:d.begin, | ||
"on:begin":d.isTrulyOpeningTag,end:d.end}],subLanguage:"xml",contains:[{ | ||
begin:d.begin,end:d.end,skip:!0,contains:["self"]}]}]},I,{ | ||
beginKeywords:"while if switch catch for"},{ | ||
begin:"\\b(?!function)"+b.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{", | ||
returnBegin:!0,label:"func.def",contains:[w,b.inherit(b.TITLE_MODE,{begin:g, | ||
className:"title.function"})]},{match:/\.\.\./,relevance:0},M,{match:"\\$"+g, | ||
relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"}, | ||
contains:[w]},T,{relevance:0,match:/\b[A-Z][A-Z_]+\b/, | ||
className:"variable.constant"},R,k,{match:/\$[(.]/}]}}})()); |
@@ -1,33 +0,35 @@ | ||
hljs.registerLanguage("latex",(()=>{"use strict";return e=>{const n=[{ | ||
begin:/\^{6}[0-9a-f]{6}/},{begin:/\^{5}[0-9a-f]{5}/},{begin:/\^{4}[0-9a-f]{4}/ | ||
},{begin:/\^{3}[0-9a-f]{3}/},{begin:/\^{2}[0-9a-f]{2}/},{ | ||
begin:/\^{2}[\u0000-\u007f]/}],a=[{className:"keyword",begin:/\\/,relevance:0, | ||
contains:[{endsParent:!0,begin:((...e)=>"("+e.map((e=>{ | ||
return(n=e)?"string"==typeof n?n:n.source:null;var n | ||
})).join("|")+")")(...["(?:NeedsTeXFormat|RequirePackage|GetIdInfo)","Provides(?:Expl)?(?:Package|Class|File)","(?:DeclareOption|ProcessOptions)","(?:documentclass|usepackage|input|include)","makeat(?:letter|other)","ExplSyntax(?:On|Off)","(?:new|renew|provide)?command","(?:re)newenvironment","(?:New|Renew|Provide|Declare)(?:Expandable)?DocumentCommand","(?:New|Renew|Provide|Declare)DocumentEnvironment","(?:(?:e|g|x)?def|let)","(?:begin|end)","(?:part|chapter|(?:sub){0,2}section|(?:sub)?paragraph)","caption","(?:label|(?:eq|page|name)?ref|(?:paren|foot|super)?cite)","(?:alpha|beta|[Gg]amma|[Dd]elta|(?:var)?epsilon|zeta|eta|[Tt]heta|vartheta)","(?:iota|(?:var)?kappa|[Ll]ambda|mu|nu|[Xx]i|[Pp]i|varpi|(?:var)rho)","(?:[Ss]igma|varsigma|tau|[Uu]psilon|[Pp]hi|varphi|chi|[Pp]si|[Oo]mega)","(?:frac|sum|prod|lim|infty|times|sqrt|leq|geq|left|right|middle|[bB]igg?)","(?:[lr]angle|q?quad|[lcvdi]?dots|d?dot|hat|tilde|bar)"].map((e=>e+"(?![a-zA-Z@:_])"))) | ||
hljs.registerLanguage("latex",(()=>{"use strict";function e(...e){ | ||
return"("+((e=>{const n=e[e.length-1] | ||
;return"object"==typeof n&&n.constructor===Object?(e.splice(e.length-1,1),n):{} | ||
})(e).capture?"":"?:")+e.map((e=>{return(n=e)?"string"==typeof n?n:n.source:null | ||
;var n})).join("|")+")"}return n=>{const a=[{begin:/\^{6}[0-9a-f]{6}/},{ | ||
begin:/\^{5}[0-9a-f]{5}/},{begin:/\^{4}[0-9a-f]{4}/},{begin:/\^{3}[0-9a-f]{3}/ | ||
},{begin:/\^{2}[0-9a-f]{2}/},{begin:/\^{2}[\u0000-\u007f]/}],t=[{ | ||
className:"keyword",begin:/\\/,relevance:0,contains:[{endsParent:!0, | ||
begin:e(...["(?:NeedsTeXFormat|RequirePackage|GetIdInfo)","Provides(?:Expl)?(?:Package|Class|File)","(?:DeclareOption|ProcessOptions)","(?:documentclass|usepackage|input|include)","makeat(?:letter|other)","ExplSyntax(?:On|Off)","(?:new|renew|provide)?command","(?:re)newenvironment","(?:New|Renew|Provide|Declare)(?:Expandable)?DocumentCommand","(?:New|Renew|Provide|Declare)DocumentEnvironment","(?:(?:e|g|x)?def|let)","(?:begin|end)","(?:part|chapter|(?:sub){0,2}section|(?:sub)?paragraph)","caption","(?:label|(?:eq|page|name)?ref|(?:paren|foot|super)?cite)","(?:alpha|beta|[Gg]amma|[Dd]elta|(?:var)?epsilon|zeta|eta|[Tt]heta|vartheta)","(?:iota|(?:var)?kappa|[Ll]ambda|mu|nu|[Xx]i|[Pp]i|varpi|(?:var)rho)","(?:[Ss]igma|varsigma|tau|[Uu]psilon|[Pp]hi|varphi|chi|[Pp]si|[Oo]mega)","(?:frac|sum|prod|lim|infty|times|sqrt|leq|geq|left|right|middle|[bB]igg?)","(?:[lr]angle|q?quad|[lcvdi]?dots|d?dot|hat|tilde|bar)"].map((e=>e+"(?![a-zA-Z@:_])"))) | ||
},{endsParent:!0, | ||
begin:RegExp(["(?:__)?[a-zA-Z]{2,}_[a-zA-Z](?:_?[a-zA-Z])+:[a-zA-Z]*","[lgc]__?[a-zA-Z](?:_?[a-zA-Z])*_[a-zA-Z]{2,}","[qs]__?[a-zA-Z](?:_?[a-zA-Z])+","use(?:_i)?:[a-zA-Z]*","(?:else|fi|or):","(?:if|cs|exp):w","(?:hbox|vbox):n","::[a-zA-Z]_unbraced","::[a-zA-Z:]"].map((e=>e+"(?![a-zA-Z:_])")).join("|")) | ||
},{endsParent:!0,variants:n},{endsParent:!0,relevance:0,variants:[{ | ||
},{endsParent:!0,variants:a},{endsParent:!0,relevance:0,variants:[{ | ||
begin:/[a-zA-Z@]+/},{begin:/[^a-zA-Z@]?/}]}]},{className:"params",relevance:0, | ||
begin:/#+\d?/},{variants:n},{className:"built_in",relevance:0,begin:/[$&^_]/},{ | ||
className:"meta",begin:"% !TeX",end:"$",relevance:10},e.COMMENT("%","$",{ | ||
relevance:0})],i={begin:/\{/,end:/\}/,relevance:0,contains:["self",...a] | ||
},t=e.inherit(i,{relevance:0,endsParent:!0,contains:[i,...a]}),r={begin:/\[/, | ||
end:/\]/,endsParent:!0,relevance:0,contains:[i,...a]},s={begin:/\s+/,relevance:0 | ||
},c=[t],l=[r],o=(e,n)=>({contains:[s],starts:{relevance:0,contains:e,starts:n} | ||
}),d=(e,n)=>({begin:"\\\\"+e+"(?![a-zA-Z@:_])",keywords:{$pattern:/\\[a-zA-Z]+/, | ||
keyword:"\\"+e},relevance:0,contains:[s],starts:n}),g=(n,a)=>e.inherit({ | ||
begin:"\\\\begin(?=[ \t]*(\\r?\\n[ \t]*)?\\{"+n+"\\})",keywords:{ | ||
begin:/#+\d?/},{variants:a},{className:"built_in",relevance:0,begin:/[$&^_]/},{ | ||
className:"meta",begin:"% !TeX",end:"$",relevance:10},n.COMMENT("%","$",{ | ||
relevance:0})],i={begin:/\{/,end:/\}/,relevance:0,contains:["self",...t] | ||
},r=n.inherit(i,{relevance:0,endsParent:!0,contains:[i,...t]}),s={begin:/\[/, | ||
end:/\]/,endsParent:!0,relevance:0,contains:[i,...t]},c={begin:/\s+/,relevance:0 | ||
},l=[r],o=[s],d=(e,n)=>({contains:[c],starts:{relevance:0,contains:e,starts:n} | ||
}),g=(e,n)=>({begin:"\\\\"+e+"(?![a-zA-Z@:_])",keywords:{$pattern:/\\[a-zA-Z]+/, | ||
keyword:"\\"+e},relevance:0,contains:[c],starts:n}),m=(e,a)=>n.inherit({ | ||
begin:"\\\\begin(?=[ \t]*(\\r?\\n[ \t]*)?\\{"+e+"\\})",keywords:{ | ||
$pattern:/\\[a-zA-Z]+/,keyword:"\\begin"},relevance:0 | ||
},o(c,a)),m=(n="string")=>e.END_SAME_AS_BEGIN({className:n,begin:/(.|\r?\n)/, | ||
end:/(.|\r?\n)/,excludeBegin:!0,excludeEnd:!0,endsParent:!0}),b=e=>({ | ||
className:"string",end:"(?=\\\\end\\{"+e+"\\})"}),p=(e="string")=>({relevance:0, | ||
},d(l,a)),b=(e="string")=>n.END_SAME_AS_BEGIN({className:e,begin:/(.|\r?\n)/, | ||
end:/(.|\r?\n)/,excludeBegin:!0,excludeEnd:!0,endsParent:!0}),p=e=>({ | ||
className:"string",end:"(?=\\\\end\\{"+e+"\\})"}),v=(e="string")=>({relevance:0, | ||
begin:/\{/,starts:{endsParent:!0,contains:[{className:e,end:/(?=\})/, | ||
endsParent:!0,contains:[{begin:/\{/,end:/\}/,relevance:0,contains:["self"]}]}]} | ||
});return{name:"LaTeX",aliases:["tex"], | ||
contains:[...["verb","lstinline"].map((e=>d(e,{contains:[m()]}))),d("mint",o(c,{ | ||
contains:[m()]})),d("mintinline",o(c,{contains:[p(),m()]})),d("url",{ | ||
contains:[p("link"),p("link")]}),d("hyperref",{contains:[p("link")] | ||
}),d("href",o(l,{contains:[p("link")] | ||
})),...[].concat(...["","\\*"].map((e=>[g("verbatim"+e,b("verbatim"+e)),g("filecontents"+e,o(c,b("filecontents"+e))),...["","B","L"].map((n=>g(n+"Verbatim"+e,o(l,b(n+"Verbatim"+e)))))]))),g("minted",o(l,o(c,b("minted")))),...a] | ||
contains:[...["verb","lstinline"].map((e=>g(e,{contains:[b()]}))),g("mint",d(l,{ | ||
contains:[b()]})),g("mintinline",d(l,{contains:[v(),b()]})),g("url",{ | ||
contains:[v("link"),v("link")]}),g("hyperref",{contains:[v("link")] | ||
}),g("href",d(o,{contains:[v("link")] | ||
})),...[].concat(...["","\\*"].map((e=>[m("verbatim"+e,p("verbatim"+e)),m("filecontents"+e,d(l,p("filecontents"+e))),...["","B","L"].map((n=>m(n+"Verbatim"+e,d(o,p(n+"Verbatim"+e)))))]))),m("minted",d(o,d(l,p("minted")))),...t] | ||
}}})()); |
hljs.registerLanguage("livescript",(()=>{"use strict" | ||
;const e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],n=["true","false","null","undefined","NaN","Infinity"],a=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer","BigInt64Array","BigUint64Array","BigInt"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]) | ||
;const e=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],n=["true","false","null","undefined","NaN","Infinity"],a=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer","BigInt64Array","BigUint64Array","BigInt"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]) | ||
;return t=>{const r={ | ||
@@ -4,0 +4,0 @@ keyword:e.concat(["then","unless","until","loop","of","by","when","and","or","is","isnt","not","it","that","otherwise","from","to","til","fallthrough","case","enum","native","list","map","__hasProp","__extends","__slice","__bind","__indexOf"]), |
hljs.registerLanguage("perl",(()=>{"use strict";function e(e){ | ||
return e?"string"==typeof e?e:e.source:null}function n(...n){ | ||
return n.map((n=>e(n))).join("")}function t(...n){ | ||
return"("+n.map((n=>e(n))).join("|")+")"}return e=>{ | ||
return n.map((n=>e(n))).join("")}function t(...n){return"("+((e=>{ | ||
const n=e[e.length-1] | ||
;return"object"==typeof n&&n.constructor===Object?(e.splice(e.length-1,1),n):{} | ||
})(n).capture?"":"?:")+n.map((n=>e(n))).join("|")+")"}return e=>{ | ||
const r=/[dualxmsipngr]{0,12}/,s={$pattern:/[\w.]+/, | ||
@@ -28,6 +30,6 @@ keyword:"abs accept alarm and atan2 bind binmode bless break caller chdir chmod chomp chop chown chr chroot close closedir connect continue cos crypt dbmclose dbmopen defined delete die do dump each else elsif endgrent endhostent endnetent endprotoent endpwent endservent eof eval exec exists exit exp fcntl fileno flock for foreach fork format formline getc getgrent getgrgid getgrnam gethostbyaddr gethostbyname gethostent getlogin getnetbyaddr getnetbyname getnetent getpeername getpgrp getpriority getprotobyname getprotobynumber getprotoent getpwent getpwnam getpwuid getservbyname getservbyport getservent getsockname getsockopt given glob gmtime goto grep gt hex if index int ioctl join keys kill last lc lcfirst length link listen local localtime log lstat lt ma map mkdir msgctl msgget msgrcv msgsnd my ne next no not oct open opendir or ord our pack package pipe pop pos print printf prototype push q|0 qq quotemeta qw qx rand read readdir readline readlink readpipe recv redo ref rename require reset return reverse rewinddir rindex rmdir say scalar seek seekdir select semctl semget semop send setgrent sethostent setnetent setpgrp setpriority setprotoent setpwent setservent setsockopt shift shmctl shmget shmread shmwrite shutdown sin sleep socket socketpair sort splice split sprintf sqrt srand stat state study sub substr symlink syscall sysopen sysread sysseek system syswrite tell telldir tie tied time times tr truncate uc ucfirst umask undef unless unlink unpack unshift untie until use utime values vec wait waitpid wantarray warn when while write x|0 xor y|0" | ||
contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{ | ||
begin:l("s|tr|y",t(...g))},{begin:l("s|tr|y","\\(","\\)")},{ | ||
begin:l("s|tr|y",t(...g,{capture:!0}))},{begin:l("s|tr|y","\\(","\\)")},{ | ||
begin:l("s|tr|y","\\[","\\]")},{begin:l("s|tr|y","\\{","\\}")}],relevance:2},{ | ||
className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{ | ||
begin:d("(?:m|qr)?",/\//,/\//)},{begin:d("m|qr",t(...g),/\1/)},{ | ||
begin:d("(?:m|qr)?",/\//,/\//)},{begin:d("m|qr",t(...g,{capture:!0}),/\1/)},{ | ||
begin:d("m|qr",/\(/,/\)/)},{begin:d("m|qr",/\[/,/\]/)},{ | ||
@@ -34,0 +36,0 @@ begin:d("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub", |
@@ -1,8 +0,21 @@ | ||
hljs.registerLanguage("processing",(()=>{"use strict";return e=>({ | ||
name:"Processing",aliases:["pde"],keywords:{ | ||
keyword:"BufferedReader PVector PFont PImage PGraphics HashMap boolean byte char color double float int long String Array FloatDict FloatList IntDict IntList JSONArray JSONObject Object StringDict StringList Table TableRow XML false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private", | ||
literal:"P2D P3D HALF_PI PI QUARTER_PI TAU TWO_PI",title:"setup draw", | ||
built_in:"displayHeight displayWidth mouseY mouseX mousePressed pmouseX pmouseY key keyCode pixels focused frameCount frameRate height width size createGraphics beginDraw createShape loadShape PShape arc ellipse line point quad rect triangle bezier bezierDetail bezierPoint bezierTangent curve curveDetail curvePoint curveTangent curveTightness shape shapeMode beginContour beginShape bezierVertex curveVertex endContour endShape quadraticVertex vertex ellipseMode noSmooth rectMode smooth strokeCap strokeJoin strokeWeight mouseClicked mouseDragged mouseMoved mousePressed mouseReleased mouseWheel keyPressed keyPressedkeyReleased keyTyped print println save saveFrame day hour millis minute month second year background clear colorMode fill noFill noStroke stroke alpha blue brightness color green hue lerpColor red saturation modelX modelY modelZ screenX screenY screenZ ambient emissive shininess specular add createImage beginCamera camera endCamera frustum ortho perspective printCamera printProjection cursor frameRate noCursor exit loop noLoop popStyle pushStyle redraw binary boolean byte char float hex int str unbinary unhex join match matchAll nf nfc nfp nfs split splitTokens trim append arrayCopy concat expand reverse shorten sort splice subset box sphere sphereDetail createInput createReader loadBytes loadJSONArray loadJSONObject loadStrings loadTable loadXML open parseXML saveTable selectFolder selectInput beginRaw beginRecord createOutput createWriter endRaw endRecord PrintWritersaveBytes saveJSONArray saveJSONObject saveStream saveStrings saveXML selectOutput popMatrix printMatrix pushMatrix resetMatrix rotate rotateX rotateY rotateZ scale shearX shearY translate ambientLight directionalLight lightFalloff lights lightSpecular noLights normal pointLight spotLight image imageMode loadImage noTint requestImage tint texture textureMode textureWrap blend copy filter get loadPixels set updatePixels blendMode loadShader PShaderresetShader shader createFont loadFont text textFont textAlign textLeading textMode textSize textWidth textAscent textDescent abs ceil constrain dist exp floor lerp log mag map max min norm pow round sq sqrt acos asin atan atan2 cos degrees radians sin tan noise noiseDetail noiseSeed random randomGaussian randomSeed" | ||
}, | ||
contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE] | ||
})})()); | ||
hljs.registerLanguage("processing",(()=>{"use strict";function e(e){ | ||
return e?"string"==typeof e?e:e.source:null}function t(e){return a("(?=",e,")")} | ||
function a(...t){return t.map((t=>e(t))).join("")}function r(...t){ | ||
return"("+((e=>{const t=e[e.length-1] | ||
;return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{} | ||
})(t).capture?"":"?:")+t.map((t=>e(t))).join("|")+")"}return e=>{ | ||
const s=["displayHeight","displayWidth","mouseY","mouseX","mousePressed","pmouseX","pmouseY","key","keyCode","pixels","focused","frameCount","frameRate","height","width","size","createGraphics","beginDraw","createShape","loadShape","PShape","arc","ellipse","line","point","quad","rect","triangle","bezier","bezierDetail","bezierPoint","bezierTangent","curve","curveDetail","curvePoint","curveTangent","curveTightness","shape","shapeMode","beginContour","beginShape","bezierVertex","curveVertex","endContour","endShape","quadraticVertex","vertex","ellipseMode","noSmooth","rectMode","smooth","strokeCap","strokeJoin","strokeWeight","mouseClicked","mouseDragged","mouseMoved","mousePressed","mouseReleased","mouseWheel","keyPressed","keyPressedkeyReleased","keyTyped","print","println","save","saveFrame","day","hour","millis","minute","month","second","year","background","clear","colorMode","fill","noFill","noStroke","stroke","alpha","blue","brightness","color","green","hue","lerpColor","red","saturation","modelX","modelY","modelZ","screenX","screenY","screenZ","ambient","emissive","shininess","specular","add","createImage","beginCamera","camera","endCamera","frustum","ortho","perspective","printCamera","printProjection","cursor","frameRate","noCursor","exit","loop","noLoop","popStyle","pushStyle","redraw","binary","boolean","byte","char","float","hex","int","str","unbinary","unhex","join","match","matchAll","nf","nfc","nfp","nfs","split","splitTokens","trim","append","arrayCopy","concat","expand","reverse","shorten","sort","splice","subset","box","sphere","sphereDetail","createInput","createReader","loadBytes","loadJSONArray","loadJSONObject","loadStrings","loadTable","loadXML","open","parseXML","saveTable","selectFolder","selectInput","beginRaw","beginRecord","createOutput","createWriter","endRaw","endRecord","PrintWritersaveBytes","saveJSONArray","saveJSONObject","saveStream","saveStrings","saveXML","selectOutput","popMatrix","printMatrix","pushMatrix","resetMatrix","rotate","rotateX","rotateY","rotateZ","scale","shearX","shearY","translate","ambientLight","directionalLight","lightFalloff","lights","lightSpecular","noLights","normal","pointLight","spotLight","image","imageMode","loadImage","noTint","requestImage","tint","texture","textureMode","textureWrap","blend","copy","filter","get","loadPixels","set","updatePixels","blendMode","loadShader","PShaderresetShader","shader","createFont","loadFont","text","textFont","textAlign","textLeading","textMode","textSize","textWidth","textAscent","textDescent","abs","ceil","constrain","dist","exp","floor","lerp","log","mag","map","max","min","norm","pow","round","sq","sqrt","acos","asin","atan","atan2","cos","degrees","radians","sin","tan","noise","noiseDetail","noiseSeed","random","randomGaussian","randomSeed"],o=e.IDENT_RE,n={ | ||
variants:[{match:a(r(...s),t(/\s*\(/)),className:"built_in"},{relevance:0, | ||
match:a(/\b(?!for|if|while)/,o,t(/\s*\(/)),className:"title.function"}]},i={ | ||
match:[/new\s+/,o],className:{1:"keyword",2:"class.title"}},l={relevance:0, | ||
match:[/\./,o],className:{2:"property"}},c={variants:[{ | ||
match:[/class/,/\s+/,o,/\s+/,/extends/,/\s+/,o]},{match:[/class/,/\s+/,o]}], | ||
className:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}} | ||
;return{name:"Processing",aliases:["pde"],keywords:{ | ||
keyword:["abstract","assert","break","case","catch","const","continue","default","else","enum","final","finally","for","if","import","instanceof","long","native","new","package","private","private","protected","protected","public","public","return","static","strictfp","switch","synchronized","throw","throws","transient","try","void","volatile","while"], | ||
literal:"P2D P3D HALF_PI PI QUARTER_PI TAU TWO_PI null true false", | ||
title:"setup draw",variable:"super this", | ||
built_in:[...s,"BufferedReader","PVector","PFont","PImage","PGraphics","HashMap","String","Array","FloatDict","ArrayList","FloatList","IntDict","IntList","JSONArray","JSONObject","Object","StringDict","StringList","Table","TableRow","XML"], | ||
type:["boolean","byte","char","color","double","float","int","long","short"]}, | ||
contains:[c,i,n,l,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE] | ||
}}})()); |
@@ -12,3 +12,3 @@ hljs.registerLanguage("rust",(()=>{"use strict";function e(...e){ | ||
}),t.inherit(t.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{ | ||
className:"string",variants:[{begin:/r(#*)"(.|\n)*?"\1(?!#)/},{ | ||
className:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{ | ||
begin:/b?'\\?(x\w{2}|u\w{4}|U\w{8}|.)'/}]},{className:"symbol", | ||
@@ -15,0 +15,0 @@ begin:/'[a-zA-Z_][a-zA-Z0-9_]*/},{className:"number",variants:[{ |
@@ -1,4 +0,6 @@ | ||
hljs.registerLanguage("sas",(()=>{"use strict";function e(...e){ | ||
return"("+e.map((e=>{return(t=e)?"string"==typeof t?t:t.source:null;var t | ||
})).join("|")+")"}return t=>({name:"SAS",case_insensitive:!0,keywords:{ | ||
hljs.registerLanguage("sas",(()=>{"use strict";function e(...e){return"("+((e=>{ | ||
const t=e[e.length-1] | ||
;return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{} | ||
})(e).capture?"":"?:")+e.map((e=>{return(t=e)?"string"==typeof t?t:t.source:null | ||
;var t})).join("|")+")"}return t=>({name:"SAS",case_insensitive:!0,keywords:{ | ||
literal:["null","missing","_all_","_automatic_","_character_","_infile_","_n_","_name_","_null_","_numeric_","_user_","_webout_"], | ||
@@ -5,0 +7,0 @@ keyword:["do","if","then","else","end","until","while","abort","array","attrib","by","call","cards","cards4","catname","continue","datalines","datalines4","delete","delim","delimiter","display","dm","drop","endsas","error","file","filename","footnote","format","goto","in","infile","informat","input","keep","label","leave","length","libname","link","list","lostcard","merge","missing","modify","options","output","out","page","put","redirect","remove","rename","replace","retain","return","select","set","skip","startsas","stop","title","update","waitsas","where","window","x|0","systask","add","and","alter","as","cascade","check","create","delete","describe","distinct","drop","foreign","from","group","having","index","insert","into","in","key","like","message","modify","msgtype","not","null","on","or","order","primary","references","reset","restrict","select","set","table","unique","update","validate","view","where"] |
hljs.registerLanguage("sql",(()=>{"use strict";function e(e){ | ||
return e?"string"==typeof e?e:e.source:null}function r(...r){ | ||
return r.map((r=>e(r))).join("")}function t(...r){ | ||
return"("+r.map((r=>e(r))).join("|")+")"}return e=>{ | ||
return r.map((r=>e(r))).join("")}function t(...r){return"("+((e=>{ | ||
const r=e[e.length-1] | ||
;return"object"==typeof r&&r.constructor===Object?(e.splice(e.length-1,1),r):{} | ||
})(r).capture?"":"?:")+r.map((r=>e(r))).join("|")+")"}return e=>{ | ||
const n=e.COMMENT("--","$"),a=["true","false","unknown"],i=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],s=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],o=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],c=s,l=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year","add","asc","collation","desc","final","first","last","view"].filter((e=>!s.includes(e))),u={ | ||
@@ -6,0 +8,0 @@ begin:r(/\b/,t(...c),/\s*\(/),relevance:0,keywords:{built_in:c}};return{ |
@@ -1,2 +0,6 @@ | ||
hljs.registerLanguage("stan",(()=>{"use strict";return _=>({name:"Stan", | ||
hljs.registerLanguage("stan",(()=>{"use strict";return _=>{ | ||
const e=_.COMMENT(/\/\*/,/\*\//,{relevance:0,contains:[{className:"doctag", | ||
match:/@(return|param)/}]}),l={className:"meta",begin:/^#include\b/,end:/$/, | ||
relevance:0,keywords:"include",contains:[{match:/[a-z][a-z-.]+/, | ||
className:"string"},_.C_LINE_COMMENT_MODE]};return{name:"Stan", | ||
aliases:["stanfuncs"],keywords:{$pattern:_.IDENT_RE, | ||
@@ -6,7 +10,5 @@ title:["functions","model","data","parameters","quantities","transformed","generated"], | ||
built_in:["Phi","Phi_approx","abs","acos","acosh","algebra_solver","append_array","append_col","append_row","asin","asinh","atan","atan2","atanh","bernoulli_cdf","bernoulli_lccdf","bernoulli_lcdf","bernoulli_logit_lpmf","bernoulli_logit_rng","bernoulli_lpmf","bernoulli_rng","bessel_first_kind","bessel_second_kind","beta_binomial_cdf","beta_binomial_lccdf","beta_binomial_lcdf","beta_binomial_lpmf","beta_binomial_rng","beta_cdf","beta_lccdf","beta_lcdf","beta_lpdf","beta_rng","binary_log_loss","binomial_cdf","binomial_coefficient_log","binomial_lccdf","binomial_lcdf","binomial_logit_lpmf","binomial_lpmf","binomial_rng","block","categorical_logit_lpmf","categorical_logit_rng","categorical_lpmf","categorical_rng","cauchy_cdf","cauchy_lccdf","cauchy_lcdf","cauchy_lpdf","cauchy_rng","cbrt","ceil","chi_square_cdf","chi_square_lccdf","chi_square_lcdf","chi_square_lpdf","chi_square_rng","cholesky_decompose","choose","col","cols","columns_dot_product","columns_dot_self","cos","cosh","cov_exp_quad","crossprod","csr_extract_u","csr_extract_v","csr_extract_w","csr_matrix_times_vector","csr_to_dense_matrix","cumulative_sum","determinant","diag_matrix","diag_post_multiply","diag_pre_multiply","diagonal","digamma","dims","dirichlet_lpdf","dirichlet_rng","distance","dot_product","dot_self","double_exponential_cdf","double_exponential_lccdf","double_exponential_lcdf","double_exponential_lpdf","double_exponential_rng","e","eigenvalues_sym","eigenvectors_sym","erf","erfc","exp","exp2","exp_mod_normal_cdf","exp_mod_normal_lccdf","exp_mod_normal_lcdf","exp_mod_normal_lpdf","exp_mod_normal_rng","expm1","exponential_cdf","exponential_lccdf","exponential_lcdf","exponential_lpdf","exponential_rng","fabs","falling_factorial","fdim","floor","fma","fmax","fmin","fmod","frechet_cdf","frechet_lccdf","frechet_lcdf","frechet_lpdf","frechet_rng","gamma_cdf","gamma_lccdf","gamma_lcdf","gamma_lpdf","gamma_p","gamma_q","gamma_rng","gaussian_dlm_obs_lpdf","get_lp","gumbel_cdf","gumbel_lccdf","gumbel_lcdf","gumbel_lpdf","gumbel_rng","head","hypergeometric_lpmf","hypergeometric_rng","hypot","inc_beta","int_step","integrate_ode","integrate_ode_bdf","integrate_ode_rk45","inv","inv_Phi","inv_chi_square_cdf","inv_chi_square_lccdf","inv_chi_square_lcdf","inv_chi_square_lpdf","inv_chi_square_rng","inv_cloglog","inv_gamma_cdf","inv_gamma_lccdf","inv_gamma_lcdf","inv_gamma_lpdf","inv_gamma_rng","inv_logit","inv_sqrt","inv_square","inv_wishart_lpdf","inv_wishart_rng","inverse","inverse_spd","is_inf","is_nan","lbeta","lchoose","lgamma","lkj_corr_cholesky_lpdf","lkj_corr_cholesky_rng","lkj_corr_lpdf","lkj_corr_rng","lmgamma","lmultiply","log","log10","log1m","log1m_exp","log1m_inv_logit","log1p","log1p_exp","log2","log_determinant","log_diff_exp","log_falling_factorial","log_inv_logit","log_mix","log_rising_factorial","log_softmax","log_sum_exp","logistic_cdf","logistic_lccdf","logistic_lcdf","logistic_lpdf","logistic_rng","logit","lognormal_cdf","lognormal_lccdf","lognormal_lcdf","lognormal_lpdf","lognormal_rng","machine_precision","matrix_exp","max","mdivide_left_spd","mdivide_left_tri_low","mdivide_right_spd","mdivide_right_tri_low","mean","min","modified_bessel_first_kind","modified_bessel_second_kind","multi_gp_cholesky_lpdf","multi_gp_lpdf","multi_normal_cholesky_lpdf","multi_normal_cholesky_rng","multi_normal_lpdf","multi_normal_prec_lpdf","multi_normal_rng","multi_student_t_lpdf","multi_student_t_rng","multinomial_lpmf","multinomial_rng","multiply_log","multiply_lower_tri_self_transpose","neg_binomial_2_cdf","neg_binomial_2_lccdf","neg_binomial_2_lcdf","neg_binomial_2_log_lpmf","neg_binomial_2_log_rng","neg_binomial_2_lpmf","neg_binomial_2_rng","neg_binomial_cdf","neg_binomial_lccdf","neg_binomial_lcdf","neg_binomial_lpmf","neg_binomial_rng","negative_infinity","normal_cdf","normal_lccdf","normal_lcdf","normal_lpdf","normal_rng","not_a_number","num_elements","ordered_logistic_lpmf","ordered_logistic_rng","owens_t","pareto_cdf","pareto_lccdf","pareto_lcdf","pareto_lpdf","pareto_rng","pareto_type_2_cdf","pareto_type_2_lccdf","pareto_type_2_lcdf","pareto_type_2_lpdf","pareto_type_2_rng","pi","poisson_cdf","poisson_lccdf","poisson_lcdf","poisson_log_lpmf","poisson_log_rng","poisson_lpmf","poisson_rng","positive_infinity","pow","print","prod","qr_Q","qr_R","quad_form","quad_form_diag","quad_form_sym","rank","rayleigh_cdf","rayleigh_lccdf","rayleigh_lcdf","rayleigh_lpdf","rayleigh_rng","reject","rep_array","rep_matrix","rep_row_vector","rep_vector","rising_factorial","round","row","rows","rows_dot_product","rows_dot_self","scaled_inv_chi_square_cdf","scaled_inv_chi_square_lccdf","scaled_inv_chi_square_lcdf","scaled_inv_chi_square_lpdf","scaled_inv_chi_square_rng","sd","segment","sin","singular_values","sinh","size","skew_normal_cdf","skew_normal_lccdf","skew_normal_lcdf","skew_normal_lpdf","skew_normal_rng","softmax","sort_asc","sort_desc","sort_indices_asc","sort_indices_desc","sqrt","sqrt2","square","squared_distance","step","student_t_cdf","student_t_lccdf","student_t_lcdf","student_t_lpdf","student_t_rng","sub_col","sub_row","sum","tail","tan","tanh","target","tcrossprod","tgamma","to_array_1d","to_array_2d","to_matrix","to_row_vector","to_vector","trace","trace_gen_quad_form","trace_quad_form","trigamma","trunc","uniform_cdf","uniform_lccdf","uniform_lcdf","uniform_lpdf","uniform_rng","variance","von_mises_lpdf","von_mises_rng","weibull_cdf","weibull_lccdf","weibull_lcdf","weibull_lpdf","weibull_rng","wiener_lpdf","wishart_lpdf","wishart_rng"] | ||
},contains:[_.C_LINE_COMMENT_MODE,_.COMMENT(/#/,/$/,{relevance:0,keywords:{ | ||
"meta-keyword":"include"}}),_.COMMENT(/\/\*/,/\*\//,{relevance:0,contains:[{ | ||
className:"doctag",begin:/@(return|param)/}]}),{begin:/<\s*lower\s*=/, | ||
keywords:"lower"},{begin:/[<,]\s*upper\s*=/,keywords:"upper"},{ | ||
className:"keyword",begin:/\btarget\s*\+=/,relevance:10},{ | ||
},contains:[_.C_LINE_COMMENT_MODE,l,_.HASH_COMMENT_MODE,e,{ | ||
begin:/<\s*lower\s*=/,keywords:"lower"},{begin:/[<,]\s*upper\s*=/, | ||
keywords:"upper"},{className:"keyword",begin:/\btarget\s*\+=/},{ | ||
begin:"~\\s*("+_.IDENT_RE+")\\s*\\(", | ||
@@ -16,2 +18,2 @@ keywords:["bernoulli","bernoulli_logit","beta","beta_binomial","binomial","binomial_logit","categorical","categorical_logit","cauchy","chi_square","dirichlet","double_exponential","exp_mod_normal","exponential","frechet","gamma","gaussian_dlm_obs","gumbel","hypergeometric","inv_chi_square","inv_gamma","inv_wishart","lkj_corr","lkj_corr_cholesky","logistic","lognormal","multi_gp","multi_gp_cholesky","multi_normal","multi_normal_cholesky","multi_normal_prec","multi_student_t","multinomial","neg_binomial","neg_binomial_2","neg_binomial_2_log","normal","ordered_logistic","pareto","pareto_type_2","poisson","poisson_log","rayleigh","scaled_inv_chi_square","skew_normal","student_t","uniform","von_mises","weibull","wiener","wishart"] | ||
begin:/\.\d+(?:[eE][+-]?\d+)?\b/}],relevance:0},{className:"string",begin:'"', | ||
end:'"',relevance:0}]})})()); | ||
end:'"',relevance:0}]}}})()); |
hljs.registerLanguage("swift",(()=>{"use strict";function e(e){ | ||
return e?"string"==typeof e?e:e.source:null}function n(e){return a("(?=",e,")")} | ||
function a(...n){return n.map((n=>e(n))).join("")}function t(...n){ | ||
return"("+n.map((n=>e(n))).join("|")+")"} | ||
const i=e=>a(/\b/,e,/\w$/.test(e)?/\b/:/\B/),s=["Protocol","Type"].map(i),u=["init","self"].map(i),c=["Any","Self"],r=["associatedtype","async","await",/as\?/,/as!/,"as","break","case","catch","class","continue","convenience","default","defer","deinit","didSet","do","dynamic","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","lazy","let","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],o=["false","nil","true"],l=["assignment","associativity","higherThan","left","lowerThan","none","right"],m=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warn_unqualified_access","#warning"],d=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],p=t(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),F=t(p,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),b=a(p,F,"*"),h=t(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),f=t(h,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),w=a(h,f,"*"),y=a(/[A-Z]/,f,"*"),g=["autoclosure",a(/convention\(/,t("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",a(/objc\(/,w,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","testable","UIApplicationMain","unknown","usableFromInline"],E=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"] | ||
;return e=>{const p={match:/\s+/,relevance:0},h=e.COMMENT("/\\*","\\*/",{ | ||
contains:["self"]}),v=[e.C_LINE_COMMENT_MODE,h],N={className:"keyword", | ||
begin:a(/\./,n(t(...s,...u))),end:t(...s,...u),excludeBegin:!0},A={ | ||
match:a(/\./,t(...r)),relevance:0 | ||
},C=r.filter((e=>"string"==typeof e)).concat(["_|0"]),_={variants:[{ | ||
return e?"string"==typeof e?e:e.source:null}function a(e){return t("(?=",e,")")} | ||
function t(...a){return a.map((a=>e(a))).join("")}function n(...a){ | ||
return"("+((e=>{const a=e[e.length-1] | ||
;return"object"==typeof a&&a.constructor===Object?(e.splice(e.length-1,1),a):{} | ||
})(a).capture?"":"?:")+a.map((a=>e(a))).join("|")+")"} | ||
const i=e=>t(/\b/,e,/\w$/.test(e)?/\b/:/\B/),s=["Protocol","Type"].map(i),u=["init","self"].map(i),c=["Any","Self"],r=["actor","associatedtype","async","await",/as\?/,/as!/,"as","break","case","catch","class","continue","convenience","default","defer","deinit","didSet","do","dynamic","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","lazy","let","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],o=["false","nil","true"],l=["assignment","associativity","higherThan","left","lowerThan","none","right"],m=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warn_unqualified_access","#warning"],p=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],F=n(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),d=n(F,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),b=t(F,d,"*"),h=n(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),f=n(h,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),w=t(h,f,"*"),y=t(/[A-Z]/,f,"*"),g=["autoclosure",t(/convention\(/,n("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",t(/objc\(/,w,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","testable","UIApplicationMain","unknown","usableFromInline"],E=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"] | ||
;return e=>{const F={match:/\s+/,relevance:0},h=e.COMMENT("/\\*","\\*/",{ | ||
contains:["self"]}),v=[e.C_LINE_COMMENT_MODE,h],A={match:[/\./,n(...s,...u)], | ||
className:{2:"keyword"}},N={match:t(/\./,n(...r)),relevance:0 | ||
},C=r.filter((e=>"string"==typeof e)).concat(["_|0"]),D={variants:[{ | ||
className:"keyword", | ||
match:t(...r.filter((e=>"string"!=typeof e)).concat(c).map(i),...u)}]},B={ | ||
$pattern:t(/\b\w+/,/#\w+/),keyword:C.concat(m),literal:o},D=[N,A,_],k=[{ | ||
match:a(/\./,t(...d)),relevance:0},{className:"built_in", | ||
match:a(/\b/,t(...d),/(?=\()/)}],M={match:/->/,relevance:0},S=[M,{ | ||
className:"operator",relevance:0,variants:[{match:b},{match:`\\.(\\.|${F})+`}] | ||
match:n(...r.filter((e=>"string"!=typeof e)).concat(c).map(i),...u)}]},k={ | ||
$pattern:n(/\b\w+/,/#\w+/),keyword:C.concat(m),literal:o},B=[A,N,D],_=[{ | ||
match:t(/\./,n(...p)),relevance:0},{className:"built_in", | ||
match:t(/\b/,n(...p),/(?=\()/)}],S={match:/->/,relevance:0},M=[S,{ | ||
className:"operator",relevance:0,variants:[{match:b},{match:`\\.(\\.|${d})+`}] | ||
}],x="([0-9a-fA-F]_*)+",I={className:"number",relevance:0,variants:[{ | ||
match:"\\b(([0-9]_*)+)(\\.(([0-9]_*)+))?([eE][+-]?(([0-9]_*)+))?\\b"},{ | ||
match:`\\b0x(${x})(\\.(${x}))?([pP][+-]?(([0-9]_*)+))?\\b`},{ | ||
match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},O=(e="")=>({ | ||
className:"subst",variants:[{match:a(/\\/,e,/[0\\tnr"']/)},{ | ||
match:a(/\\/,e,/u\{[0-9a-fA-F]{1,8}\}/)}]}),T=(e="")=>({className:"subst", | ||
match:a(/\\/,e,/[\t ]*(?:[\r\n]|\r\n)/)}),L=(e="")=>({className:"subst", | ||
label:"interpol",begin:a(/\\/,e,/\(/),end:/\)/}),P=(e="")=>({begin:a(e,/"""/), | ||
end:a(/"""/,e),contains:[O(e),T(e),L(e)]}),$=(e="")=>({begin:a(e,/"/), | ||
end:a(/"/,e),contains:[O(e),L(e)]}),K={className:"string", | ||
variants:[P(),P("#"),P("##"),P("###"),$(),$("#"),$("##"),$("###")]},j={ | ||
match:a(/`/,w,/`/)},z=[j,{className:"variable",match:/\$\d+/},{ | ||
match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},L=(e="")=>({ | ||
className:"subst",variants:[{match:t(/\\/,e,/[0\\tnr"']/)},{ | ||
match:t(/\\/,e,/u\{[0-9a-fA-F]{1,8}\}/)}]}),O=(e="")=>({className:"subst", | ||
match:t(/\\/,e,/[\t ]*(?:[\r\n]|\r\n)/)}),T=(e="")=>({className:"subst", | ||
label:"interpol",begin:t(/\\/,e,/\(/),end:/\)/}),$=(e="")=>({begin:t(e,/"""/), | ||
end:t(/"""/,e),contains:[L(e),O(e),T(e)]}),j=(e="")=>({begin:t(e,/"/), | ||
end:t(/"/,e),contains:[L(e),T(e)]}),P={className:"string", | ||
variants:[$(),$("#"),$("##"),$("###"),j(),j("#"),j("##"),j("###")]},K={ | ||
match:t(/`/,w,/`/)},z=[K,{className:"variable",match:/\$\d+/},{ | ||
className:"variable",match:`\\$${f}+`}],q=[{match:/(@|#)available/, | ||
className:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:E, | ||
contains:[...S,I,K]}]}},{className:"keyword",match:a(/@/,t(...g))},{ | ||
className:"meta",match:a(/@/,w)}],U={match:n(/\b[A-Z]/),relevance:0,contains:[{ | ||
contains:[...M,I,P]}]}},{className:"keyword",match:t(/@/,n(...g))},{ | ||
className:"meta",match:t(/@/,w)}],U={match:a(/\b[A-Z]/),relevance:0,contains:[{ | ||
className:"type", | ||
match:a(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,f,"+") | ||
match:t(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,f,"+") | ||
},{className:"type",match:y,relevance:0},{match:/[?!]+/,relevance:0},{ | ||
match:/\.\.\./,relevance:0},{match:a(/\s+&\s+/,n(y)),relevance:0}]},Z={ | ||
begin:/</,end:/>/,keywords:B,contains:[...v,...D,...q,M,U]};U.contains.push(Z) | ||
;const G={begin:/\(/,end:/\)/,relevance:0,keywords:B,contains:["self",{ | ||
match:a(w,/\s*:/),keywords:"_|0",relevance:0 | ||
},...v,...D,...k,...S,I,K,...z,...q,U]},H={beginKeywords:"func",contains:[{ | ||
className:"title",match:t(j.match,w,b),endsParent:!0,relevance:0},p]},R={ | ||
begin:/</,end:/>/,contains:[...v,U]},V={begin:/\(/,end:/\)/,keywords:B, | ||
contains:[{begin:t(n(a(w,/\s*:/)),n(a(w,/\s+/,w,/\s*:/))),end:/:/,relevance:0, | ||
contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:w}] | ||
},...v,...D,...S,I,K,...q,U,G],endsParent:!0,illegal:/["']/},W={ | ||
className:"function",match:n(/\bfunc\b/),contains:[H,R,V,p],illegal:[/\[/,/%/] | ||
},X={className:"function",match:/\b(subscript|init[?!]?)\s*(?=[<(])/,keywords:{ | ||
keyword:"subscript init init? init!",$pattern:/\w+[?!]?/},contains:[R,V,p], | ||
illegal:/\[|%/},J={beginKeywords:"operator",end:e.MATCH_NOTHING_RE,contains:[{ | ||
className:"title",match:b,endsParent:!0,relevance:0}]},Q={ | ||
beginKeywords:"precedencegroup",end:e.MATCH_NOTHING_RE,contains:[{ | ||
className:"title",match:y,relevance:0},{begin:/{/,end:/}/,relevance:0, | ||
endsParent:!0,keywords:[...l,...o],contains:[U]}]};for(const e of K.variants){ | ||
const n=e.contains.find((e=>"interpol"===e.label));n.keywords=B | ||
;const a=[...D,...k,...S,I,K,...z];n.contains=[...a,{begin:/\(/,end:/\)/, | ||
contains:["self",...a]}]}return{name:"Swift",keywords:B,contains:[...v,W,X,{ | ||
className:"class",beginKeywords:"struct protocol class extension enum", | ||
end:"\\{",excludeEnd:!0,keywords:B,contains:[e.inherit(e.TITLE_MODE,{ | ||
begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),...D]},J,Q,{ | ||
beginKeywords:"import",end:/$/,contains:[...v],relevance:0 | ||
},...D,...k,...S,I,K,...z,...q,U,G]}}})()); | ||
match:/\.\.\./,relevance:0},{match:t(/\s+&\s+/,a(y)),relevance:0}]},Z={ | ||
begin:/</,end:/>/,keywords:k,contains:[...v,...B,...q,S,U]};U.contains.push(Z) | ||
;const V={begin:/\(/,end:/\)/,relevance:0,keywords:k,contains:["self",{ | ||
match:t(w,/\s*:/),keywords:"_|0",relevance:0 | ||
},...v,...B,..._,...M,I,P,...z,...q,U]},W={begin:/</,end:/>/,contains:[...v,U] | ||
},G={begin:/\(/,end:/\)/,keywords:k,contains:[{ | ||
begin:n(a(t(w,/\s*:/)),a(t(w,/\s+/,w,/\s*:/))),end:/:/,relevance:0,contains:[{ | ||
className:"keyword",match:/\b_\b/},{className:"params",match:w}] | ||
},...v,...B,...M,I,P,...q,U,V],endsParent:!0,illegal:/["']/},R={ | ||
match:[/func/,/\s+/,n(K.match,w,b)],className:{1:"keyword",3:"title.function"}, | ||
contains:[W,G,F],illegal:[/\[/,/%/]},X={ | ||
match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"}, | ||
contains:[W,G,F],illegal:/\[|%/},H={match:[/operator/,/\s+/,b],className:{ | ||
1:"keyword",3:"title"}},J={begin:[/precedencegroup/,/\s+/,y],className:{ | ||
1:"keyword",3:"title"},contains:[U],keywords:[...l,...o],end:/}/} | ||
;for(const e of P.variants){const a=e.contains.find((e=>"interpol"===e.label)) | ||
;a.keywords=k;const t=[...B,..._,...M,I,P,...z];a.contains=[...t,{begin:/\(/, | ||
end:/\)/,contains:["self",...t]}]}return{name:"Swift",keywords:k, | ||
contains:[...v,R,X,{beginKeywords:"struct protocol class extension enum actor", | ||
end:"\\{",excludeEnd:!0,keywords:k,contains:[e.inherit(e.TITLE_MODE,{ | ||
className:"title.class",begin:/[A-Za-z$_][\u00C0-\u02B80-9A-Za-z$_]*/}),...B] | ||
},H,J,{beginKeywords:"import",end:/$/,contains:[...v],relevance:0 | ||
},...B,..._,...M,I,P,...z,...q,U,V]}}})()); |
@@ -11,5 +11,5 @@ hljs.registerLanguage("tcl",(()=>{"use strict";function e(...e){ | ||
endsWithParent:!0,excludeEnd:!0}]},{className:"variable",variants:[{ | ||
begin:e(/\$/,(n=/::/,e("(",n,")?")),t,"(::",t,")*")},{ | ||
begin:e(/\$/,(n=/::/,e("(?:",n,")?")),t,"(::",t,")*")},{ | ||
begin:"\\$\\{(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"\\}",contains:[r]}]},{ | ||
className:"string",contains:[a.BACKSLASH_ESCAPE], | ||
variants:[a.inherit(a.QUOTE_STRING_MODE,{illegal:null})]},r]};var n}})()); |
hljs.registerLanguage("typescript",(()=>{"use strict" | ||
;const e="[A-Za-z$_][0-9A-Za-z$_]*",n=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],a=["true","false","null","undefined","NaN","Infinity"],s=[].concat(["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],["arguments","this","super","console","window","document","localStorage","module","global"],["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer","BigInt64Array","BigUint64Array","BigInt"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"]) | ||
;function t(e){return r("(?=",e,")")}function r(...e){return e.map((e=>{ | ||
return(n=e)?"string"==typeof n?n:n.source:null;var n})).join("")}return i=>{ | ||
const c={$pattern:e, | ||
;const e="[A-Za-z$_][0-9A-Za-z$_]*",n=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends"],a=["true","false","null","undefined","NaN","Infinity"],t=["Intl","DataView","Number","Math","Date","String","RegExp","Object","Function","Boolean","Error","Symbol","Set","Map","WeakSet","WeakMap","Proxy","Reflect","JSON","Promise","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Float32Array","Array","Uint8Array","Uint8ClampedArray","ArrayBuffer","BigInt64Array","BigUint64Array","BigInt"],s=["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],r=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],c=["arguments","this","super","console","window","document","localStorage","module","global"],i=[].concat(r,t,s) | ||
;function o(e){return l("(?=",e,")")}function l(...e){return e.map((e=>{ | ||
return(n=e)?"string"==typeof n?n:n.source:null;var n})).join("")}return b=>{ | ||
const d={$pattern:e, | ||
keyword:n.concat(["type","namespace","typedef","interface","public","private","protected","implements","declare","abstract","readonly"]), | ||
literal:a, | ||
built_in:s.concat(["any","void","number","boolean","string","object","never","enum"]) | ||
},o={className:"meta",begin:"@[A-Za-z$_][0-9A-Za-z$_]*"},l=(e,n,a)=>{ | ||
const s=e.contains.findIndex((e=>e.label===n)) | ||
;if(-1===s)throw Error("can not find mode to replace");e.contains.splice(s,1,a) | ||
},b=(i=>{const c=e,o={begin:/<[A-Za-z0-9\\._:-]+/, | ||
built_in:i.concat(["any","void","number","boolean","string","object","never","enum"]), | ||
"variable.language":c},g={className:"meta",begin:"@[A-Za-z$_][0-9A-Za-z$_]*" | ||
},u=(e,n,a)=>{const t=e.contains.findIndex((e=>e.label===n)) | ||
;if(-1===t)throw Error("can not find mode to replace");e.contains.splice(t,1,a) | ||
},m=function(b){const d=e,g={begin:/<[A-Za-z0-9\\._:-]+/, | ||
end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(e,n)=>{ | ||
const a=e[0].length+e.index,s=e.input[a];"<"!==s?">"===s&&(((e,{after:n})=>{ | ||
const a=e[0].length+e.index,t=e.input[a];"<"!==t?">"===t&&(((e,{after:n})=>{ | ||
const a="</"+e[0].slice(1);return-1!==e.input.indexOf(a,n)})(e,{after:a | ||
})||n.ignoreMatch()):n.ignoreMatch()}},l={$pattern:e,keyword:n,literal:a, | ||
built_in:s},b="\\.([0-9](_?[0-9])*)",d="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",g={ | ||
})||n.ignoreMatch()):n.ignoreMatch()}},u={$pattern:e,keyword:n,literal:a, | ||
built_in:i,"variable.language":c | ||
},m="\\.([0-9](_?[0-9])*)",E="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",y={ | ||
className:"number",variants:[{ | ||
begin:`(\\b(${d})((${b})|\\.)?|(${b}))[eE][+-]?([0-9](_?[0-9])*)\\b`},{ | ||
begin:`\\b(${d})\\b((${b})\\b|\\.)?|(${b})\\b`},{ | ||
begin:`(\\b(${E})((${m})|\\.)?|(${m}))[eE][+-]?([0-9](_?[0-9])*)\\b`},{ | ||
begin:`\\b(${E})\\b((${m})\\b|\\.)?|(${m})\\b`},{ | ||
begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{ | ||
begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{ | ||
begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{ | ||
begin:"\\b0[0-7]+n?\\b"}],relevance:0},u={className:"subst",begin:"\\$\\{", | ||
end:"\\}",keywords:l,contains:[]},E={begin:"html`",end:"",starts:{end:"`", | ||
returnEnd:!1,contains:[i.BACKSLASH_ESCAPE,u],subLanguage:"xml"}},m={ | ||
begin:"\\b0[0-7]+n?\\b"}],relevance:0},f={className:"subst",begin:"\\$\\{", | ||
end:"\\}",keywords:u,contains:[]},p={begin:"html`",end:"",starts:{end:"`", | ||
returnEnd:!1,contains:[b.BACKSLASH_ESCAPE,f],subLanguage:"xml"}},_={ | ||
begin:"css`",end:"",starts:{end:"`",returnEnd:!1, | ||
contains:[i.BACKSLASH_ESCAPE,u],subLanguage:"css"}},y={className:"string", | ||
begin:"`",end:"`",contains:[i.BACKSLASH_ESCAPE,u]},_={className:"comment", | ||
variants:[i.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{ | ||
className:"doctag",begin:"@[A-Za-z]+",contains:[{className:"type",begin:"\\{", | ||
end:"\\}",relevance:0},{className:"variable",begin:c+"(?=\\s*(-)|$)", | ||
contains:[b.BACKSLASH_ESCAPE,f],subLanguage:"css"}},N={className:"string", | ||
begin:"`",end:"`",contains:[b.BACKSLASH_ESCAPE,f]},A={className:"comment", | ||
variants:[b.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{ | ||
begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag", | ||
begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0, | ||
excludeBegin:!0,relevance:0},{className:"variable",begin:d+"(?=\\s*(-)|$)", | ||
endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}] | ||
}),i.C_BLOCK_COMMENT_MODE,i.C_LINE_COMMENT_MODE] | ||
},p=[i.APOS_STRING_MODE,i.QUOTE_STRING_MODE,E,m,y,g,i.REGEXP_MODE] | ||
;u.contains=p.concat({begin:/\{/,end:/\}/,keywords:l,contains:["self"].concat(p) | ||
});const N=[].concat(_,u.contains),f=N.concat([{begin:/\(/,end:/\)/,keywords:l, | ||
contains:["self"].concat(N)}]),A={className:"params",begin:/\(/,end:/\)/, | ||
excludeBegin:!0,excludeEnd:!0,keywords:l,contains:f};return{name:"Javascript", | ||
aliases:["js","jsx","mjs","cjs"],keywords:l,exports:{PARAMS_CONTAINS:f}, | ||
illegal:/#(?![$_A-z])/,contains:[i.SHEBANG({label:"shebang",binary:"node", | ||
}),b.C_BLOCK_COMMENT_MODE,b.C_LINE_COMMENT_MODE] | ||
},v=[b.APOS_STRING_MODE,b.QUOTE_STRING_MODE,p,_,N,y,b.REGEXP_MODE] | ||
;f.contains=v.concat({begin:/\{/,end:/\}/,keywords:u,contains:["self"].concat(v) | ||
});const h=[].concat(A,f.contains),w=h.concat([{begin:/\(/,end:/\)/,keywords:u, | ||
contains:["self"].concat(h)}]),S={className:"params",begin:/\(/,end:/\)/, | ||
excludeBegin:!0,excludeEnd:!0,keywords:u,contains:w},O={variants:[{ | ||
match:[/class/,/\s+/,d],scope:{1:"keyword",3:"title.class"}},{ | ||
match:[/extends/,/\s+/,l(d,"(",l(/\./,d),")*")],scope:{1:"keyword", | ||
3:"title.class.inherited"}}]},R={relevance:0, | ||
match:/\b[A-Z][a-z]+([A-Z][a-z]+)*/,className:"title.class",keywords:{ | ||
_:[...t,...s]}},I={variants:[{match:[/function/,/\s+/,d,/(?=\s*\()/]},{ | ||
match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"}, | ||
label:"func.def",contains:[S],illegal:/%/},x={ | ||
match:l(/\b/,(T=[...r,"super"],l("(?!",T.join("|"),")")),d,o(/\(/)), | ||
className:"title.function",relevance:0};var T;const k={ | ||
begin:l(/\./,o(l(d,/(?![0-9A-Za-z$_(])/))),end:d,excludeBegin:!0, | ||
keywords:"prototype",className:"property",relevance:0},M={ | ||
match:[/get|set/,/\s+/,d,/(?=\()/],className:{1:"keyword",3:"title.function"}, | ||
contains:[{begin:/\(\)/},S] | ||
},C="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+b.UNDERSCORE_IDENT_RE+")\\s*=>",B={ | ||
match:[/const|var|let/,/\s+/,d,/\s*/,/=\s*/,o(C)],className:{1:"keyword", | ||
3:"title.function"},contains:[S]};return{name:"Javascript", | ||
aliases:["js","jsx","mjs","cjs"],keywords:u,exports:{PARAMS_CONTAINS:w}, | ||
illegal:/#(?![$_A-z])/,contains:[b.SHEBANG({label:"shebang",binary:"node", | ||
relevance:5}),{label:"use_strict",className:"meta",relevance:10, | ||
begin:/^\s*['"]use (strict|asm)['"]/ | ||
},i.APOS_STRING_MODE,i.QUOTE_STRING_MODE,E,m,y,_,g,{ | ||
begin:r(/[{,\n]\s*/,t(r(/(((\/\/.*$)|(\/\*(\*[^/]|[^*])*\*\/))\s*)*/,c+"\\s*:"))), | ||
relevance:0,contains:[{className:"attr",begin:c+t("\\s*:"),relevance:0}]},{ | ||
begin:"("+i.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*", | ||
keywords:"return throw case",contains:[_,i.REGEXP_MODE,{className:"function", | ||
begin:"(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+i.UNDERSCORE_IDENT_RE+")\\s*=>", | ||
returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{ | ||
begin:i.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0 | ||
},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:l,contains:f}]}] | ||
},{begin:/,/,relevance:0},{className:"",begin:/\s/,end:/\s*/,skip:!0},{ | ||
variants:[{begin:"<>",end:"</>"},{begin:o.begin,"on:begin":o.isTrulyOpeningTag, | ||
end:o.end}],subLanguage:"xml",contains:[{begin:o.begin,end:o.end,skip:!0, | ||
contains:["self"]}]}],relevance:0},{className:"function", | ||
beginKeywords:"function",end:/[{;]/,excludeEnd:!0,keywords:l, | ||
contains:["self",i.inherit(i.TITLE_MODE,{begin:c}),A],illegal:/%/},{ | ||
beginKeywords:"while if switch catch for"},{className:"function", | ||
begin:i.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{", | ||
returnBegin:!0,contains:[A,i.inherit(i.TITLE_MODE,{begin:c})]},{begin:/\.\.\./, | ||
relevance:0},{begin:r(/\./,t(c)),end:c,excludeBegin:!0,keywords:"prototype", | ||
className:"property",relevance:0},{variants:[{begin:"\\."+c},{begin:"\\$"+c}], | ||
relevance:0},{className:"class",beginKeywords:"class",end:/[{;=]/,excludeEnd:!0, | ||
illegal:/[:"[\]]/,contains:[{beginKeywords:"extends"},i.UNDERSCORE_TITLE_MODE] | ||
},{begin:/\b(?=constructor)/,end:/[{;]/,excludeEnd:!0, | ||
contains:[i.inherit(i.TITLE_MODE,{begin:c}),"self",A]},{ | ||
begin:"(get|set)\\s+(?="+c+"\\()",end:/\{/,keywords:"get set", | ||
contains:[i.inherit(i.TITLE_MODE,{begin:c}),{begin:/\(\)/},A]},{begin:/\$[(.]/}] | ||
}})(i) | ||
;return Object.assign(b.keywords,c),b.exports.PARAMS_CONTAINS.push(o),b.contains=b.contains.concat([o,{ | ||
},b.APOS_STRING_MODE,b.QUOTE_STRING_MODE,p,_,N,A,y,R,{className:"attr", | ||
begin:d+o(":"),relevance:0},B,{ | ||
begin:"("+b.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*", | ||
keywords:"return throw case",relevance:0,contains:[A,b.REGEXP_MODE,{ | ||
className:"function",begin:C,returnBegin:!0,end:"\\s*=>",contains:[{ | ||
className:"params",variants:[{begin:b.UNDERSCORE_IDENT_RE,relevance:0},{ | ||
className:null,begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0, | ||
excludeEnd:!0,keywords:u,contains:w}]}]},{begin:/,/,relevance:0},{match:/\s+/, | ||
relevance:0},{variants:[{begin:"<>",end:"</>"},{begin:g.begin, | ||
"on:begin":g.isTrulyOpeningTag,end:g.end}],subLanguage:"xml",contains:[{ | ||
begin:g.begin,end:g.end,skip:!0,contains:["self"]}]}]},I,{ | ||
beginKeywords:"while if switch catch for"},{ | ||
begin:"\\b(?!function)"+b.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{", | ||
returnBegin:!0,label:"func.def",contains:[S,b.inherit(b.TITLE_MODE,{begin:d, | ||
className:"title.function"})]},{match:/\.\.\./,relevance:0},k,{match:"\\$"+d, | ||
relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"}, | ||
contains:[S]},x,{relevance:0,match:/\b[A-Z][A-Z_]+\b/, | ||
className:"variable.constant"},O,M,{match:/\$[(.]/}]}}(b) | ||
;return Object.assign(m.keywords,d), | ||
m.exports.PARAMS_CONTAINS.push(g),m.contains=m.contains.concat([g,{ | ||
beginKeywords:"namespace",end:/\{/,excludeEnd:!0},{beginKeywords:"interface", | ||
end:/\{/,excludeEnd:!0,keywords:"interface extends" | ||
}]),l(b,"shebang",i.SHEBANG()),l(b,"use_strict",{className:"meta",relevance:10, | ||
}]),u(m,"shebang",b.SHEBANG()),u(m,"use_strict",{className:"meta",relevance:10, | ||
begin:/^\s*['"]use strict['"]/ | ||
}),b.contains.find((e=>"function"===e.className)).relevance=0,Object.assign(b,{ | ||
name:"TypeScript",aliases:["ts","tsx"]}),b}})()); | ||
}),m.contains.find((e=>"func.def"===e.label)).relevance=0,Object.assign(m,{ | ||
name:"TypeScript",aliases:["ts","tsx"]}),m}})()); |
hljs.registerLanguage("vbnet",(()=>{"use strict";function e(e){ | ||
return e?"string"==typeof e?e:e.source:null}function n(...n){ | ||
return n.map((n=>e(n))).join("")}function t(...n){ | ||
return"("+n.map((n=>e(n))).join("|")+")"}return e=>{ | ||
return n.map((n=>e(n))).join("")}function t(...n){return"("+((e=>{ | ||
const n=e[e.length-1] | ||
;return"object"==typeof n&&n.constructor===Object?(e.splice(e.length-1,1),n):{} | ||
})(n).capture?"":"?:")+n.map((n=>e(n))).join("|")+")"}return e=>{ | ||
const a=/\d{1,2}\/\d{1,2}\/\d{4}/,i=/\d{4}-\d{1,2}-\d{1,2}/,s=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,r=/\d{1,2}(:\d{1,2}){1,2}/,o={ | ||
@@ -6,0 +8,0 @@ className:"literal",variants:[{begin:n(/# */,t(i,a),/ *#/)},{ |
hljs.registerLanguage("vbscript",(()=>{"use strict";function e(e){ | ||
return e?"string"==typeof e?e:e.source:null}function t(...t){ | ||
return t.map((t=>e(t))).join("")}function r(...t){ | ||
return"("+t.map((t=>e(t))).join("|")+")"}return e=>{ | ||
return t.map((t=>e(t))).join("")}function r(...t){return"("+((e=>{ | ||
const t=e[e.length-1] | ||
;return"object"==typeof t&&t.constructor===Object?(e.splice(e.length-1,1),t):{} | ||
})(t).capture?"":"?:")+t.map((t=>e(t))).join("|")+")"}return e=>{ | ||
const n=["lcase","month","vartype","instrrev","ubound","setlocale","getobject","rgb","getref","string","weekdayname","rnd","dateadd","monthname","now","day","minute","isarray","cbool","round","formatcurrency","conversions","csng","timevalue","second","year","space","abs","clng","timeserial","fixs","len","asc","isempty","maths","dateserial","atn","timer","isobject","filter","weekday","datevalue","ccur","isdate","instr","datediff","formatdatetime","replace","isnull","right","sgn","array","snumeric","log","cdbl","hex","chr","lbound","msgbox","ucase","getlocale","cos","cdate","cbyte","rtrim","join","hour","oct","typename","trim","strcomp","int","createobject","loadpicture","tan","formatnumber","mid","split","cint","sin","datepart","ltrim","sqr","time","derived","eval","date","formatpercent","exp","inputbox","left","ascw","chrw","regexp","cstr","err"] | ||
@@ -6,0 +8,0 @@ ;return{name:"VBScript",aliases:["vbs"],case_insensitive:!0,keywords:{ |
hljs.registerLanguage("xml",(()=>{"use strict";function e(e){ | ||
return e?"string"==typeof e?e:e.source:null}function n(e){return a("(?=",e,")")} | ||
function a(...n){return n.map((n=>e(n))).join("")}function s(...n){ | ||
return"("+n.map((n=>e(n))).join("|")+")"}return e=>{ | ||
const t=a(/[A-Z_]/,a("(",/[A-Z0-9_.-]*:/,")?"),/[A-Z0-9_.-]*/),i={ | ||
className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},r={begin:/\s/, | ||
return"("+((e=>{const n=e[e.length-1] | ||
;return"object"==typeof n&&n.constructor===Object?(e.splice(e.length-1,1),n):{} | ||
})(n).capture?"":"?:")+n.map((n=>e(n))).join("|")+")"}return e=>{ | ||
const t=a(/[A-Z_]/,a("(?:",/[A-Z0-9_.-]*:/,")?"),/[A-Z0-9_.-]*/),i={ | ||
className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},c={begin:/\s/, | ||
contains:[{className:"meta-keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}] | ||
},c=e.inherit(r,{begin:/\(/,end:/\)/}),l=e.inherit(e.APOS_STRING_MODE,{ | ||
},r=e.inherit(c,{begin:/\(/,end:/\)/}),l=e.inherit(e.APOS_STRING_MODE,{ | ||
className:"meta-string"}),g=e.inherit(e.QUOTE_STRING_MODE,{ | ||
@@ -17,4 +19,4 @@ className:"meta-string"}),m={endsWithParent:!0,illegal:/</,relevance:0, | ||
case_insensitive:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/, | ||
relevance:10,contains:[r,g,l,c,{begin:/\[/,end:/\]/,contains:[{className:"meta", | ||
begin:/<![a-z]/,end:/>/,contains:[r,c,g,l]}]}]},e.COMMENT(/<!--/,/-->/,{ | ||
relevance:10,contains:[c,g,l,r,{begin:/\[/,end:/\]/,contains:[{className:"meta", | ||
begin:/<![a-z]/,end:/>/,contains:[c,r,g,l]}]}]},e.COMMENT(/<!--/,/-->/,{ | ||
relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},i,{ | ||
@@ -21,0 +23,0 @@ className:"meta",begin:/<\?xml/,end:/\?>/,relevance:10},{className:"tag", |
@@ -9,3 +9,3 @@ { | ||
"homepage": "https://highlightjs.org/", | ||
"version": "11.0.0-alpha1", | ||
"version": "11.0.0-beta0", | ||
"author": { | ||
@@ -107,4 +107,7 @@ "name": "Ivan Sagalaev", | ||
"import": "./es/languages/*.js" | ||
} | ||
}, | ||
"./scss/*": "./scss/*", | ||
"./styles/*": "./styles/*", | ||
"./types/*": "./types/*" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1702984
19071