2019-11-17 23:15:56 +08:00
var _self = "undefined" !== typeof window ? window : "undefined" !== typeof WorkerGlobalScope && self instanceof WorkerGlobalScope ? self : { } , Prism = function ( ) { var b = /\blang(?:uage)?-([\w-]+)\b/i , e = 0 , c = _self . Prism = { manual : _self . Prism && _self . Prism . manual , disableWorkerMessageHandler : _self . Prism && _self . Prism . disableWorkerMessageHandler , util : { encode : function ( a ) { return a instanceof d ? new d ( a . type , c . util . encode ( a . content ) , a . alias ) : "Array" === c . util . type ( a ) ? a . map ( c . util . encode ) : a . replace ( /&/g , "&" ) . replace ( /</g , "<" ) . replace ( /\u00a0/g ,
" " ) } , type : function ( a ) { return Object . prototype . toString . call ( a ) . match ( /\[object (\w+)\]/ ) [ 1 ] } , objId : function ( a ) { a . _ _id || Object . defineProperty ( a , "__id" , { value : ++ e } ) ; return a . _ _id } , clone : function ( a , f ) { var g = c . util . type ( a ) ; f = f || { } ; switch ( g ) { case "Object" : if ( f [ c . util . objId ( a ) ] ) return f [ c . util . objId ( a ) ] ; var b = { } ; f [ c . util . objId ( a ) ] = b ; for ( var d in a ) a . hasOwnProperty ( d ) && ( b [ d ] = c . util . clone ( a [ d ] , f ) ) ; return b ; case "Array" : if ( f [ c . util . objId ( a ) ] ) return f [ c . util . objId ( a ) ] ; b = [ ] ; f [ c . util . objId ( a ) ] = b ; a . forEach ( function ( a ,
g ) { b [ g ] = c . util . clone ( a , f ) } ) ; return b } return a } } , languages : { extend : function ( a , f ) { a = c . util . clone ( c . languages [ a ] ) ; for ( var g in f ) a [ g ] = f [ g ] ; return a } , insertBefore : function ( a , f , g , b ) { b = b || c . languages ; var l = b [ a ] ; if ( 2 == arguments . length ) { g = arguments [ 1 ] ; for ( var d in g ) g . hasOwnProperty ( d ) && ( l [ d ] = g [ d ] ) ; return l } var e = { } , k ; for ( k in l ) if ( l . hasOwnProperty ( k ) ) { if ( k == f ) for ( d in g ) g . hasOwnProperty ( d ) && ( e [ d ] = g [ d ] ) ; e [ k ] = l [ k ] } c . languages . DFS ( c . languages , function ( f , c ) { c === b [ a ] && f != a && ( this [ f ] = e ) } ) ; return b [ a ] = e } , DFS : function ( a ,
f , g , b ) { b = b || { } ; for ( var d in a ) a . hasOwnProperty ( d ) && ( ( f . call ( a , d , a [ d ] , g || d ) , "Object" !== c . util . type ( a [ d ] ) || b [ c . util . objId ( a [ d ] ) ] ) ? "Array" !== c . util . type ( a [ d ] ) || b [ c . util . objId ( a [ d ] ) ] || ( b [ c . util . objId ( a [ d ] ) ] = ! 0 , c . languages . DFS ( a [ d ] , f , d , b ) ) : ( b [ c . util . objId ( a [ d ] ) ] = ! 0 , c . languages . DFS ( a [ d ] , f , null , b ) ) ) } } , plugins : { } , highlightAll : function ( a , f ) { c . highlightAllUnder ( document , a , f ) } , highlightAllUnder : function ( a , f , b ) { b = { callback : b , selector : 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code' } ;
c . hooks . run ( "before-highlightall" , b ) ; a = b . elements || a . querySelectorAll ( b . selector ) ; for ( var g = 0 , d ; d = a [ g ++ ] ; ) c . highlightElement ( d , ! 0 === f , b . callback ) } , highlightElement : function ( a , f , g ) { for ( var d , e , k = a ; k && ! b . test ( k . className ) ; ) k = k . parentNode ; k && ( d = ( k . className . match ( b ) || [ , "" ] ) [ 1 ] . toLowerCase ( ) , e = c . languages [ d ] ) ; a . className = a . className . replace ( b , "" ) . replace ( /\s+/g , " " ) + " language-" + d ; a . parentNode && ( k = a . parentNode , /pre/i . test ( k . nodeName ) && ( k . className = k . className . replace ( b , "" ) . replace ( /\s+/g , " " ) + " language-" +
d ) ) ; var h = { element : a , language : d , grammar : e , code : a . textContent } ; c . hooks . run ( "before-sanity-check" , h ) ; h . code && h . grammar ? ( c . hooks . run ( "before-highlight" , h ) , f && _self . Worker ? ( a = new Worker ( c . filename ) , a . onmessage = function ( a ) { h . highlightedCode = a . data ; c . hooks . run ( "before-insert" , h ) ; h . element . innerHTML = h . highlightedCode ; g && g . call ( h . element ) ; c . hooks . run ( "after-highlight" , h ) ; c . hooks . run ( "complete" , h ) } , a . postMessage ( JSON . stringify ( { language : h . language , code : h . code , immediateClose : ! 0 } ) ) ) : ( h . highlightedCode = c . highlight ( h . code ,
h . grammar , h . language ) , c . hooks . run ( "before-insert" , h ) , h . element . innerHTML = h . highlightedCode , g && g . call ( a ) , c . hooks . run ( "after-highlight" , h ) , c . hooks . run ( "complete" , h ) ) ) : ( h . code && ( c . hooks . run ( "before-highlight" , h ) , h . element . textContent = h . code , c . hooks . run ( "after-highlight" , h ) ) , c . hooks . run ( "complete" , h ) ) } , highlight : function ( a , b , g ) { a = { code : a , grammar : b , language : g } ; c . hooks . run ( "before-tokenize" , a ) ; a . tokens = c . tokenize ( a . code , a . grammar ) ; c . hooks . run ( "after-tokenize" , a ) ; return d . stringify ( c . util . encode ( a . tokens ) ,
a . language ) } , matchGrammar : function ( a , b , g , d , e , k , h ) { var f = c . Token , l ; for ( l in g ) if ( g . hasOwnProperty ( l ) && g [ l ] ) { if ( l == h ) break ; var r = g [ l ] ; r = "Array" === c . util . type ( r ) ? r : [ r ] ; for ( var w = 0 ; w < r . length ; ++ w ) { var p = r [ w ] , B = p . inside , C = ! ! p . lookbehind , z = ! ! p . greedy , A = 0 , D = p . alias ; if ( z && ! p . pattern . global ) { var q = p . pattern . toString ( ) . match ( /[imuy]*$/ ) [ 0 ] ; p . pattern = RegExp ( p . pattern . source , q + "g" ) } p = p . pattern || p ; q = d ; for ( var u = e ; q < b . length ; u += b [ q ] . length , ++ q ) { var n = b [ q ] ; if ( b . length > a . length ) return ; if ( ! ( n instanceof f ) ) { if ( z &&
q != b . length - 1 ) { p . lastIndex = u ; var m = p . exec ( a ) ; if ( ! m ) break ; var v = m . index + ( C ? m [ 1 ] . length : 0 ) , y = m . index + m [ 0 ] . length , t = q ; n = u ; for ( var E = b . length ; t < E && ( n < y || ! b [ t ] . type && ! b [ t - 1 ] . greedy ) ; ++ t ) n += b [ t ] . length , v >= n && ( ++ q , u = n ) ; if ( b [ q ] instanceof f ) continue ; t -= q ; n = a . slice ( u , n ) ; m . index -= u } else p . lastIndex = 0 , m = p . exec ( n ) , t = 1 ; m && ( C && ( A = m [ 1 ] ? m [ 1 ] . length : 0 ) , v = m . index + A , m = m [ 0 ] . slice ( A ) , y = v + m . length , v = n . slice ( 0 , v ) , y = n . slice ( y ) , n = [ q , t ] , v && ( ++ q , u += v . length , n . push ( v ) ) , m = new f ( l , B ? c . tokenize ( m , B ) : m , D , m , z ) , n . push ( m ) , y && n . push ( y ) ,
Array . prototype . splice . apply ( b , n ) , 1 != t && c . matchGrammar ( a , b , g , q , u , ! 0 , l ) ) ; if ( k ) break } } } } } , tokenize : function ( a , b , d ) { d = [ a ] ; var f = b . rest ; if ( f ) { for ( var g in f ) b [ g ] = f [ g ] ; delete b . rest } c . matchGrammar ( a , d , b , 0 , 0 , ! 1 ) ; return d } , hooks : { all : { } , add : function ( a , b ) { var d = c . hooks . all ; d [ a ] = d [ a ] || [ ] ; d [ a ] . push ( b ) } , run : function ( a , b ) { if ( ( a = c . hooks . all [ a ] ) && a . length ) for ( var d = 0 , f ; f = a [ d ++ ] ; ) f ( b ) } } } , d = c . Token = function ( a , b , d , c , e ) { this . type = a ; this . content = b ; this . alias = d ; this . length = ( c || "" ) . length | 0 ; this . greedy = ! ! e } ; d . stringify =
function ( a , b , g ) { if ( "string" == typeof a ) return a ; if ( "Array" === c . util . type ( a ) ) return a . map ( function ( c ) { return d . stringify ( c , b , a ) } ) . join ( "" ) ; var f = { type : a . type , content : d . stringify ( a . content , b , g ) , tag : "span" , classes : [ "token" , a . type ] , attributes : { } , language : b , parent : g } ; a . alias && ( g = "Array" === c . util . type ( a . alias ) ? a . alias : [ a . alias ] , Array . prototype . push . apply ( f . classes , g ) ) ; c . hooks . run ( "wrap" , f ) ; g = Object . keys ( f . attributes ) . map ( function ( a ) { return a + '="' + ( f . attributes [ a ] || "" ) . replace ( /"/g , """ ) + '"' } ) . join ( " " ) ;
return "<" + f . tag + ' class="' + f . classes . join ( " " ) + '"' + ( g ? " " + g : "" ) + ">" + f . content + "</" + f . tag + ">" } ; if ( ! _self . document ) { if ( ! _self . addEventListener ) return _self . Prism ; c . disableWorkerMessageHandler || _self . addEventListener ( "message" , function ( a ) { a = JSON . parse ( a . data ) ; var b = a . language , d = a . immediateClose ; _self . postMessage ( c . highlight ( a . code , c . languages [ b ] , b ) ) ; d && _self . close ( ) } , ! 1 ) ; return _self . Prism } var k = document . currentScript || [ ] . slice . call ( document . getElementsByTagName ( "script" ) ) . pop ( ) ; k && ( c . filename = k . src ,
c . manual || k . hasAttribute ( "data-manual" ) || ( "loading" !== document . readyState ? window . requestAnimationFrame ? window . requestAnimationFrame ( c . highlightAll ) : window . setTimeout ( c . highlightAll , 16 ) : document . addEventListener ( "DOMContentLoaded" , c . highlightAll ) ) ) ; return _self . Prism } ( ) ; "undefined" !== typeof module && module . exports && ( module . exports = Prism ) ; "undefined" !== typeof global && ( global . Prism = Prism ) ;
Prism . languages . markup = { comment : /\x3c!--[\s\S]*?--\x3e/ , prolog : /<\?[\s\S]+?\?>/ , doctype : /<!DOCTYPE[\s\S]+?>/i , cdata : /<!\[CDATA\[[\s\S]*?]]\x3e/i , tag : { pattern : /<\/?(?!\d)[^\s>\/=$<%]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i , greedy : ! 0 , inside : { tag : { pattern : /^<\/?[^\s>\/]+/i , inside : { punctuation : /^<\/?/ , namespace : /^[^\s>\/:]+:/ } } , "attr-value" : { pattern : /=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+)/i , inside : { punctuation : [ /^=/ , { pattern : /(^|[^\\])["']/ , lookbehind : ! 0 } ] } } ,
punctuation : /\/?>/ , "attr-name" : { pattern : /[^\s>\/]+/ , inside : { namespace : /^[^\s>\/:]+:/ } } } } , entity : /&#?[\da-z]{1,8};/i } ; Prism . languages . markup . tag . inside [ "attr-value" ] . inside . entity = Prism . languages . markup . entity ; Prism . hooks . add ( "wrap" , function ( b ) { "entity" === b . type && ( b . attributes . title = b . content . replace ( /&/ , "&" ) ) } ) ; Prism . languages . xml = Prism . languages . markup ; Prism . languages . html = Prism . languages . markup ; Prism . languages . mathml = Prism . languages . markup ; Prism . languages . svg = Prism . languages . markup ;
Prism . languages . css = { comment : /\/\*[\s\S]*?\*\// , atrule : { pattern : /@[\w-]+?.*?(?:;|(?=\s*\{))/i , inside : { rule : /@[\w-]+/ } } , url : /url\((?:(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|.*?)\)/i , selector : /[^{}\s][^{};]*?(?=\s*\{)/ , string : { pattern : /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/ , greedy : ! 0 } , property : /[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*(?=\s*:)/i , important : /\B!important\b/i , "function" : /[-a-z0-9]+(?=\()/i , punctuation : /[(){};:]/ } ; Prism . languages . css . atrule . inside . rest = Prism . languages . css ;
Prism . languages . markup && ( Prism . languages . insertBefore ( "markup" , "tag" , { style : { pattern : /(<style[\s\S]*?>)[\s\S]*?(?=<\/style>)/i , lookbehind : ! 0 , inside : Prism . languages . css , alias : "language-css" , greedy : ! 0 } } ) , Prism . languages . insertBefore ( "inside" , "attr-value" , { "style-attr" : { pattern : /\s*style=("|')(?:\\[\s\S]|(?!\1)[^\\])*\1/i , inside : { "attr-name" : { pattern : /^\s*style/i , inside : Prism . languages . markup . tag . inside } , punctuation : /^\s*=\s*['"]|['"]\s*$/ , "attr-value" : { pattern : /.+/i , inside : Prism . languages . css } } , alias : "language-css" } } ,
Prism . languages . markup . tag ) ) ;
Prism . languages . clike = { comment : [ { pattern : /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/ , lookbehind : ! 0 } , { pattern : /(^|[^\\:])\/\/.*/ , lookbehind : ! 0 , greedy : ! 0 } ] , string : { pattern : /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/ , greedy : ! 0 } , "class-name" : { pattern : /((?:\b(?:class|interface|extends|implements|trait|instanceof|new)\s+)|(?:catch\s+\())[\w.\\]+/i , lookbehind : ! 0 , inside : { punctuation : /[.\\]/ } } , keyword : /\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/ , "boolean" : /\b(?:true|false)\b/ ,
"function" : /[a-z0-9_]+(?=\()/i , number : /\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i , operator : /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/ , punctuation : /[{}[\];(),.:]/ } ;
Prism . languages . javascript = Prism . languages . extend ( "clike" , { keyword : /\b(?:as|async|await|break|case|catch|class|const|continue|debugger|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|set|static|super|switch|this|throw|try|typeof|var|void|while|with|yield)\b/ , object : /\b(?:ActiveXObject|Array|Audio|Boolean|Date|Debug|Enumerator|Error|FileReader|Function|Global|Image|JSON|Math|Number|Object|Option|RegExp|String|VBArray|arguments|WebSocket|Worker|XMLHttpRequest|window|document|options|console|_this|that|result)\b/ ,
number : /\b(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/ , "function" : /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\()/i , operator : /-[-=]?|\+[+=]?|!=?=?|<<?=?|>>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\$|\.{3}/ } ) ;
2020-07-23 13:28:12 +08:00
Prism . languages . dart = Prism . languages . extend ( "clike" , { string : [ { pattern : /r?("""|''')[\s\S]*?\1/ , greedy : ! 0 } , { pattern : /r?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/ , greedy : ! 0 } ] , keyword : [ /\b(?:async|sync|yield)\*/ , /\b(?:abstract|assert|async|await|break|case|catch|class|const|continue|covariant|default|deferred|do|dynamic|else|enum|export|extension|external|extends|factory|final|finally|for|Function|get|hide|if|implements|interface|import|in|library|mixin|new|null|on|operator|part|rethrow|return|set|show|static|super|switch|sync|this|throw|try|typedef|var|void|while|with|yield)\b/ ] , operator : /\bis!|\b(?:as|is)\b|\+\+|--|&&|\|\||<<=?|>>=?|~(?:\/=?)?|[+\-*\/%&^|=!<>]=?|\?/ } ) , Prism . languages . insertBefore ( "dart" , "function" , { metadata : { pattern : /@\w+/ , alias : "symbol" } } ) ;
! function ( n ) { n . languages . kotlin = n . languages . extend ( "clike" , { keyword : { pattern : /(^|[^.])\b(?:abstract|actual|annotation|as|break|by|catch|class|companion|const|constructor|continue|crossinline|data|do|dynamic|else|enum|expect|external|final|finally|for|fun|get|if|import|in|infix|init|inline|inner|interface|internal|is|lateinit|noinline|null|object|open|operator|out|override|package|private|protected|public|reified|return|sealed|set|super|suspend|tailrec|this|throw|to|try|typealias|val|var|vararg|when|where|while)\b/ , lookbehind : ! 0 } , function : [ /\w+(?=\s*\()/ , { pattern : /(\.)\w+(?=\s*\{)/ , lookbehind : ! 0 } ] , number : /\b(?:0[xX][\da-fA-F]+(?:_[\da-fA-F]+)*|0[bB][01]+(?:_[01]+)*|\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?[fFL]?)\b/ , operator : /\+[+=]?|-[-=>]?|==?=?|!(?:!|==?)?|[\/*%<>]=?|[?:]:?|\.\.|&&|\|\||\b(?:and|inv|or|shl|shr|ushr|xor)\b/ } ) , delete n . languages . kotlin [ "class-name" ] , n . languages . insertBefore ( "kotlin" , "string" , { "raw-string" : { pattern : /("""|''')[\s\S]*?\1/ , alias : "string" } } ) , n . languages . insertBefore ( "kotlin" , "keyword" , { annotation : { pattern : /\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/ , alias : "builtin" } } ) , n . languages . insertBefore ( "kotlin" , "function" , { label : { pattern : /\w+@|@\w+/ , alias : "symbol" } } ) ; var e = [ { pattern : /\$\{[^}]+\}/ , inside : { delimiter : { pattern : /^\$\{|\}$/ , alias : "variable" } , rest : n . languages . kotlin } } , { pattern : /\$\w+/ , alias : "variable" } ] ; n . languages . kotlin . string . inside = n . languages . kotlin [ "raw-string" ] . inside = { interpolation : e } , n . languages . kt = n . languages . kotlin , n . languages . kts = n . languages . kotlin } ( Prism ) ;
2019-11-17 23:15:56 +08:00
Prism . languages . insertBefore ( "javascript" , "keyword" , { regex : { pattern : /((?:^|[^$\w\xA0-\uFFFF."'\])\s])\s*)\/(\[[^\]\r\n]+]|\\.|[^/\\\[\r\n])+\/[gimyu]{0,5}(?=\s*($|[\r\n,.})\]]))/ , lookbehind : ! 0 , greedy : ! 0 } , "function-variable" : { pattern : /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=\s*(?:function\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i , alias : "function" } , constant : /\b[A-Z][A-Z\d_]*\b/ } ) ;
Prism . languages . insertBefore ( "javascript" , "string" , { "template-string" : { pattern : /`(?:\\[\s\S]|\${[^}]+}|[^\\`])*`/ , greedy : ! 0 , inside : { interpolation : { pattern : /\${[^}]+}/ , inside : { "interpolation-punctuation" : { pattern : /^\${|}$/ , alias : "punctuation" } , rest : null } } , string : /[\s\S]+/ } } } ) ; Prism . languages . javascript [ "template-string" ] . inside . interpolation . inside . rest = Prism . languages . javascript ;
Prism . languages . markup && Prism . languages . insertBefore ( "markup" , "tag" , { script : { pattern : /(<script[\s\S]*?>)[\s\S]*?(?=<\/script>)/i , lookbehind : ! 0 , inside : Prism . languages . javascript , alias : "language-javascript" , greedy : ! 0 } } ) ; Prism . languages . js = Prism . languages . javascript ;
2020-06-29 20:40:05 +08:00
! function ( e ) { for ( var t = "/\\*(?:[^*/]|\\*(?!/)|/(?!\\*)|<self>)*\\*/" , a = 0 ; a < 2 ; a ++ ) t = t . replace ( /<self>/g , function ( ) { return t } ) ; t = t . replace ( /<self>/g , function ( ) { return "[^\\s\\S]" } ) , e . languages . rust = { comment : [ { pattern : RegExp ( "(^|[^\\\\])" + t ) , lookbehind : ! 0 , greedy : ! 0 } , { pattern : /(^|[^\\:])\/\/.*/ , lookbehind : ! 0 , greedy : ! 0 } ] , string : { pattern : /b?"(?:\\[\s\S]|[^\\"])*"|b?r(#*)"(?:[^"]|"(?!\1))*"\1/ , greedy : ! 0 } , char : { pattern : /b?'(?:\\(?:x[0-7][\da-fA-F]|u{(?:[\da-fA-F]_*){1,6}|.)|[^\\\r\n\t'])'/ , greedy : ! 0 , alias : "string" } , attribute : { pattern : /#!?\[[^[\]]*\]/ , greedy : ! 0 , alias : "attr-name" , inside : { string : null } } , "closure-params" : { pattern : /([=(,:]\s*|\bmove\s*)\|[^|]*\||\|[^|]*\|(?=\s*(?:\{|->))/ , lookbehind : ! 0 , greedy : ! 0 , inside : { "closure-punctuation" : { pattern : /^\||\|$/ , alias : "punctuation" } , rest : null } } , "lifetime-annotation" : { pattern : /'\w+/ , alias : "symbol" } , "fragment-specifier" : { pattern : /(\$\w+:)[a-z]+/ , lookbehind : ! 0 , alias : "punctuation" } , variable : /\$\w+/ , "function-definition" : { pattern : /(\bfn\s*)\w+/ , lookbehind : ! 0 , alias : "function" } , keyword : [ /\b(?:abstract|as|async|await|become|box|break|const|continue|crate|do|dyn|else|enum|extern|final|fn|for|if|impl|in|let|loop|macro|match|mod|move|mut|override|priv|pub|ref|return|self|Self|static|struct|super|trait|try|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/ , /\b(?:[ui](?:8|16|32|64|128|size)|f(?:32|64)|bool|char)\b/ ] , function : /\b[a-z_]\w*(?=\s*(?:::\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*)?\()/ , macro : { pattern : /\w+!/ , alias : "property" } , number : /\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0o[0-7](?:_?[0-7])*|0b[01](?:_?[01])*|(?:\d(?:_?\d)*)?\.?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)(?:_?(?:[iu](?:8|16|32|64|size)?|f32|f64))?\b/ , boolean : /\b(?:false|true)\b/ , punctuation : /->|\.\.=|\.{1,3}|::|[{}[\];(),:]/ , operator : /[-+*\/%!^]=?|=[=>]?|&[&=]?|\|[|=]?|<<?=?|>>?=?|[@?]/ } , e . languages . rust [ "closure-params" ] . inside . rest = e . languages . rust , e . languages . rust . attribute . inside . string = e . languages . rust . string } ( Prism ) ;
2019-11-17 23:15:56 +08:00
Prism . languages . apacheconf = { comment : /#.*/ , "directive-inline" : { pattern : / ^ ( \ s * ) \ b ( ? : A c c e p t F i l t e r | A c c e p t P a t h I n f o | A c c e s s F i l e N a m e | A c t i o n | A d d A l t | A d d A l t B y E n c o d i n g | A d d A l t B y T y p e | A d d C h a r s e t | A d d D e f a u l t C h a r s e t | A d d D e s c r i p t i o n | A d d E n c o d i n g | A d d H a n d l e r | A d d I c o n | A d d I c o n B y E n c o d i n g | A d d I c o n B y T y p e | A d d I n p u t F i l t e r | A d d L a n g u a g e | A d d M o d u l e I n f o | A d d O u t p u t F i l t e r | A d d O u t p u t F i l t e r B y T y p e | A d d T y p e | A l i a s | A l i a s M a t c h | A l l o w | A l l o w C O N N E C T | A l l o w E n c o d e d S l a s h e s | A l l o w M e t h o d s | A l l o w O v e r r i d e | A l l o w O v e r r i d e L i s t | A n o n y m o u s | A n o n y m o u s _ L o g E m a i l | A n o n y m o u s _ M u s t G i v e E m a i l | A n o n y m o u s _ N o U s e r I D | A n o n y m o u s _ V e r i f y E m a i l | A s y n c R e q u e s t W o r k e r F a c t o r | A u t h B a s i c A u t h o r i t a t i v e | A u t h B a s i c F a k e | A u t h B a s i c P r o v i d e r | A u t h B a s i c U s e D i g e s t A l g o r i t h m | A u t h D B D U s e r P W Q u e r y | A u t h D B D U s e r R e a l m Q u e r y | A u t h D B M G r o u p F i l e | A u t h D B M T y p e | A u t h D B M U s e r F i l e | A u t h D i g e s t A l g o r i t h m | A u t h D i g e s t D o m a i n | A u t h D i g e s t N o n c e L i f e t i m e | A u t h D i g e s t P r o v i d e r | A u t h D i g e s t Q o p | A u t h D i g e s t S h m e m S i z e | A u t h F o r m A u t h o r i t a t i v e | A u t h F o r m B o d y | A u t h F o r m D i s a b l e N o S t o r e | A u t h F o r m F a k e B a s i c A u t h | A u t h F o r m L o c a t i o n | A u t h F o r m L o g i n R e q u i r e d L o c a t i o n | A u t h F o r m L o g i n S u c c e s s L o c a t i o n | A u t h F o r m L o g o u t L o c a t i o n | A u t h F o r m M e t h o d | A u t h F o r m M i m e t y p e | A u t h F o r m P a s s w o r d | A u t h F o r m P r o v i d e r | A u t h F o r m S i t e P a s s p h r a s e | A u t h F o r m S i z e | A u t h F o r m U s e r n a m e | A u t h G r o u p F i l e | A u t h L D A P A u t h o r i z e P r e f i x | A u t h L D A P B i n d A u t h o r i t a t i v e | A u t h L D A P B i n d D N | A u t h L D A P B i n d P a s s w o r d | A u t h L D A P C h a r s e t C o n f i g | A u t h L D A P C o m p a r e A s U s e r | A u t h L D A P C o m p a r e D N O n S e r v e r | A u t h L D A P D e r e f e r e n c e A l i a s e s | A u t h L D A P G r o u p A t t r i b u t e | A u t h L D A P G r o u p A t t r i b u t e I s D N | A u t h L D A P I n i t i a l B i n d A s U s e r | A u t h L D A P I n i t i a l B i n d P a t t e r n | A u t h L D A P M a x S u b G r o u p D e p t h | A u t h L D A P R e m o t e U s e r A t t r i b u t e | A u t h L D A P R e m o t e U s e r I s D N | A u t h L D A P S e a r c h A s U s e r | A u t h L D A P S u b G r o u p A t t r i b u t e | A u t h L D A P S u b G r o u p C l a s s | A u t h L D A P U r l | A u t h M e r g i n g | A u t h N a m e | A u t h n C a c h e C o n t e x t | A u t h n C a c h e E n a b l e | A u t h n C a c h e P r o v i d e F o r | A u t h n C a c h e S O C a c h e | A u t h n C a c h e T i m e o u t | A u t h n z F c g i C h e c k A u t h n P r o v i d e r | A u t h n z F c g i D e f i n e P r o v i d e r | A u t h T y p e | A u t h U s e r F i l e | A u t h z D B D L o g i n T o R e f e r e r | A u t h z D B D Q u e r y | A u t h z D B D R e d i r e c t Q u e r y | A u t h z D B M T y p e | A u t h z S e n d F o r b i d d e n O n F a i l u r e | B a l a n c e r G r o w t h | B a l a n c e r I n h e r i t | B a l a n c e r M e m b e r | B a l a n c e r P e r s i s t | B r o w s e r M a t c h | B r o w s e r M a t c h N o C a s e | B u f f e r e d L o g s | B u f f e r S i z e | C a c h e D e f a u l t E x p i r e | C a c h e D e t a i l H e a d e r | C a c h e D i r L e n g t h | C a c h e D i r L e v e l s | C a c h e D i s a b l e | C a c h e E n a b l e | C a c h e F i l e | C a c h e H e a d e r | C a c h e I g n o r e C a c h e C o n t r o l | C a c h e I g n o r e H e a d e r s | C a c h e I g n o r e N o L a s t M o d | C a c h e I g n o r e Q u e r y S t r i n g | C a c h e I g n o r e U R L S e s s i o n I d e n t i f i e r s | C a c h e K e y B a s e U R L | C a c h e L a s t M o d i f i e d F a c t o r | C a c h e L o c k | C a c h e L o c k M a x A g e | C a c h e L o c k P a t h | C a c h e M a x E x p i r e | C a c h e M a x F i l e S i z e | C a c h e M i n E x p i r e | C a c h e M i n F i l e S i z e | C a c h e N e g o t i a t e d D o c s | C a c h e Q u i c k H a n d l e r | C a c h e R e a d S i z e | C a c h e R e a d T i m e | C a c h e R o o t | C a c h e S o c a c h e | C a c h e S o c a c h e M a x S i z e | C a c h e S o c a c h e M a x T i m e | C a c h e S o c a c h e M i n T i m e | C a c h e S o c a c h e R e a d S i z e | C a c h e S o c a c h e R e a d T i m e | C a c h e S t a l e O n E r r o r | C a c h e S t o r e E x p i r e d | C a c h e S t o r e N o S t o r e | C a c h e S t o r e P r i v a t e | C G I D S c r i p t T i m e o u t | C G I M a p E x t e n s i o n | C h a r s e t D e f a u l t | C h a r s e t O p t i o n s | C h a r s e t S o u r c e E n c | C h e c k C a s e O n l y | C h e c k S p e l l i n g | C h r o o t D i r | C o n t e n t D i g e s t | C o o k i e D o m a i n | C o o k i e E x p i r e s | C o o k i e N a m e | C o o k i e S t y l e | C o o k i e T r a c k i n g | C o r e D u m p D i r e c t o r y | C u s t o m L o g | D a v | D a v D e p t h I n f i n i t y | D a v G e n e r i c L o c k D B | D a v L o c k D B | D a v M i n T i m e o u t | D B D E x p t i m e | D B D I n i t S Q L | D B D K e e p | D B D M a x | D B D M i n | D B D P a r a m s | D B D P e r s i s t | D B D P r e p a r e S Q L | D B D r i v e r | D e f a u l t I c o n | D e f a u l t L a n g u a g e | D e f a u l t R u n t i m e D i r | D e f a u l t T y p e | D e f i n e | D e f l a t e B u f f e r S i z e | D e f l a t e C o m p r e s s i o n L e v e l | D e f l a t e F i l t e r N o t e | D e f l a t e I n f l a t e L i m i t R e q u e s t B o d y | D e f l a t e I n f l a t e R a t i o B u r s t | D e f l a t e I n f l a t e R a t i o L i m i t | D e f l a t e M e m L e v e l | D e f l a t e W i n d o w S i z e | D e n y | D i r e c t o r y C h e c k H a n d l e r | D i r e c t o r y I n d e x | D i r e c t o r y I n d e x R e d i r e c t | D i r e c t o r y S l a s h | D o c u m e n t R o o t | D T r a c e P r i v i l e g e s | D u m p I O I n p u t | D u m p I O O u t p u t | E n a b l e E x c e p t i o n H o o k | E n a b l e M M A P | E n a b l e S e n d f i l e | E r r o r | E r r o r D o c u m e n t | E r r o r L o g | E r r o r L o g F o r m a t | E x a m p l e | E x p i r e s A c t i v e | E x p i r e s B y T y p e | E x p i r e s D e f a u l t | E x t e n d e d S t a t u s | E x t F i l t e r D e f i n e | E x t F i l t e r O p t i o n s | F a l l b a c k R e s o u r c e | F i l e E T a g | F i l t e r C h a i n | F i l t e r D e c l a r e | F i l t e r P r o t o c o l | F i l t e r P r o v i d e r | F i l t e r T r a c e | F o r c e L a n g u a g e P r i o r i t y | F o r c e T y p e | F o r e n s i c L o g | G p r o f D i r | G r a c e f u l S h u t d o w n T i m e o u t | G r o u p | H e a d e r | H e a d e r N a m e | H e a r t b e a t A d d r e s s | H e a r t b e a t L i s t e n | H e a r t b e a t M a x S e r v e r s | H e a r t b e a t S t o r a g e | H e a r t b e a t S t o r a g e | H o s t n a m e L o o k u p s | I d e n t i t y C h e c k | I d e n t i t y C h e c k T i m e o u t | I m a p B a s e | I m a p D e f a u l t | I m a p M e n u | I n c l u d e | I n c l u d e O p t i o n a l | I n d e x H e a d I n s e r t | I n d e x I g n o r e | I n d e x I g n o r e R e s e t | I n d e x O p t i o n s | I n d e x O r d e r D e f a u l t | I n d e x S t y l e S h e e t | I n p u t S e
alias : "property" } , "directive-block" : { pattern : /<\/?\b(?:AuthnProviderAlias|AuthzProviderAlias|Directory|DirectoryMatch|Else|ElseIf|Files|FilesMatch|If|IfDefine|IfModule|IfVersion|Limit|LimitExcept|Location|LocationMatch|Macro|Proxy|RequireAll|RequireAny|RequireNone|VirtualHost)\b *.*>/i , inside : { "directive-block" : { pattern : /^<\/?\w+/ , inside : { punctuation : /^<\/?/ } , alias : "tag" } , "directive-block-parameter" : { pattern : /.*[^>]/ , inside : { punctuation : /:/ , string : { pattern : /("|').*\1/ , inside : { variable : /[$%]\{?(?:\w\.?[-+:]?)+\}?/ } } } ,
alias : "attr-value" } , punctuation : />/ } , alias : "tag" } , "directive-flags" : { pattern : /\[(?:\w,?)+\]/ , alias : "keyword" } , string : { pattern : /("|').*\1/ , inside : { variable : /[$%]\{?(?:\w\.?[-+:]?)+\}?/ } } , variable : /[$%]\{?(?:\w\.?[-+:]?)+\}?/ , regex : /\^?.*\$|\^.*\$?/ } ;
Prism . languages . c = Prism . languages . extend ( "clike" , { keyword : /\b(?:_Alignas|_Alignof|_Atomic|_Bool|_Complex|_Generic|_Imaginary|_Noreturn|_Static_assert|_Thread_local|asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while)\b/ , operator : /-[>-]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/]/ , number : /(?:\b0x[\da-f]+|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?)[ful]*/i } ) ;
Prism . languages . insertBefore ( "c" , "string" , { macro : { pattern : /(^\s*)#\s*[a-z]+(?:[^\r\n\\]|\\(?:\r\n|[\s\S]))*/im , lookbehind : ! 0 , alias : "property" , inside : { string : { pattern : /(#\s*include\s*)(?:<.+?>|("|')(?:\\?.)+?\2)/ , lookbehind : ! 0 } , directive : { pattern : /(#\s*)\b(?:define|defined|elif|else|endif|error|ifdef|ifndef|if|import|include|line|pragma|undef|using)\b/ , lookbehind : ! 0 , alias : "keyword" } } } , constant : /\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/ } ) ;
delete Prism . languages . c [ "class-name" ] ; delete Prism . languages . c [ "boolean" ] ; Prism . languages . aspnet = Prism . languages . extend ( "markup" , { "page-directive tag" : { pattern : /<%\s*@.*%>/i , inside : { "page-directive tag" : /<%\s*@\s*(?:Assembly|Control|Implements|Import|Master(?:Type)?|OutputCache|Page|PreviousPageType|Reference|Register)?|%>/i , rest : Prism . languages . markup . tag . inside } } , "directive tag" : { pattern : /<%.*%>/i , inside : { "directive tag" : /<%\s*?[$=%#:]{0,2}|%>/i , rest : Prism . languages . csharp } } } ) ;
Prism . languages . aspnet . tag . pattern = /<(?!%)\/?[^\s>\/]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i ; Prism . languages . insertBefore ( "inside" , "punctuation" , { "directive tag" : Prism . languages . aspnet [ "directive tag" ] } , Prism . languages . aspnet . tag . inside [ "attr-value" ] ) ; Prism . languages . insertBefore ( "aspnet" , "comment" , { "asp comment" : /<%--[\s\S]*?--%>/ } ) ;
Prism . languages . insertBefore ( "aspnet" , Prism . languages . javascript ? "script" : "tag" , { "asp script" : { pattern : /(<script(?=.*runat=['"]?server['"]?)[\s\S]*?>)[\s\S]*?(?=<\/script>)/i , lookbehind : ! 0 , inside : Prism . languages . csharp || { } } } ) ;
( function ( b ) { var e = { variable : [ { pattern : /\$?\(\([\s\S]+?\)\)/ , inside : { variable : [ { pattern : /(^\$\(\([\s\S]+)\)\)/ , lookbehind : ! 0 } , /^\$\(\(/ ] , number : /\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee]-?\d+)?/ , operator : /--?|-=|\+\+?|\+=|!=?|~|\*\*?|\*=|\/=?|%=?|<<=?|>>=?|<=?|>=?|==?|&&?|&=|\^=?|\|\|?|\|=|\?|:/ , punctuation : /\(\(?|\)\)?|,|;/ } } , { pattern : /\$\([^)]+\)|`[^`]+`/ , greedy : ! 0 , inside : { variable : /^\$\(|^`|\)$|`$/ } } , /\$(?:[\w#?*!@]+|\{[^}]+\})/i ] } ; b . languages . bash = { shebang : { pattern : /^#!\s*\/bin\/bash|^#!\s*\/bin\/sh/ ,
alias : "important" } , comment : { pattern : /(^|[^"{\\])#.*/ , lookbehind : ! 0 } , string : [ { pattern : /((?:^|[^<])<<\s*)["']?(\w+?)["']?\s*\r?\n(?:[\s\S])*?\r?\n\2/ , lookbehind : ! 0 , greedy : ! 0 , inside : e } , { pattern : /(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1/ , greedy : ! 0 , inside : e } ] , variable : e . variable , "function" : { pattern : /(^|[\s;|&])(?:alias|apropos|apt-get|aptitude|aspell|awk|basename|bash|bc|bg|builtin|bzip2|cal|cat|cd|cfdisk|chgrp|chmod|chown|chroot|chkconfig|cksum|clear|cmp|comm|command|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|df|diff|diff3|dig|dir|dircolors|dirname|dirs|dmesg|du|egrep|eject|enable|env|ethtool|eval|exec|expand|expect|export|expr|fdformat|fdisk|fg|fgrep|file|find|fmt|fold|format|free|fsck|ftp|fuser|gawk|getopts|git|grep|groupadd|groupdel|groupmod|groups|gzip|hash|head|help|hg|history|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|jobs|join|kill|killall|less|link|ln|locate|logname|logout|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|make|man|mkdir|mkfifo|mkisofs|mknod|more|most|mount|mtools|mtr|mv|mmv|nano|netstat|nice|nl|nohup|notify-send|npm|nslookup|open|op|passwd|paste|pathchk|ping|pkill|popd|pr|printcap|printenv|printf|ps|pushd|pv|pwd|quota|quotacheck|quotactl|ram|rar|rcp|read|readarray|readonly|reboot|rename|renice|remsync|rev|rm|rmdir|rsync|screen|scp|sdiff|sed|seq|service|sftp|shift|shopt|shutdown|sleep|slocate|sort|source|split|ssh|stat|strace|su|sudo|sum|suspend|sync|tail|tar|tee|test|time|timeout|times|touch|top|traceroute|trap|tr|tsort|tty|type|ulimit|umask|umount|unalias|uname|unexpand|uniq|units|unrar|unshar|uptime|useradd|userdel|usermod|users|uuencode|uudecode|v|vdir|vi|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yes|zip)(?=$|[\s;|&])/ ,
lookbehind : ! 0 } , keyword : { pattern : /(^|[\s;|&])(?:let|:|\.|if|then|else|elif|fi|for|break|continue|while|in|case|function|select|do|done|until|echo|exit|return|set|declare)(?=$|[\s;|&])/ , lookbehind : ! 0 } , "boolean" : { pattern : /(^|[\s;|&])(?:true|false)(?=$|[\s;|&])/ , lookbehind : ! 0 } , operator : /&&?|\|\|?|==?|!=?|<<<?|>>|<=?|>=?|=~/ , punctuation : /\$?\(\(?|\)\)?|\.\.|[{}[\];]/ } ; e = e . variable [ 1 ] . inside ; e . string = b . languages . bash . string ; e [ "function" ] = b . languages . bash [ "function" ] ; e . keyword = b . languages . bash . keyword ; e [ "boolean" ] =
b . languages . bash [ "boolean" ] ; e . operator = b . languages . bash . operator ; e . punctuation = b . languages . bash . punctuation ; b . languages . shell = b . languages . bash } ) ( Prism ) ;
Prism . languages . cpp = Prism . languages . extend ( "c" , { keyword : /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char16_t|char32_t|class|compl|const|constexpr|const_cast|continue|decltype|default|delete|do|double|dynamic_cast|else|enum|explicit|export|extern|float|for|friend|goto|if|inline|int|int8_t|int16_t|int32_t|int64_t|uint8_t|uint16_t|uint32_t|uint64_t|long|mutable|namespace|new|noexcept|nullptr|operator|private|protected|public|register|reinterpret_cast|return|short|signed|sizeof|static|static_assert|static_cast|struct|switch|template|this|thread_local|throw|try|typedef|typeid|typename|union|unsigned|using|virtual|void|volatile|wchar_t|while)\b/ , "boolean" : /\b(?:true|false)\b/ ,
operator : /--?|\+\+?|!=?|<{1,2}=?|>{1,2}=?|->|:{1,2}|={1,2}|\^|~|%|&{1,2}|\|\|?|\?|\*|\/|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/ } ) ; Prism . languages . insertBefore ( "cpp" , "keyword" , { "class-name" : { pattern : /(class\s+)\w+/i , lookbehind : ! 0 } } ) ; Prism . languages . insertBefore ( "cpp" , "string" , { "raw-string" : { pattern : /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/ , alias : "string" , greedy : ! 0 } } ) ;
Prism . languages . csharp = Prism . languages . extend ( "clike" , { keyword : /\b(?:abstract|add|alias|as|ascending|async|await|base|bool|break|byte|case|catch|char|checked|class|const|continue|decimal|default|delegate|descending|do|double|dynamic|else|enum|event|explicit|extern|false|finally|fixed|float|for|foreach|from|get|global|goto|group|if|implicit|in|int|interface|internal|into|is|join|let|lock|long|namespace|new|null|object|operator|orderby|out|override|params|partial|private|protected|public|readonly|ref|remove|return|sbyte|sealed|select|set|short|sizeof|stackalloc|static|string|struct|switch|this|throw|true|try|typeof|uint|ulong|unchecked|unsafe|ushort|using|value|var|virtual|void|volatile|where|while|yield)\b/ , string : [ { pattern : /@("|')(?:\1\1|\\[\s\S]|(?!\1)[^\\])*\1/ ,
greedy : ! 0 } , { pattern : /("|')(?:\\.|(?!\1)[^\\\r\n])*?\1/ , greedy : ! 0 } ] , "class-name" : [ { pattern : /\b[A-Z]\w*(?:\.\w+)*\b(?=\s+\w+)/ , inside : { punctuation : /\./ } } , { pattern : /(\[)[A-Z]\w*(?:\.\w+)*\b/ , lookbehind : ! 0 , inside : { punctuation : /\./ } } , { pattern : /(\b(?:class|interface)\s+[A-Z]\w*(?:\.\w+)*\s*:\s*)[A-Z]\w*(?:\.\w+)*\b/ , lookbehind : ! 0 , inside : { punctuation : /\./ } } , { pattern : /((?:\b(?:class|interface|new)\s+)|(?:catch\s+\())[A-Z]\w*(?:\.\w+)*\b/ , lookbehind : ! 0 , inside : { punctuation : /\./ } } ] , number : /\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)f?/i } ) ;
Prism . languages . insertBefore ( "csharp" , "class-name" , { "generic-method" : { pattern : /\w+\s*<[^>\r\n]+?>\s*(?=\()/ , inside : { function : /^\w+/ , "class-name" : { pattern : /\b[A-Z]\w*(?:\.\w+)*\b/ , inside : { punctuation : /\./ } } , keyword : Prism . languages . csharp . keyword , punctuation : /[<>(),.:]/ } } , preprocessor : { pattern : /(^\s*)#.*/m , lookbehind : ! 0 , alias : "property" , inside : { directive : { pattern : /(\s*#)\b(?:define|elif|else|endif|endregion|error|if|line|pragma|region|undef|warning)\b/ , lookbehind : ! 0 , alias : "keyword" } } } } ) ;
Prism . languages . dotnet = Prism . languages . csharp ;
( function ( b ) { var e = /#(?!\{).+/ , c = { pattern : /#\{[^}]+\}/ , alias : "variable" } ; b . languages . coffeescript = b . languages . extend ( "javascript" , { comment : e , string : [ { pattern : /'(?:\\[\s\S]|[^\\'])*'/ , greedy : ! 0 } , { pattern : /"(?:\\[\s\S]|[^\\"])*"/ , greedy : ! 0 , inside : { interpolation : c } } ] , keyword : /\b(?:and|break|by|catch|class|continue|debugger|delete|do|each|else|extend|extends|false|finally|for|if|in|instanceof|is|isnt|let|loop|namespace|new|no|not|null|of|off|on|or|own|return|super|switch|then|this|throw|true|try|typeof|undefined|unless|until|when|while|window|with|yes|yield)\b/ , "class-member" : { pattern : /@(?!\d)\w+/ ,
alias : "variable" } } ) ; b . languages . insertBefore ( "coffeescript" , "comment" , { "multiline-comment" : { pattern : /###[\s\S]+?###/ , alias : "comment" } , "block-regex" : { pattern : /\/{3}[\s\S]*?\/{3}/ , alias : "regex" , inside : { comment : e , interpolation : c } } } ) ; b . languages . insertBefore ( "coffeescript" , "string" , { "inline-javascript" : { pattern : /`(?:\\[\s\S]|[^\\`])*`/ , inside : { delimiter : { pattern : /^`|`$/ , alias : "punctuation" } , rest : b . languages . javascript } } , "multiline-string" : [ { pattern : /'''[\s\S]*?'''/ , greedy : ! 0 , alias : "string" } , { pattern : /"""[\s\S]*?"""/ ,
greedy : ! 0 , alias : "string" , inside : { interpolation : c } } ] } ) ; b . languages . insertBefore ( "coffeescript" , "keyword" , { property : /(?!\d)\w+(?=\s*:(?!:))/ } ) ; delete b . languages . coffeescript [ "template-string" ] } ) ( Prism ) ; Prism . languages [ "markup-templating" ] = { } ;
Object . defineProperties ( Prism . languages [ "markup-templating" ] , { buildPlaceholders : { value : function ( b , e , c , d ) { b . language === e && ( b . tokenStack = [ ] , b . code = b . code . replace ( c , function ( c ) { if ( "function" === typeof d && ! d ( c ) ) return c ; for ( var a = b . tokenStack . length ; - 1 !== b . code . indexOf ( "___" + e . toUpperCase ( ) + a + "___" ) ; ) ++ a ; b . tokenStack [ a ] = c ; return "___" + e . toUpperCase ( ) + a + "___" } ) , b . grammar = Prism . languages . markup ) } } , tokenizePlaceholders : { value : function ( b , e ) { if ( b . language === e && b . tokenStack ) { b . grammar = Prism . languages [ e ] ; var c =
0 , d = Object . keys ( b . tokenStack ) , k = function ( a ) { if ( ! ( c >= d . length ) ) for ( var f = 0 ; f < a . length ; f ++ ) { var g = a [ f ] ; if ( "string" === typeof g || g . content && "string" === typeof g . content ) { var l = d [ c ] , r = b . tokenStack [ l ] , w = "string" === typeof g ? g : g . content , h = w . indexOf ( "___" + e . toUpperCase ( ) + l + "___" ) ; if ( - 1 < h ) { ++ c ; var x = w . substring ( 0 , h ) ; r = new Prism . Token ( e , Prism . tokenize ( r , b . grammar , e ) , "language-" + e , r ) ; l = w . substring ( h + ( "___" + e . toUpperCase ( ) + l + "___" ) . length ) ; x || l ? ( x = [ x , r , l ] . filter ( function ( a ) { return ! ! a } ) , k ( x ) ) : x = r ; "string" === typeof g ?
Array . prototype . splice . apply ( a , [ f , 1 ] . concat ( x ) ) : g . content = x ; if ( c >= d . length ) break } } else g . content && "string" !== typeof g . content && k ( g . content ) } } ; k ( b . tokens ) } } } } ) ; Prism . languages . git = { comment : /^#.*/m , deleted : /^[-\u00e2\u20ac\u201c].*/m , inserted : /^\+.*/m , string : /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/m , command : { pattern : /^.*\$ git .*$/m , inside : { parameter : /\s--?\w+/m } } , coord : /^@@.*@@$/m , commit _sha1 : /^commit \w{40}$/m } ;
Prism . languages . java = Prism . languages . extend ( "clike" , { keyword : /\b(?:abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while)\b/ , number : /\b0b[01]+\b|\b0x[\da-f]*\.?[\da-fp-]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?[df]?/i ,
operator : { pattern : /(^|[^.])(?:\+[+=]?|-[-=]?|!=?|<<?=?|>>?>?=?|==?|&[&=]?|\|[|=]?|\*=?|\/=?|%=?|\^=?|[?:~])/m , lookbehind : ! 0 } } ) ; Prism . languages . insertBefore ( "java" , "function" , { annotation : { alias : "punctuation" , pattern : /(^|[^.])@\w+/ , lookbehind : ! 0 } } ) ; Prism . languages . insertBefore ( "java" , "class-name" , { generics : { pattern : /<\s*\w+(?:\.\w+)?(?:\s*,\s*\w+(?:\.\w+)?)*>/i , alias : "function" , inside : { keyword : Prism . languages . java . keyword , punctuation : /[<>(),.:]/ } } } ) ;
Prism . languages . less = Prism . languages . extend ( "css" , { comment : [ /\/\*[\s\S]*?\*\// , { pattern : /(^|[^\\])\/\/.*/ , lookbehind : ! 0 } ] , atrule : { pattern : /@[\w-]+?(?:\([^{}]+\)|[^(){};])*?(?=\s*\{)/i , inside : { punctuation : /[:()]/ } } , selector : { pattern : /(?:@\{[\w-]+\}|[^{};\s@])(?:@\{[\w-]+\}|\([^{}]*\)|[^{};@])*?(?=\s*\{)/ , inside : { variable : /@+[\w-]+/ } } , property : /(?:@\{[\w-]+\}|[\w-])+(?:\+_?)?(?=\s*:)/i , punctuation : /[{}();:,]/ , operator : /[+\-*\/]/ } ) ; Prism . languages . insertBefore ( "less" , "punctuation" , { "function" : Prism . languages . less . function } ) ;
Prism . languages . insertBefore ( "less" , "property" , { variable : [ { pattern : /@[\w-]+\s*:/ , inside : { punctuation : /:/ } } , /@@?[\w-]+/ ] , "mixin-usage" : { pattern : /([{;]\s*)[.#](?!\d)[\w-]+.*?(?=[(;])/ , lookbehind : ! 0 , alias : "function" } } ) ; Prism . languages . markdown = Prism . languages . extend ( "markup" , { } ) ;
Prism . languages . insertBefore ( "markdown" , "prolog" , { blockquote : { pattern : /^>(?:[\t ]*>)*/m , alias : "punctuation" } , code : [ { pattern : /^(?: {4}|\t).+/m , alias : "keyword" } , { pattern : /``.+?``|`[^`\n]+`/ , alias : "keyword" } ] , title : [ { pattern : /\w+.*(?:\r?\n|\r)(?:==+|--+)/ , alias : "important" , inside : { punctuation : /==+$|--+$/ } } , { pattern : /(^\s*)#+.+/m , lookbehind : ! 0 , alias : "important" , inside : { punctuation : /^#+|#+$/ } } ] , hr : { pattern : /(^\s*)([*-])(?:[\t ]*\2){2,}(?=\s*$)/m , lookbehind : ! 0 , alias : "punctuation" } , list : { pattern : /(^\s*)(?:[*+-]|\d+\.)(?=[\t ].)/m ,
lookbehind : ! 0 , alias : "punctuation" } , "url-reference" : { pattern : /!?\[[^\]]+\]:[\t ]+(?:\S+|<(?:\\.|[^>\\])+>)(?:[\t ]+(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\)))?/ , inside : { variable : { pattern : /^(!?\[)[^\]]+/ , lookbehind : ! 0 } , string : /(?:"(?:\\.|[^"\\])*"|'(?:\\.|[^'\\])*'|\((?:\\.|[^)\\])*\))$/ , punctuation : /^[\[\]!:]|[<>]/ } , alias : "url" } , bold : { pattern : /(^|[^\\])(\*\*|__)(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/ , lookbehind : ! 0 , inside : { punctuation : /^\*\*|^__|\*\*$|__$/ } } , italic : { pattern : /(^|[^\\])([*_])(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/ ,
lookbehind : ! 0 , inside : { punctuation : /^[*_]|[*_]$/ } } , url : { pattern : /!?\[[^\]]+\](?:\([^\s)]+(?:[\t ]+"(?:\\.|[^"\\])*")?\)| ?\[[^\]\n]*\])/ , inside : { variable : { pattern : /(!?\[)[^\]]+(?=\]$)/ , lookbehind : ! 0 } , string : { pattern : /"(?:\\.|[^"\\])*"(?=\)$)/ } } } } ) ; Prism . languages . markdown . bold . inside . url = Prism . languages . markdown . url ; Prism . languages . markdown . italic . inside . url = Prism . languages . markdown . url ; Prism . languages . markdown . bold . inside . italic = Prism . languages . markdown . italic ;
Prism . languages . markdown . italic . inside . bold = Prism . languages . markdown . bold ; Prism . languages . nginx = Prism . languages . extend ( "clike" , { comment : { pattern : /(^|[^"{\\])#.*/ , lookbehind : ! 0 } , keyword : / \ b ( ? : C O N T E N T _ | D O C U M E N T _ | G A T E W A Y _ | H T T P _ | H T T P S | i f _ n o t _ e m p t y | P A T H _ | Q U E R Y _ | R E D I R E C T _ | R E M O T E _ | R E Q U E S T _ | S C G I | S C R I P T _ | S E R V E R _ | h t t p | e v e n t s | a c c e p t _ m u t e x | a c c e p t _ m u t e x _ d e l a y | a c c e s s _ l o g | a d d _ a f t e r _ b o d y | a d d _ b e f o r e _ b o d y | a d d _ h e a d e r | a d d i t i o n _ t y p e s | a i o | a l i a s | a l l o w | a n c i e n t _ b r o w s e r | a n c i e n t _ b r o w s e r _ v a l u e | a u t h | a u t h _ b a s i c | a u t h _ b a s i c _ u s e r _ f i l e | a u t h _ h t t p | a u t h _ h t t p _ h e a d e r | a u t h _ h t t p _ t i m e o u t | a u t o i n d e x | a u t o i n d e x _ e x a c t _ s i z e | a u t o i n d e x _ l o c a l t i m e | b r e a k | c h a r s e t | c h a r s e t _ m a p | c h a r s e t _ t y p e s | c h u n k e d _ t r a n s f e r _ e n c o d i n g | c l i e n t _ b o d y _ b u f f e r _ s i z e | c l i e n t _ b o d y _ i n _ f i l e _ o n l y | c l i e n t _ b o d y _ i n _ s i n g l e _ b u f f e r | c l i e n t _ b o d y _ t e m p _ p a t h | c l i e n t _ b o d y _ t i m e o u t | c l i e n t _ h e a d e r _ b u f f e r _ s i z e | c l i e n t _ h e a d e r _ t i m e o u t | c l i e n t _ m a x _ b o d y _ s i z e | c o n n e c t i o n _ p o o l _ s i z e | c r e a t e _ f u l l _ p u t _ p a t h | d a e m o n | d a v _ a c c e s s | d a v _ m e t h o d s | d e b u g _ c o n n e c t i o n | d e b u g _ p o i n t s | d e f a u l t _ t y p e | d e n y | d e v p o l l _ c h a n g e s | d e v p o l l _ e v e n t s | d i r e c t i o | d i r e c t i o _ a l i g n m e n t | d i s a b l e _ s y m l i n k s | e m p t y _ g i f | e n v | e p o l l _ e v e n t s | e r r o r _ l o g | e r r o r _ p a g e | e x p i r e s | f a s t c g i _ b u f f e r _ s i z e | f a s t c g i _ b u f f e r s | f a s t c g i _ b u s y _ b u f f e r s _ s i z e | f a s t c g i _ c a c h e | f a s t c g i _ c a c h e _ b y p a s s | f a s t c g i _ c a c h e _ k e y | f a s t c g i _ c a c h e _ l o c k | f a s t c g i _ c a c h e _ l o c k _ t i m e o u t | f a s t c g i _ c a c h e _ m e t h o d s | f a s t c g i _ c a c h e _ m i n _ u s e s | f a s t c g i _ c a c h e _ p a t h | f a s t c g i _ c a c h e _ p u r g e | f a s t c g i _ c a c h e _ u s e _ s t a l e | f a s t c g i _ c a c h e _ v a l i d | f a s t c g i _ c o n n e c t _ t i m e o u t | f a s t c g i _ h i d e _ h e a d e r | f a s t c g i _ i g n o r e _ c l i e n t _ a b o r t | f a s t c g i _ i g n o r e _ h e a d e r s | f a s t c g i _ i n d e x | f a s t c g i _ i n t e r c e p t _ e r r o r s | f a s t c g i _ k e e p _ c o n n | f a s t c g i _ m a x _ t e m p _ f i l e _ s i z e | f a s t c g i _ n e x t _ u p s t r e a m | f a s t c g i _ n o _ c a c h e | f a s t c g i _ p a r a m | f a s t c g i _ p a s s | f a s t c g i _ p a s s _ h e a d e r | f a s t c g i _ r e a d _ t i m e o u t | f a s t c g i _ r e d i r e c t _ e r r o r s | f a s t c g i _ s e n d _ t i m e o u t | f a s t c g i _ s p l i t _ p a t h _ i n f o | f a s t c g i _ s t o r e | f a s t c g i _ s t o r e _ a c c e s s | f a s t c g i _ t e m p _ f i l e _ w r i t e _ s i z e | f a s t c g i _ t e m p _ p a t h | f l v | g e o | g e o i p _ c i t y | g e o i p _ c o u n t r y | g o o g l e _ p e r f t o o l s _ p r o f i l e s | g z i p | g z i p _ b u f f e r s | g z i p _ c o m p _ l e v e l | g z i p _ d i s a b l e | g z i p _ h t t p _ v e r s i o n | g z i p _ m i n _ l e n g t h | g z i p _ p r o x i e d | g z i p _ s t a t i c | g z i p _ t y p e s | g z i p _ v a r y | i f | i f _ m o d i f i e d _ s i n c e | i g n o r e _ i n v a l i d _ h e a d e r s | i m a g e _ f i l t e r | i m a g e _ f i l t e r _ b u f f e r | i m a g e _ f i l t e r _ j p e g _ q u a l i t y | i m a g e _ f i l t e r _ s h a r p e n | i m a g e _ f i l t e r _ t r a n s p a r e n c y | i m a p _ c a p a b i l i t i e s | i m a p _ c l i e n t _ b u f f e r | i n c l u d e | i n d e x | i n t e r n a l | i p _ h a s h | k e e p a l i v e | k e e p a l i v e _ d i s a b l e | k e e p a l i v e _ r e q u e s t s | k e e p a l i v e _ t i m e o u t | k q u e u e _ c h a n g e s | k q u e u e _ e v e n t s | l a r g e _ c l i e n t _ h e a d e r _ b u f f e r s | l i m i t _ c o n n | l i m i t _ c o n n _ l o g _ l e v e l | l i m i t _ c o n n _ z o n e | l i m i t _ e x c e p t | l i m i t _ r a t e | l i m i t _ r a t e _ a f t e r | l i m i t _ r e q | l i m i t _ r e q _ l o g _ l e v e l | l i m i t _ r e q _ z o n e | l i m i t _ z o n e | l i n g e r i n g _ c l o s e | l i n g e r i n g _ t i m e | l i n g e r i n g _ t i m e o u t | l i s t e n | l o c a t i o n | l o c k _ f i l e | l o g _ f o r m a t | l o g _ f o r m a t _ c o m b i n e d | l o g _ n o t _ f o u n d | l o g _ s u b r e q u e s t | m a p | m a p _ h a s h _ b u c k e t _ s i z e | m a p _ h a s h _ m a x _ s i z e | m a s t e r _ p r o c e s s | m a x _ r a n g e s | m e m c a c h e d _ b u f f e r _ s i z e | m e m c a c h e d _ c o n n e c t _ t i m e o u t | m e m c a c h e d _ n e x t _ u p s t r e a m | m e m c a c h e d _ p a s s | m e m c a c h e d _ r e a d _ t i m e o u t | m e m c a c h e d _ s e n d _ t i m e o u t | m e r g e _ s l a s h e s | m i n _ d e l e t e _ d e p t h | m o d e r n _ b r o w s e r | m o d e r n _ b r o w s e r _ v a l u e | m p 4 | m p 4 _ b u f f e r _ s i z e | m p 4 _ m a x _ b u f f e r _ s i z e | m s i e _ p a d d i n g | m s i e _ r e f r e s h | m u l t i _ a c c e p t | o p e n _ f i l e _ c a c h e | o p e n _ f i l e _ c a c h e _ e r r o r s | o p e n _ f i l e _ c a c h e _ m i n _ u s e s | o p e n _ f i l e _ c a c h e _ v a l i d | o p e n _ l o g _ f i l e _ c a c h e | o p t i m i z e _ s e r v e r _ n a m e s | o v e r r i d e _ c h a r s e t | p c r e _ j i t | p e r l | p e r l _ m o d u l e s | p e r l _ r e q u i r e | p e r l _ s e t | p i d | p o p 3 _ a u t h | p o p 3 _ c a p a b i l i t i e s | p o r t _ i n _ r e d i r e c t | p o s t _ a c t i o n | p o s t p o n e _ o u t p u t | p r o t o c o l | p r o x y | p r o x y _ b u f f e r | p r o x y _ b u f f e r _ s i z e | p r o x y _ b u f f e r i n g | p r o x y _ b u f f e r s | p r o x y _ b u s y _ b u f f e r s _ s i z e | p r o x y _ c a c h e | p r o x y _ c a c h e _ b y p a s s | p r o x y _ c a c h e _ k e y | p r o x y _ c a c h e _ l o c k | p r o x y _ c a c h e _ l o c k _ t i m e o u t | p r o x y _ c a c h e _ m e t h o d s | p r o x y _ c a c h e _ m i n _ u s e s | p r o x y _ c a c h e _ p a t h | p r o x y _ c a c h e _ u s e _ s t a l e | p r o x y _ c a c h e _ v a l i d | p r o x y _ c o n n e c t _ t i m e o u t | p r o x y _ c o o k i e _ d o m a i n | p r o x y _ c o o k i e _ p a t h | p r o x y _ h e a d e r s _ h a s h _ b u c k e t _ s i z e | p r o x y _ h e a d e r s _ h a s h _ m a x _ s i z e | p r o x y _ h i d e _ h e a d e r | p r o x y _ h t t p _ v e r s i o n | p r o x y _ i g n o r e _ c l i e n t _ a b o r t | p r o x y _ i g n o r e _ h e a d e r s | p r o x y _ i n t e r c e p t _ e r r o r s | p r o x y _ m a x _ t e m p _ f i l e _ s i z e | p r o x y _ m e t h o d | p r o x y _ n e x t _ u p s t r e a m | p r o x y _ n o _ c a c h e | p r o x y _ p a s s | p r o x y _ p a s s _ e r r o r _ m e s s a g e | p r o x y _ p a s s _ h e a d e r | p r o x y _ p a s s _ r e q u e s t _ b o d y | p r o x y _ p a s s _ r e q u e s t _ h e a d e r s | p r o x y _ r e a d _ t i m e o u t | p r o x y _ r e d i r e c t | p r o x y _ r e d i r e c t _ e r r o r s | p r o x y _ s e n d _ l o w a t | p r o x y _ s e n d _ t i m e o u t | p r o x y _ s e t _ b o d y | p r o x y _ s e t _ h e a d e r | p r o x y _ s s l _ s e s s i o n _
Prism . languages . insertBefore ( "nginx" , "keyword" , { variable : /\$[a-z_]+/i } ) ;
2020-06-29 20:40:05 +08:00
Prism . languages . swift = Prism . languages . extend ( "clike" , { string : { pattern : /("|')(?:\\(?:\((?:[^()]|\([^)]+\))+\)|\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/ , greedy : ! 0 , inside : { interpolation : { pattern : /\\\((?:[^()]|\([^)]+\))+\)/ , inside : { delimiter : { pattern : /^\\\(|\)$/ , alias : "variable" } } } } } , keyword : /\b(?:as|associativity|break|case|catch|class|continue|convenience|default|defer|deinit|didSet|do|dynamic(?:Type)?|else|enum|extension|fallthrough|final|for|func|get|guard|if|import|in|infix|init|inout|internal|is|lazy|left|let|mutating|new|none|nonmutating|operator|optional|override|postfix|precedence|prefix|private|protocol|public|repeat|required|rethrows|return|right|safe|self|Self|set|static|struct|subscript|super|switch|throws?|try|Type|typealias|unowned|unsafe|var|weak|where|while|willSet|__(?:COLUMN__|FILE__|FUNCTION__|LINE__))\b/ , number : /\b(?:[\d_]+(?:\.[\de_]+)?|0x[a-f0-9_]+(?:\.[a-f0-9p_]+)?|0b[01_]+|0o[0-7_]+)\b/i , constant : /\b(?:nil|[A-Z_]{2,}|k[A-Z][A-Za-z_]+)\b/ , atrule : /@\b(?:IB(?:Outlet|Designable|Action|Inspectable)|class_protocol|exported|noreturn|NS(?:Copying|Managed)|objc|UIApplicationMain|auto_closure)\b/ , builtin : /\b(?:[A-Z]\S+|abs|advance|alignof(?:Value)?|assert|contains|count(?:Elements)?|debugPrint(?:ln)?|distance|drop(?:First|Last)|dump|enumerate|equal|filter|find|first|getVaList|indices|isEmpty|join|last|lexicographicalCompare|map|max(?:Element)?|min(?:Element)?|numericCast|overlaps|partition|print(?:ln)?|reduce|reflect|reverse|sizeof(?:Value)?|sort(?:ed)?|split|startsWith|stride(?:of(?:Value)?)?|suffix|swap|toDebugString|toString|transcode|underestimateCount|unsafeBitCast|with(?:ExtendedLifetime|Unsafe(?:MutablePointers?|Pointers?)|VaList))\b/ } ) , Prism . languages . swift . string . inside . interpolation . inside . rest = Prism . languages . swift ;
Prism . languages . basic = { comment : { pattern : /(?:!|REM\b).+/i , inside : { keyword : /^REM/i } } , string : { pattern : /"(?:""|[!#$%&'()*,\/:;<=>?^_ +\-.A-Z\d])*"/i , greedy : ! 0 } , number : /(?:\b\d+\.?\d*|\B\.\d+)(?:E[+-]?\d+)?/i , keyword : /\b(?:AS|BEEP|BLOAD|BSAVE|CALL(?: ABSOLUTE)?|CASE|CHAIN|CHDIR|CLEAR|CLOSE|CLS|COM|COMMON|CONST|DATA|DECLARE|DEF(?: FN| SEG|DBL|INT|LNG|SNG|STR)|DIM|DO|DOUBLE|ELSE|ELSEIF|END|ENVIRON|ERASE|ERROR|EXIT|FIELD|FILES|FOR|FUNCTION|GET|GOSUB|GOTO|IF|INPUT|INTEGER|IOCTL|KEY|KILL|LINE INPUT|LOCATE|LOCK|LONG|LOOP|LSET|MKDIR|NAME|NEXT|OFF|ON(?: COM| ERROR| KEY| TIMER)?|OPEN|OPTION BASE|OUT|POKE|PUT|READ|REDIM|REM|RESTORE|RESUME|RETURN|RMDIR|RSET|RUN|SHARED|SINGLE|SELECT CASE|SHELL|SLEEP|STATIC|STEP|STOP|STRING|SUB|SWAP|SYSTEM|THEN|TIMER|TO|TROFF|TRON|TYPE|UNLOCK|UNTIL|USING|VIEW PRINT|WAIT|WEND|WHILE|WRITE)(?:\$|\b)/i , function : /\b(?:ABS|ACCESS|ACOS|ANGLE|AREA|ARITHMETIC|ARRAY|ASIN|ASK|AT|ATN|BASE|BEGIN|BREAK|CAUSE|CEIL|CHR|CLIP|COLLATE|COLOR|CON|COS|COSH|COT|CSC|DATE|DATUM|DEBUG|DECIMAL|DEF|DEG|DEGREES|DELETE|DET|DEVICE|DISPLAY|DOT|ELAPSED|EPS|ERASABLE|EXLINE|EXP|EXTERNAL|EXTYPE|FILETYPE|FIXED|FP|GO|GRAPH|HANDLER|IDN|IMAGE|IN|INT|INTERNAL|IP|IS|KEYED|LBOUND|LCASE|LEFT|LEN|LENGTH|LET|LINE|LINES|LOG|LOG10|LOG2|LTRIM|MARGIN|MAT|MAX|MAXNUM|MID|MIN|MISSING|MOD|NATIVE|NUL|NUMERIC|OF|OPTION|ORD|ORGANIZATION|OUTIN|OUTPUT|PI|POINT|POINTER|POINTS|POS|PRINT|PROGRAM|PROMPT|RAD|RADIANS|RANDOMIZE|RECORD|RECSIZE|RECTYPE|RELATIVE|REMAINDER|REPEAT|REST|RETRY|REWRITE|RIGHT|RND|ROUND|RTRIM|SAME|SEC|SELECT|SEQUENTIAL|SET|SETTER|SGN|SIN|SINH|SIZE|SKIP|SQR|STANDARD|STATUS|STR|STREAM|STYLE|TAB|TAN|TANH|TEMPLATE|TEXT|THERE|TIME|TIMEOUT|TRACE|TRANSFORM|TRUNCATE|UBOUND|UCASE|USE|VAL|VARIABLE|VIEWPORT|WHEN|WINDOW|WITH|ZER|ZONEWIDTH)(?:\$|\b)/i , operator : /<[=>]?|>=?|[+\-*\/^=&]|\b(?:AND|EQV|IMP|NOT|OR|XOR)\b/i , punctuation : /[,;:()]/ } ;
Prism . languages . vim = { string : /"(?:[^"\\\r\n]|\\.)*"|'(?:[^'\r\n]|'')*'/ , comment : /".*/ , function : /\w+(?=\()/ , keyword : / \ b ( ? : a b | a b b r e v i a t e | a b c | a b c l e a r | a b o | a b o v e l e f t | a l | a l l | a r g a | a r g a d d | a r g d | a r g d e l e t e | a r g d o | a r g e | a r g e d i t | a r g g | a r g g l o b a l | a r g l | a r g l o c a l | a r | a r g s | a r g u | a r g u m e n t | a s | a s c i i | b a d | b a d d | b a | b a l l | b d | b d e l e t e | b e | b e l | b e l o w r i g h t | b f | b f i r s t | b l | b l a s t | b m | b m o d i f i e d | b n | b n e x t | b N | b N e x t | b o | b o t r i g h t | b p | b p r e v i o u s | b r e a | b r e a k | b r e a k a | b r e a k a d d | b r e a k d | b r e a k d e l | b r e a k l | b r e a k l i s t | b r | b r e w i n d | b r o | b r o w s e | b u f d o | b | b u f f e r | b u f f e r s | b u n | b u n l o a d | b w | b w i p e o u t | c a | c a b b r e v | c a b c | c a b c l e a r | c a d d b | c a d d b u f f e r | c a d | c a d d e x p r | c a d d f | c a d d f i l e | c a l | c a l l | c a t | c a t c h | c b | c b u f f e r | c c | c c l | c c l o s e | c d | c e | c e n t e r | c e x | c e x p r | c f | c f i l e | c f i r | c f i r s t | c g e t b | c g e t b u f f e r | c g e t e | c g e t e x p r | c g | c g e t f i l e | c | c h a n g e | c h a n g e s | c h d | c h d i r | c h e | c h e c k p a t h | c h e c k t | c h e c k t i m e | c l a | c l a s t | c l | c l i s t | c l o | c l o s e | c m a p c | c m a p c l e a r | c n e w | c n e w e r | c n | c n e x t | c N | c N e x t | c n f | c n f i l e | c N f c N f i l e | c n o r e a | c n o r e a b b r e v | c o l | c o l d e r | c o l o | c o l o r s c h e m e | c o m c | c o m c l e a r | c o m p | c o m p i l e r | c o n f | c o n f i r m | c o n | c o n t i n u e | c o p e | c o p e n | c o | c o p y | c p f | c p f i l e | c p | c p r e v i o u s | c q | c q u i t | c r | c r e w i n d | c u n a | c u n a b b r e v | c u | c u n m a p | c w | c w i n d o w | d e b u g g | d e b u g g r e e d y | d e l c | d e l c o m m a n d | d | d e l e t e | d e l f | d e l f u n c t i o n | d e l m | d e l m a r k s | d i f f g | d i f f g e t | d i f f o f f | d i f f p a t c h | d i f f p u | d i f f p u t | d i f f s p l i t | d i f f t h i s | d i f f u | d i f f u p d a t e | d i g | d i g r a p h s | d i | d i s p l a y | d j | d j u m p | d l | d l i s t | d r | d r o p | d s | d s e a r c h | d s p | d s p l i t | e a r l i e r | e c h o e | e c h o e r r | e c h o m | e c h o m s g | e c h o n | e | e d i t | e l | e l s e | e l s e i | e l s e i f | e m | e m e n u | e n d f o | e n d f o r | e n d f | e n d f u n c t i o n | e n d f u n | e n | e n d i f | e n d t | e n d t r y | e n d w | e n d w h i l e | e n e | e n e w | e x | e x i | e x i t | e x u | e x u s a g e | f | f i l e | f i l e s | f i l e t y p e | f i n a | f i n a l l y | f i n | f i n d | f i n i | f i n i s h | f i r | f i r s t | f i x | f i x d e l | f o | f o l d | f o l d c | f o l d c l o s e | f o l d d o c | f o l d d o c l o s e d | f o l d d | f o l d d o o p e n | f o l d o | f o l d o p e n | f o r | f u | f u n | f u n c t i o n | g o | g o t o | g r | g r e p | g r e p a | g r e p a d d | h a | h a r d c o p y | h | h e l p | h e l p f | h e l p f i n d | h e l p g | h e l p g r e p | h e l p t | h e l p t a g s | h i d | h i d e | h i s | h i s t o r y | i a | i a b b r e v | i a b c | i a b c l e a r | i f | i j | i j u m p | i l | i l i s t | i m a p c | i m a p c l e a r | i n | i n o r e a | i n o r e a b b r e v | i s e a r c h | i s p | i s p l i t | i u n a | i u n a b b r e v | i u | i u n m a p | j | j o i n | j u | j u m p s | k | k e e p a l t | k e e p j | k e e p j u m p s | k e e | k e e p m a r k s | l a d d b | l a d d b u f f e r | l a d | l a d d e x p r | l a d d f | l a d d f i l e | l a n | l a n g u a g e | l a | l a s t | l a t e r | l b | l b u f f e r | l c | l c d | l c h | l c h d i r | l c l | l c l o s e | l e t | l e f t | l e f t a | l e f t a b o v e | l e x | l e x p r | l f | l f i l e | l f i r | l f i r s t | l g e t b | l g e t b u f f e r | l g e t e | l g e t e x p r | l g | l g e t f i l e | l g r | l g r e p | l g r e p a | l g r e p a d d | l h | l h e l p g r e p | l | l i s t | l l | l l a | l l a s t | l l i | l l i s t | l m a k | l m a k e | l m | l m a p | l m a p c | l m a p c l e a r | l n e w | l n e w e r | l n e | l n e x t | l N | l N e x t | l n f | l n f i l e | l N f | l N f i l e | l n | l n o r e m a p | l o | l o a d v i e w | l o c | l o c k m a r k s | l o c k v | l o c k v a r | l o l | l o l d e r | l o p | l o p e n | l p f | l p f i l e | l p | l p r e v i o u s | l r | l r e w i n d | l s | l t | l t a g | l u | l u n m a p | l v | l v i m g r e p | l v i m g r e p a | l v i m g r e p a d d | l w | l w i n d o w | m a k | m a k e | m a | m a r k | m a r k s | m a t | m a t c h | m e n u t | m e n u t r a n s l a t e | m k | m k e x r c | m k s | m k s e s s i o n | m k s p | m k s p e l l | m k v i e | m k v i e w | m k v | m k v i m r c | m o d | m o d e | m | m o v e | m z f | m z f i l e | m z | m z s c h e m e | n b k e y | n e w | n | n e x t | N | N e x t | n m a p c | n m a p c l e a r | n o h | n o h l s e a r c h | n o r e a | n o r e a b b r e v | n u | n u m b e r | n u n | n u n m a p | o m a p c | o m a p c l e a r | o n | o n l y | o | o p e n | o p t | o p t i o n s | o u | o u n m a p | p c | p c l o s e | p e d | p e d i t | p e | p e r l | p e r l d | p e r l d o | p o | p o p | p o p u | p o p u p | p p | p p o p | p r e | p r e s e r v e | p r e v | p r e v i o u s | p | p r i n t | P | P r i n t | p r o f d | p r o f d e l | p r o f | p r o f i l e | p r o m p t f | p r o m p t f i n d | p r o m p t r | p r o m p t r e p l | p s | p s e a r c h | p t a | p t a g | p t f | p t f i r s t | p t j | p t j u m p | p t l | p t l a s t | p t n | p t n e x t | p t N | p t N e x t | p t p | p t p r e v i o u s | p t r | p t r e w i n d | p t s | p t s e l e c t | p u | p u t | p w | p w d | p y f | p y f i l e | p y | p y t h o n | q a | q a l l | q | q u i t | q u i t a | q u i t a l l | r | r e a d | r e c | r e c o v e r | r e d i | r e d i r | r e d | r e d o | r e d r | r e d r a w | r e d r a w s | r e d r a w s t a t u s | r e g | r e g i s t e r s | r e s | r e s i z e | r e t | r e t a b | r e t u | r e t u r n | r e w | r e w i n d | r i | r i g h t | r i g h t b | r i g h t b e l o w | r u b | r u b y | r u b y d | r u b y d o | r u b y f | r u b y f i l e | r u | r u n t i m e | r v | r v i m i n f o | s a l | s a l l | s a n | s a n d b o x | s a | s a r g u m e n t | s a v | s a v e a s | s b a | s b a l l | s b f | s b f i r s t | s b l | s b l a s t | s b m | s b m o d i f i e d | s b n | s b n e x t | s b N | s b N e x t | s b p | s b p r e v i o u s | s b r | s b r e w i n d | s b | s b u f f e r | s c r i p t e | s c r i p t e n c o d i n g | s c r i p | s c r i p t n a m e s | s e | s e t | s e t f | s e t f i l e t y p e | s e t g | s e t g l o b a l | s e t l | s e t l o c a l | s f | s f i n d | s f i r | s f i r s t | s h | s h e l l | s i g n | s i l | s i l e n t | s i m | s i m a l t | s l a | s l a s t | s l | s l e e p | s m | s m a g i c | s m | s m a p | s m a p c | s m a p c l e a r | s m e | s m e n u | s n | s n e x t | s N | s N e x t | s n i | s n i f f | s n o | s n o m a g i c | s n o r | s n o r e m a p | s n o r e m e | s n o r e m e n u | s o r | s o r t | s o | s o u r c e | s p e l l d | s p e l l d u m p | s p e | s p e l l g o o d | s p e l l i | s p e l l i n f o | s p e l l r | s p e l l r e p a l l | s p e l l u | s p e l l u n d o | s p e l l w | s p e l l w r o n g | s p | s p l i t | s p r | s p r e v i o u s | s r e | s r e w i n d | s t a | s t a g | s t a r t g | s t a r t g r e p l a c e | s t a r | s t a r t i n s e r t | s t a r t r | s t a r t r e p l a c e | s t j | s t j u m p | s t | s t o p | s t o p i | s t o p i n s e r t | s t s | s t s e l e c t |
Prism . languages . llvm = { comment : /;.*/ , string : { pattern : /"[^"]*"/ , greedy : ! 0 } , boolean : /\b(?:true|false)\b/ , variable : /[%@!#](?:(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+|\d+)/i , label : /(?!\d)(?:[-$.\w]|\\[a-f\d]{2})+:/i , type : { pattern : /\b(?:double|float|fp128|half|i[1-9]\d*|label|metadata|ppc_fp128|token|void|x86_fp80|x86_mmx)\b/ , alias : "class-name" } , keyword : /\b[a-z_][a-z_0-9]*\b/ , number : /[+-]?\b\d+(?:\.\d+)?(?:[eE][+-]?\d+)?\b|\b0x[\dA-Fa-f]+\b|\b0xK[\dA-Fa-f]{20}\b|\b0x[ML][\dA-Fa-f]{32}\b|\b0xH[\dA-Fa-f]{4}\b/ , punctuation : /[{}[\];(),.!*=<>]/ } ;
2019-11-17 23:15:56 +08:00
( function ( b ) { b . languages . php = b . languages . extend ( "clike" , { keyword : /\b(?:and|or|xor|array|as|break|case|cfunction|class|const|continue|declare|default|die|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|for|foreach|function|include|include_once|global|if|new|return|static|switch|use|require|require_once|var|while|abstract|interface|public|implements|private|protected|parent|throw|null|echo|print|trait|namespace|final|yield|goto|instanceof|finally|try|catch)\b/i , constant : /\b[A-Z0-9_]{2,}\b/ ,
comment : { pattern : /(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/ , lookbehind : ! 0 } } ) ; b . languages . insertBefore ( "php" , "string" , { "shell-comment" : { pattern : /(^|[^\\])#.*/ , lookbehind : ! 0 , alias : "comment" } } ) ; b . languages . insertBefore ( "php" , "keyword" , { delimiter : { pattern : /\?>|<\?(?:php|=)?/i , alias : "important" } , variable : /\$+(?:\w+\b|(?={))/i , "package" : { pattern : /(\\|namespace\s+|use\s+)[\w\\]+/ , lookbehind : ! 0 , inside : { punctuation : /\\/ } } } ) ; b . languages . insertBefore ( "php" , "operator" , { property : { pattern : /(->)[\w]+/ , lookbehind : ! 0 } } ) ;
b . languages . insertBefore ( "php" , "string" , { "nowdoc-string" : { pattern : /<<<'([^']+)'(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;/ , greedy : ! 0 , alias : "string" , inside : { delimiter : { pattern : /^<<<'[^']+'|[a-z_]\w*;$/i , alias : "symbol" , inside : { punctuation : /^<<<'?|[';]$/ } } } } , "heredoc-string" : { pattern : /<<<(?:"([^"]+)"(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\1;|([a-z_]\w*)(?:\r\n?|\n)(?:.*(?:\r\n?|\n))*?\2;)/i , greedy : ! 0 , alias : "string" , inside : { delimiter : { pattern : /^<<<(?:"[^"]+"|[a-z_]\w*)|[a-z_]\w*;$/i , alias : "symbol" , inside : { punctuation : /^<<<"?|[";]$/ } } ,
interpolation : null } } , "single-quoted-string" : { pattern : /'(?:\\[\s\S]|[^\\'])*'/ , greedy : ! 0 , alias : "string" } , "double-quoted-string" : { pattern : /"(?:\\[\s\S]|[^\\"])*"/ , greedy : ! 0 , alias : "string" , inside : { interpolation : null } } } ) ; delete b . languages . php . string ; var e = { pattern : /{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[.+?]|->\w+)*)/ , lookbehind : ! 0 , inside : { rest : b . languages . php } } ; b . languages . php [ "heredoc-string" ] . inside . interpolation = e ; b . languages . php [ "double-quoted-string" ] . inside . interpolation =
e ; b . hooks . add ( "before-tokenize" , function ( c ) { /(?:<\?php|<\?)/ig . test ( c . code ) && b . languages [ "markup-templating" ] . buildPlaceholders ( c , "php" , /(?:<\?php|<\?)[\s\S]*?(?:\?>|$)/ig ) } ) ; b . hooks . add ( "after-tokenize" , function ( c ) { b . languages [ "markup-templating" ] . tokenizePlaceholders ( c , "php" ) } ) } ) ( Prism ) ;
Prism . languages . sql = { comment : { pattern : /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/ , lookbehind : ! 0 } , string : { pattern : /(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\])*\2/ , greedy : ! 0 , lookbehind : ! 0 } , variable : /@[\w.$]+|@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/ , "function" : /\b(?:AVG|COUNT|FIRST|FORMAT|LAST|LCASE|LEN|MAX|MID|MIN|MOD|NOW|ROUND|SUM|UCASE)(?=\s*\()/i , keyword : /\b(?:ACTION|ADD|AFTER|ALGORITHM|ALL|ALTER|ANALYZE|ANY|APPLY|AS|ASC|AUTHORIZATION|AUTO_INCREMENT|BACKUP|BDB|BEGIN|BERKELEYDB|BIGINT|BINARY|BIT|BLOB|BOOL|BOOLEAN|BREAK|BROWSE|BTREE|BULK|BY|CALL|CASCADED?|CASE|CHAIN|CHAR(?:ACTER|SET)?|CHECK(?:POINT)?|CLOSE|CLUSTERED|COALESCE|COLLATE|COLUMNS?|COMMENT|COMMIT(?:TED)?|COMPUTE|CONNECT|CONSISTENT|CONSTRAINT|CONTAINS(?:TABLE)?|CONTINUE|CONVERT|CREATE|CROSS|CURRENT(?:_DATE|_TIME|_TIMESTAMP|_USER)?|CURSOR|CYCLE|DATA(?:BASES?)?|DATE(?:TIME)?|DAY|DBCC|DEALLOCATE|DEC|DECIMAL|DECLARE|DEFAULT|DEFINER|DELAYED|DELETE|DELIMITERS?|DENY|DESC|DESCRIBE|DETERMINISTIC|DISABLE|DISCARD|DISK|DISTINCT|DISTINCTROW|DISTRIBUTED|DO|DOUBLE|DROP|DUMMY|DUMP(?:FILE)?|DUPLICATE|ELSE(?:IF)?|ENABLE|ENCLOSED|END|ENGINE|ENUM|ERRLVL|ERRORS|ESCAPED?|EXCEPT|EXEC(?:UTE)?|EXISTS|EXIT|EXPLAIN|EXTENDED|FETCH|FIELDS|FILE|FILLFACTOR|FIRST|FIXED|FLOAT|FOLLOWING|FOR(?: EACH ROW)?|FORCE|FOREIGN|FREETEXT(?:TABLE)?|FROM|FULL|FUNCTION|GEOMETRY(?:COLLECTION)?|GLOBAL|GOTO|GRANT|GROUP|HANDLER|HASH|HAVING|HOLDLOCK|HOUR|IDENTITY(?:_INSERT|COL)?|IF|IGNORE|IMPORT|INDEX|INFILE|INNER|INNODB|INOUT|INSERT|INT|INTEGER|INTERSECT|INTERVAL|INTO|INVOKER|ISOLATION|ITERATE|JOIN|KEYS?|KILL|LANGUAGE|LAST|LEAVE|LEFT|LEVEL|LIMIT|LINENO|LINES|LINESTRING|LOAD|LOCAL|LOCK|LONG(?:BLOB|TEXT)|LOOP|MATCH(?:ED)?|MEDIUM(?:BLOB|INT|TEXT)|MERGE|MIDDLEINT|MINUTE|MODE|MODIFIES|MODIFY|MONTH|MULTI(?:LINESTRING|POINT|POLYGON)|NATIONAL|NATURAL|NCHAR|NEXT|NO|NONCLUSTERED|NULLIF|NUMERIC|OFF?|OFFSETS?|ON|OPEN(?:DATASOURCE|QUERY|ROWSET)?|OPTIMIZE|OPTION(?:ALLY)?|ORDER|OUT(?:ER|FILE)?|OVER|PARTIAL|PARTITION|PERCENT|PIVOT|PLAN|POINT|POLYGON|PRECEDING|PRECISION|PREPARE|PREV|PRIMARY|PRINT|PRIVILEGES|PROC(?:EDURE)?|PUBLIC|PURGE|QUICK|RAISERROR|READS?|REAL|RECONFIGURE|REFERENCES|RELEASE|RENAME|REPEAT(?:ABLE)?|REPLACE|REPLICATION|REQUIRE|RESIGNAL|RESTORE|RESTRICT|RETURNS?|REVOKE|RIGHT|ROLLBACK|ROUTINE|ROW(?:COUNT|GUIDCOL|S)?|RTREE|RULE|SAVE(?:POINT)?|SCHEMA|SECOND|SELECT|SERIAL(?:IZABLE)?|SESSION(?:_USER)?|SET(?:USER)?|SHARE|SHOW|SHUTDOWN|SIMPLE|SMALLINT|SNAPSHOT|SOME|SONAME|SQL|START(?:ING)?|STATISTICS|STATUS|STRIPED|SYSTEM_USER|TABLES?|TABLESPACE|TEMP(?:ORARY|TABLE)?|TERMINATED|TEXT(?:SIZE)?|THEN|TIME(?:STAMP)?|TINY(?:BLOB|INT|TEXT)|TOP?|TRAN(?:SACTIONS?)?|TRIGGER|TRUNCATE|TSEQUAL|TYPES?|UNBOUNDED|UNCOMMITTED|UNDEFINED|UNION|UNIQUE|UNLOCK|UNPIVOT|UNSIGNED|UPDATE(?:TEXT)?|USAGE|USE|USER|USING|VALUES?|VAR(?:BINARY|CHAR|CHARACTER|YING)|VIEW|WAITFOR|WARNINGS|WHEN|WHERE|WHILE|WITH(?: ROLLUP|IN)?|WORK|WRITE(?:TEXT)?|YEAR)\b/i ,
"boolean" : /\b(?:TRUE|FALSE|NULL)\b/i , number : /\b0x[\da-f]+\b|\b\d+\.?\d*|\B\.\d+\b/i , operator : /[-+*\/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?|\b(?:AND|BETWEEN|IN|LIKE|NOT|OR|IS|DIV|REGEXP|RLIKE|SOUNDS LIKE|XOR)\b/i , punctuation : /[;[\]()`,.]/ } ;
Prism . languages . python = { comment : { pattern : /(^|[^\\])#.*/ , lookbehind : ! 0 } , "triple-quoted-string" : { pattern : /("""|''')[\s\S]+?\1/ , greedy : ! 0 , alias : "string" } , string : { pattern : /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/ , greedy : ! 0 } , "function" : { pattern : /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g , lookbehind : ! 0 } , "class-name" : { pattern : /(\bclass\s+)\w+/i , lookbehind : ! 0 } , keyword : /\b(?:as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|pass|print|raise|return|try|while|with|yield|self)\b/ ,
module : /\b(?:exceptions|os|os.path|stat|string|re|math|cmath|operator|copy|sys|atexit|time|datetime|types|gc|io|functools|codecs|json|thread|threading|hashlib|shutil|md5|code|random)\b/ , builtin : /\b(?:__import__|abs|all|any|apply|ascii|basestring|bin|bool|buffer|bytearray|bytes|callable|chr|classmethod|cmp|coerce|compile|complex|delattr|dict|dir|divmod|enumerate|eval|execfile|file|filter|float|format|frozenset|getattr|globals|hasattr|hash|help|hex|id|input|int|intern|isinstance|issubclass|iter|len|list|locals|long|map|max|memoryview|min|next|object|oct|open|ord|pow|property|range|raw_input|reduce|reload|repr|reversed|round|set|setattr|slice|sorted|staticmethod|str|sum|super|tuple|type|unichr|unicode|vars|xrange|zip|isfile|mkdir|makedirs|exists|strftime)\b/ ,
"boolean" : /\b(?:True|False|None)\b/ , number : /(?:\b(?=\d)|\B(?=\.))(?:0[bo])?(?:(?:\d|0x[\da-f])[\da-f]*\.?\d*|\.\d+)(?:e[+-]?\d+)?j?\b/i , operator : /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/ , punctuation : /[{}[\];(),.:]/ } ;
2020-08-20 19:15:50 +08:00
Prism . languages . objectivec = Prism . languages . extend ( "c" , { keyword : /\b(?:asm|typeof|inline|auto|break|case|char|const|continue|default|do|double|else|enum|extern|float|for|goto|if|int|long|register|return|short|signed|sizeof|static|struct|switch|typedef|union|unsigned|void|volatile|while|in|self|super)\b|(?:@interface|@end|@implementation|@protocol|@class|@public|@protected|@private|@property|@try|@catch|@finally|@throw|@synthesize|@dynamic|@selector)\b/ , string : /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1|@"(?:\\(?:\r\n|[\s\S])|[^"\\\r\n])*"/ , operator : /-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/ } ) , delete Prism . languages . objectivec [ "class-name" ] , Prism . languages . objc = Prism . languages . objectivec ;
2019-11-17 23:15:56 +08:00
( function ( b ) { b . languages . smarty = { comment : /\{\*[\s\S]*?\*\}/ , delimiter : { pattern : /^\{|\}$/i , alias : "punctuation" } , string : /(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/ , number : /\b0x[\dA-Fa-f]+|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][-+]?\d+)?/ , variable : [ /\$(?!\d)\w+/ , /#(?!\d)\w+#/ , { pattern : /(\.|->)(?!\d)\w+/ , lookbehind : ! 0 } , { pattern : /(\[)(?!\d)\w+(?=\])/ , lookbehind : ! 0 } ] , "function" : [ { pattern : /(\|\s*)@?(?!\d)\w+/ , lookbehind : ! 0 } , /^\/?(?!\d)\w+/ , /(?!\d)\w+(?=\()/ ] , "attr-name" : { pattern : /\w+\s*=\s*(?:(?!\d)\w+)?/ , inside : { variable : { pattern : /(=\s*)(?!\d)\w+/ ,
lookbehind : ! 0 } , operator : /=/ } } , punctuation : [ /[\[\]().,:`]|->/ ] , operator : [ /[+\-*\/%]|==?=?|[!<>]=?|&&|\|\|?/ , /\bis\s+(?:not\s+)?(?:div|even|odd)(?:\s+by)?\b/ , /\b(?:eq|neq?|gt|lt|gt?e|lt?e|not|mod|or|and)\b/ ] , keyword : /\b(?:false|off|on|no|true|yes)\b/ } ; b . languages . insertBefore ( "smarty" , "tag" , { "smarty-comment" : { pattern : /\{\*[\s\S]*?\*\}/ , alias : [ "smarty" , "comment" ] } } ) ; b . hooks . add ( "before-tokenize" , function ( e ) { var c = ! 1 ; b . languages [ "markup-templating" ] . buildPlaceholders ( e , "smarty" , /\{\*[\s\S]*?\*\}|\{[\s\S]+?\}/g ,
function ( b ) { "{/literal}" === b && ( c = ! 1 ) ; return c ? ! 1 : ( "{literal}" === b && ( c = ! 0 ) , ! 0 ) } ) } ) ; b . hooks . add ( "after-tokenize" , function ( e ) { b . languages [ "markup-templating" ] . tokenizePlaceholders ( e , "smarty" ) } ) } ) ( Prism ) ;
( function ( ) { if ( "undefined" !== typeof self && self . Prism && self . document ) { var b = /\n(?!$)/g , e = function ( d ) { var e = c ( d ) [ "white-space" ] ; if ( "pre-wrap" === e || "pre-line" === e ) { e = d . querySelector ( "pre" ) ; var a = d . querySelector ( ".line-numbers-rows" ) , f = d . querySelector ( ".line-numbers-sizer" ) ; d = e . textContent . split ( b ) ; f || ( f = document . createElement ( "div" ) , f . className = "line-numbers-sizer" , e . appendChild ( f ) ) ; f . style . display = "block" ; d . forEach ( function ( b , c ) { f . textContent = b || "\n" ; b = f . getBoundingClientRect ( ) . height ; a . children [ c ] . style . height =
b + "px" } ) ; f . textContent = "" ; f . style . display = "none" } } , c = function ( b ) { return b ? window . getComputedStyle ? getComputedStyle ( b ) : b . currentStyle || null : null } ; window . addEventListener ( "resize" , function ( ) { Array . prototype . forEach . call ( document . querySelectorAll ( "pre.line-numbers" ) , e ) } ) ; Prism . hooks . add ( "complete" , function ( c ) { if ( c . code ) { var d = c . element . parentNode , a = /\s*\bline-numbers\b\s*/ ; if ( d && /pre/i . test ( d . nodeName ) && ( a . test ( d . className ) || a . test ( c . element . className ) ) && ! c . element . querySelector ( ".line-numbers-rows" ) ) { a . test ( c . element . className ) &&
( c . element . className = c . element . className . replace ( a , " " ) ) ; a . test ( d . className ) || ( d . className += " line-numbers" ) ; a = c . code . match ( b ) ; var f = Array ( ( a ? a . length + 1 : 1 ) + 1 ) ; f = f . join ( "<span></span>" ) ; a = document . createElement ( "span" ) ; a . setAttribute ( "aria-hidden" , "true" ) ; a . className = "line-numbers-rows" ; a . innerHTML = f ; d . hasAttribute ( "data-start" ) && ( d . style . counterReset = "linenumber " + ( parseInt ( d . getAttribute ( "data-start" ) , 10 ) - 1 ) ) ; c . element . appendChild ( a ) ; e ( d ) ; Prism . hooks . run ( "line-numbers" , c ) } } } ) ; Prism . hooks . add ( "line-numbers" ,
function ( b ) { b . plugins = b . plugins || { } ; b . plugins . lineNumbers = ! 0 } ) ; Prism . plugins . lineNumbers = { getLine : function ( b , c ) { if ( "PRE" === b . tagName && b . classList . contains ( "line-numbers" ) ) { var a = b . querySelector ( ".line-numbers-rows" ) ; b = parseInt ( b . getAttribute ( "data-start" ) , 10 ) || 1 ; var f = b + ( a . children . length - 1 ) ; c < b && ( c = b ) ; c > f && ( c = f ) ; return a . children [ c - b ] } } } } } ) ( ) ;
( function ( ) { if ( "undefined" !== typeof self && self . Prism && self . document ) { var b = [ ] , e = { } , c = function ( ) { } ; Prism . plugins . toolbar = { } ; var d = Prism . plugins . toolbar . registerButton = function ( a , c ) { b . push ( e [ a ] = "function" === typeof c ? c : function ( b ) { if ( "function" === typeof c . onClick ) { var a = document . createElement ( "button" ) ; a . type = "button" ; a . addEventListener ( "click" , function ( ) { c . onClick . call ( this , b ) } ) } else "string" === typeof c . url ? ( a = document . createElement ( "a" ) , a . href = c . url ) : a = document . createElement ( "span" ) ; a . textContent = c . text ;
return a } ) } , k = Prism . plugins . toolbar . hook = function ( a ) { var d = a . element . parentNode ; if ( d && /pre/i . test ( d . nodeName ) && ! d . parentNode . classList . contains ( "code-toolbar" ) ) { var g = document . createElement ( "div" ) ; g . classList . add ( "code-toolbar" ) ; d . parentNode . insertBefore ( g , d ) ; g . appendChild ( d ) ; d = document . createElement ( "div" ) ; d . classList . add ( "shelter" ) ; g . appendChild ( d ) ; var k = document . createElement ( "div" ) ; k . classList . add ( "toolbar" ) ; document . body . hasAttribute ( "data-toolbar-order" ) && ( b = document . body . getAttribute ( "data-toolbar-order" ) . split ( "," ) . map ( function ( a ) { return e [ a ] ||
c } ) ) ; b . forEach ( function ( b ) { if ( b = b ( a ) ) { var c = document . createElement ( "div" ) ; c . classList . add ( "toolbar-item" ) ; c . appendChild ( b ) ; k . appendChild ( c ) } } ) ; g . appendChild ( k ) } } ; d ( "label" , function ( a ) { if ( ( a = a . element . parentNode ) && /pre/i . test ( a . nodeName ) && a . hasAttribute ( "data-label" ) ) { var b = a . getAttribute ( "data-label" ) ; try { var c = document . querySelector ( "template#" + b ) } catch ( l ) { } c ? c = c . content : ( a . hasAttribute ( "data-url" ) ? ( c = document . createElement ( "a" ) , c . href = a . getAttribute ( "data-url" ) ) : c = document . createElement ( "span" ) ,
c . textContent = b ) ; return c } } ) ; Prism . hooks . add ( "complete" , k ) } } ) ( ) ;
( function ( ) { if ( "undefined" !== typeof self && self . Prism && self . document ) if ( Prism . plugins . toolbar ) { var b = { html : "HTML" , xml : "XML" , svg : "SVG" , mathml : "MathML" , css : "CSS" , clike : "C-like" , javascript : "JavaScript" , abap : "ABAP" , actionscript : "ActionScript" , apacheconf : "Apache Configuration" , apl : "APL" , applescript : "AppleScript" , arff : "ARFF" , asciidoc : "AsciiDoc" , asm6502 : "6502 Assembly" , aspnet : "ASP.NET (C#)" , autohotkey : "AutoHotkey" , autoit : "AutoIt" , basic : "BASIC" , csharp : "C#" , cpp : "C++" , coffeescript : "CoffeeScript" , csp : "Content-Security-Policy" ,
"css-extras" : "CSS Extras" , django : "Django/Jinja2" , erb : "ERB" , fsharp : "F#" , gedcom : "GEDCOM" , glsl : "GLSL" , graphql : "GraphQL" , http : "HTTP" , hpkp : "HTTP Public-Key-Pins" , hsts : "HTTP Strict-Transport-Security" , ichigojam : "IchigoJam" , inform7 : "Inform 7" , json : "JSON" , latex : "LaTeX" , livescript : "LiveScript" , lolcode : "LOLCODE" , "markup-templating" : "Markup templating" , matlab : "MATLAB" , mel : "MEL" , n4js : "N4JS" , nasm : "NASM" , nginx : "nginx" , nsis : "NSIS" , objectivec : "Objective-C" , ocaml : "OCaml" , opencl : "OpenCL" , parigp : "PARI/GP" , php : "PHP" ,
"php-extras" : "PHP Extras" , plsql : "PL/SQL" , powershell : "PowerShell" , properties : ".properties" , protobuf : "Protocol Buffers" , q : "Q (kdb+ database)" , jsx : "React JSX" , tsx : "React TSX" , renpy : "Ren'py" , rest : "reST (reStructuredText)" , sas : "SAS" , sass : "Sass (Sass)" , scss : "Sass (Scss)" , sql : "SQL" , go : "GO" , soy : "Soy (Closure Template)" , typescript : "TypeScript" , vbnet : "VB.Net" , vhdl : "VHDL" , vim : "vim" , "visual-basic" : "Visual Basic" , wasm : "WebAssembly" , wiki : "Wiki markup" , xojo : "Xojo (REALbasic)" , yaml : "YAML" } ; Prism . plugins . toolbar . registerButton ( "show-language" ,
function ( e ) { var c = e . element . parentNode ; if ( c && /pre/i . test ( c . nodeName ) && ( e = c . getAttribute ( "data-language" ) || b [ e . language ] || e . language && e . language . substring ( 0 , 1 ) . toUpperCase ( ) + e . language . substring ( 1 ) ) ) return c = document . createElement ( "span" ) , c . textContent = e , c } ) } else console . warn ( "Show Languages plugin loaded before Toolbar plugin." ) } ) ( ) ;
Prism . languages . clike = { comment : [ { pattern : /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/ , lookbehind : ! 0 } , { pattern : /(^|[^\\:])\/\/.*/ , lookbehind : ! 0 , greedy : ! 0 } ] , string : { pattern : /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/ , greedy : ! 0 } , "class-name" : { pattern : /(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i , lookbehind : ! 0 , inside : { punctuation : /[.\\]/ } } , keyword : /\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/ , boolean : /\b(?:true|false)\b/ ,
function : /\w+(?=\()/ , number : /\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i , operator : /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/ , punctuation : /[{}[\];(),.:]/ } ;
2020-06-30 20:03:12 +08:00
Prism . languages . go = Prism . languages . extend ( "clike" , { keyword : /\b(?:break|case|chan|const|continue|default|defer|else|fallthrough|for|func|go(?:to)?|if|import|interface|map|package|range|return|select|struct|switch|type|var)\b/ , builtin : /\b(?:bool|byte|complex(?:64|128)|error|float(?:32|64)|rune|string|u?int(?:8|16|32|64)?|uintptr|append|cap|close|complex|copy|delete|imag|len|make|new|panic|print(?:ln)?|real|recover)\b/ , boolean : /\b(?:_|iota|nil|true|false)\b/ , operator : /[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./ ,
2019-11-17 23:15:56 +08:00
number : /(?:\b0x[a-f\d]+|(?:\b\d+\.?\d*|\B\.\d+)(?:e[-+]?\d+)?)i?/i , string : { pattern : /(["'`])(?:\\[\s\S]|(?!\1)[^\\])*\1/ , greedy : ! 0 } } ) ; delete Prism . languages . go [ "class-name" ] ;
( function ( ) { if ( "undefined" !== typeof self && self . Prism && self . document ) if ( Prism . plugins . toolbar ) { var b = window . ClipboardJS || void 0 ; b || "function" !== typeof require || ( b = require ( "clipboard" ) ) ; var e = [ ] ; if ( ! b ) { var c = document . createElement ( "script" ) , d = document . querySelector ( "head" ) ; c . onload = function ( ) { if ( b = window . ClipboardJS ) for ( ; e . length ; ) e . pop ( ) ( ) } ; c . src = "https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js" ; d . appendChild ( c ) } Prism . plugins . toolbar . registerButton ( "copy-to-clipboard" , function ( c ) { function a ( ) { var a =
new b ( g , { text : function ( ) { return c . code } } ) ; a . on ( "success" , function ( ) { g . innerHTML = '<i class="fontello fontello-tags" id="btn-copy-code"style="font-style:normal;"> \u5df2\u590d\u5236</i>' ; d ( ) } ) ; a . on ( "error" , function ( ) { g . textContent = "Press Ctrl+C to copy" ; d ( ) } ) } function d ( ) { setTimeout ( function ( ) { g . innerHTML = '<i class="fontello fontello-tags" id="btn-copy-code"style="font-style:normal;"> \u590d\u5236</i>' } , 5E3 ) } var g = document . createElement ( "button" ) ; g . innerHTML = '<i class="fontello fontello-tags" id="btn-copy-code"style="font-style:normal;"> \u590d\u5236</i>' ;
b ? a ( ) : e . push ( a ) ; return g } ) } else console . warn ( "Copy to Clipboard plugin loaded before Toolbar plugin." ) } ) ( ) ;