Updated: highlight.js v10.3.2 (#144)
This commit is contained in:
parent
bd0712a4ee
commit
21deb31417
|
@ -433,7 +433,7 @@ helpers.setLastVersion = function (type, version) {
|
|||
} else if (type.includes('/fontawesome/5.')) {
|
||||
return '5.15.1';
|
||||
} else if (type.includes('/highlight.js/10.')) {
|
||||
return '10.3.1';
|
||||
return '10.3.2';
|
||||
} else if (type.includes('/highlight.js/9.')) {
|
||||
return '9.18.3';
|
||||
} else if (type.includes('/history/')) {
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
<li>Updated: Popper.js v2.4.4 -> v2.5.3 (<a href="https://codeberg.org/nobody/LocalCDN/issues/142">#142</a>)</li>
|
||||
<li>Updated: Moment.js v2.24.0 -> v2.29.1 (<a href="https://codeberg.org/nobody/LocalCDN/issues/143">#143</a>)</li>
|
||||
<li>Added: highlight.js v9.18.3 (<a href="https://codeberg.org/nobody/LocalCDN/issues/144">#144</a>)</li>
|
||||
<li>Added: highlight.js v10.3.1 (<a href="https://codeberg.org/nobody/LocalCDN/issues/144">#144</a>)</li>
|
||||
<li>Added: highlight.js v10.3.2 (<a href="https://codeberg.org/nobody/LocalCDN/issues/144">#144</a>)</li>
|
||||
<li>Added: ElementUI v2.13.2 (<a href="https://codeberg.org/nobody/LocalCDN/issues/147">#147</a>)</li>
|
||||
<li>Added: vue-i18n v8.22.1 (<a href="https://codeberg.org/nobody/LocalCDN/issues/147">#147</a>)</li>
|
||||
<li>Added: ElementUI in cdn.bootcss.com (<a href="https://codeberg.org/nobody/LocalCDN/issues/147">#147</a>)</li>
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
hljs.registerLanguage("javascript",function(){"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"],["EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"])
|
||||
;function r(e){return i("(?=",e,")")}function t(e){return i("(",e,")?")}
|
||||
function i(...e){return e.map((e=>{
|
||||
return(n=e)?"string"==typeof n?n:n.source:null;var n})).join("")}
|
||||
return function(c){const o=e,l={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].replace("<","</");return-1!==e.input.indexOf(a,n)})(e,{after:a
|
||||
})||n.ignoreMatch()):n.ignoreMatch()}},g={$pattern:e,keyword:n.join(" "),
|
||||
literal:a.join(" "),built_in:s.join(" ")
|
||||
},d=(e,n)=>`\\b0[${e}][${n}]([${n}_]*[${n}])?n?`,b=/[1-9]([0-9_]*\d)?/,E=/\d([0-9_]*\d)?/,u=i(/[eE][+-]?/,E),_={
|
||||
className:"number",variants:[{begin:d("bB","01")},{begin:d("oO","0-7")},{
|
||||
begin:d("xX","0-9a-fA-F")},{begin:i(/\b/,b,"n")},{begin:i(/(\b0)?\./,E,t(u))},{
|
||||
begin:i(/\b/,b,t(i(/\./,t(E))),t(u))},{begin:/\b0[\.n]?/}],relevance:0},m={
|
||||
className:"subst",begin:"\\$\\{",end:"\\}",keywords:g,contains:[]},N={
|
||||
begin:"html`",end:"",starts:{end:"`",returnEnd:!1,
|
||||
contains:[c.BACKSLASH_ESCAPE,m],subLanguage:"xml"}},y={begin:"css`",end:"",
|
||||
starts:{end:"`",returnEnd:!1,contains:[c.BACKSLASH_ESCAPE,m],subLanguage:"css"}
|
||||
},f={className:"string",begin:"`",end:"`",contains:[c.BACKSLASH_ESCAPE,m]},A={
|
||||
className:"comment",variants:[c.COMMENT("/\\*\\*","\\*/",{relevance:0,
|
||||
contains:[{className:"doctag",begin:"@[A-Za-z]+",contains:[{className:"type",
|
||||
begin:"\\{",end:"\\}",relevance:0},{className:"variable",
|
||||
begin:o+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,
|
||||
relevance:0}]}]}),c.C_BLOCK_COMMENT_MODE,c.C_LINE_COMMENT_MODE]
|
||||
},p=[c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,N,y,f,_,c.REGEXP_MODE]
|
||||
;m.contains=p.concat({begin:/{/,end:/}/,keywords:g,contains:["self"].concat(p)})
|
||||
;const O=[].concat(A,m.contains),T=O.concat([{begin:/\(/,end:/\)/,keywords:g,
|
||||
contains:["self"].concat(O)}]),R={className:"params",begin:/\(/,end:/\)/,
|
||||
excludeBegin:!0,excludeEnd:!0,keywords:g,contains:T};return{name:"Javascript",
|
||||
aliases:["js","jsx","mjs","cjs"],keywords:g,exports:{PARAMS_CONTAINS:T},
|
||||
illegal:/#(?![$_A-z])/,contains:[c.SHEBANG({label:"shebang",binary:"node",
|
||||
relevance:5}),{label:"use_strict",className:"meta",relevance:10,
|
||||
begin:/^\s*['"]use (strict|asm)['"]/
|
||||
},c.APOS_STRING_MODE,c.QUOTE_STRING_MODE,N,y,f,A,_,{
|
||||
begin:i(/[{,\n]\s*/,r(i(/(\/\/.*$)*/,/(\/\*(.|\n)*\*\/)*/,/\s*/,o+"\\s*:"))),
|
||||
relevance:0,contains:[{className:"attr",begin:o+r("\\s*:"),relevance:0}]},{
|
||||
begin:"("+c.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",
|
||||
keywords:"return throw case",contains:[A,c.REGEXP_MODE,{className:"function",
|
||||
begin:"(\\([^()]*(\\([^()]*(\\([^()]*\\))*[^()]*\\))*[^()]*\\)|"+c.UNDERSCORE_IDENT_RE+")\\s*=>",
|
||||
returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{
|
||||
begin:c.UNDERSCORE_IDENT_RE},{className:null,begin:/\(\s*\)/,skip:!0},{
|
||||
begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:g,contains:T}]}]},{
|
||||
begin:/,/,relevance:0},{className:"",begin:/\s/,end:/\s*/,skip:!0},{variants:[{
|
||||
begin:"<>",end:"</>"},{begin:l.begin,"on:begin":l.isTrulyOpeningTag,end:l.end}],
|
||||
subLanguage:"xml",contains:[{begin:l.begin,end:l.end,skip:!0,contains:["self"]}]
|
||||
}],relevance:0},{className:"function",beginKeywords:"function",end:/[{;]/,
|
||||
excludeEnd:!0,keywords:g,contains:["self",c.inherit(c.TITLE_MODE,{begin:o}),R],
|
||||
illegal:/%/},{className:"function",
|
||||
begin:c.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\))*[^()]*\\))*[^()]*\\)\\s*{",
|
||||
returnBegin:!0,contains:[R,c.inherit(c.TITLE_MODE,{begin:o})]},{variants:[{
|
||||
begin:"\\."+o},{begin:"\\$"+o}],relevance:0},{className:"class",
|
||||
beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"\[\]]/,contains:[{
|
||||
beginKeywords:"extends"},c.UNDERSCORE_TITLE_MODE]},{begin:/\b(?=constructor)/,
|
||||
end:/[\{;]/,excludeEnd:!0,contains:[c.inherit(c.TITLE_MODE,{begin:o}),"self",R]
|
||||
},{begin:"(get|set)\\s+(?="+o+"\\()",end:/{/,keywords:"get set",
|
||||
contains:[c.inherit(c.TITLE_MODE,{begin:o}),{begin:/\(\)/},R]},{begin:/\$[(.]/}]
|
||||
}}}());
|
Loading…
Reference in New Issue