2018-09-05 12:16:29 +02:00
/ * P r i s m J S 1 . 1 5 . 0
2018-09-20 10:31:32 +02:00
https : //prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+actionscript+c+csharp+bash+cpp+aspnet+css-extras+diff+markup-templating+markdown+perl+php+php-extras+sql+python+yaml&plugins=line-highlight+line-numbers+autolinker */
2018-09-05 12:16:29 +02:00
var _self = "undefined" != typeof window ? window : "undefined" != typeof WorkerGlobalScope && self instanceof WorkerGlobalScope ? self : { } , Prism = function ( ) { var e = /\blang(?:uage)?-([\w-]+)\b/i , t = 0 , n = _self . Prism = { manual : _self . Prism && _self . Prism . manual , disableWorkerMessageHandler : _self . Prism && _self . Prism . disableWorkerMessageHandler , util : { encode : function ( e ) { return e instanceof r ? new r ( e . type , n . util . encode ( e . content ) , e . alias ) : "Array" === n . util . type ( e ) ? e . map ( n . util . encode ) : e . replace ( /&/g , "&" ) . replace ( /</g , "<" ) . replace ( /\u00a0/g , " " ) } , type : function ( e ) { return Object . prototype . toString . call ( e ) . match ( /\[object (\w+)\]/ ) [ 1 ] } , objId : function ( e ) { return e . _ _id || Object . defineProperty ( e , "__id" , { value : ++ t } ) , e . _ _id } , clone : function ( e , t ) { var r = n . util . type ( e ) ; switch ( t = t || { } , r ) { case "Object" : if ( t [ n . util . objId ( e ) ] ) return t [ n . util . objId ( e ) ] ; var a = { } ; t [ n . util . objId ( e ) ] = a ; for ( var l in e ) e . hasOwnProperty ( l ) && ( a [ l ] = n . util . clone ( e [ l ] , t ) ) ; return a ; case "Array" : if ( t [ n . util . objId ( e ) ] ) return t [ n . util . objId ( e ) ] ; var a = [ ] ; return t [ n . util . objId ( e ) ] = a , e . forEach ( function ( e , r ) { a [ r ] = n . util . clone ( e , t ) } ) , a } return e } } , languages : { extend : function ( e , t ) { var r = n . util . clone ( n . languages [ e ] ) ; for ( var a in t ) r [ a ] = t [ a ] ; return r } , insertBefore : function ( e , t , r , a ) { a = a || n . languages ; var l = a [ e ] ; if ( 2 == arguments . length ) { r = arguments [ 1 ] ; for ( var i in r ) r . hasOwnProperty ( i ) && ( l [ i ] = r [ i ] ) ; return l } var o = { } ; for ( var s in l ) if ( l . hasOwnProperty ( s ) ) { if ( s == t ) for ( var i in r ) r . hasOwnProperty ( i ) && ( o [ i ] = r [ i ] ) ; o [ s ] = l [ s ] } var u = a [ e ] ; return a [ e ] = o , n . languages . DFS ( n . languages , function ( t , n ) { n === u && t != e && ( this [ t ] = o ) } ) , o } , DFS : function ( e , t , r , a ) { a = a || { } ; for ( var l in e ) e . hasOwnProperty ( l ) && ( t . call ( e , l , e [ l ] , r || l ) , "Object" !== n . util . type ( e [ l ] ) || a [ n . util . objId ( e [ l ] ) ] ? "Array" !== n . util . type ( e [ l ] ) || a [ n . util . objId ( e [ l ] ) ] || ( a [ n . util . objId ( e [ l ] ) ] = ! 0 , n . languages . DFS ( e [ l ] , t , l , a ) ) : ( a [ n . util . objId ( e [ l ] ) ] = ! 0 , n . languages . DFS ( e [ l ] , t , null , a ) ) ) } } , plugins : { } , highlightAll : function ( e , t ) { n . highlightAllUnder ( document , e , t ) } , highlightAllUnder : function ( e , t , r ) { var a = { callback : r , selector : 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code' } ; n . hooks . run ( "before-highlightall" , a ) ; for ( var l , i = a . elements || e . querySelectorAll ( a . selector ) , o = 0 ; l = i [ o ++ ] ; ) n . highlightElement ( l , t === ! 0 , a . callback ) } , highlightElement : function ( t , r , a ) { for ( var l , i , o = t ; o && ! e . test ( o . className ) ; ) o = o . parentNode ; o && ( l = ( o . className . match ( e ) || [ , "" ] ) [ 1 ] . toLowerCase ( ) , i = n . languages [ l ] ) , t . className = t . className . replace ( e , "" ) . replace ( /\s+/g , " " ) + " language-" + l , t . parentNode && ( o = t . parentNode , /pre/i . test ( o . nodeName ) && ( o . className = o . className . replace ( e , "" ) . replace ( /\s+/g , " " ) + " language-" + l ) ) ; var s = t . textContent , u = { element : t , language : l , grammar : i , code : s } ; if ( n . hooks . run ( "before-sanity-check" , u ) , ! u . code || ! u . grammar ) return u . code && ( n . hooks . run ( "before-highlight" , u ) , u . element . textContent = u . code , n . hooks . run ( "after-highlight" , u ) ) , n . hooks . run ( "complete" , u ) , void 0 ; if ( n . hooks . run ( "before-highlight" , u ) , r && _self . Worker ) { var g = new Worker ( n . filename ) ; g . onmessage = function ( e ) { u . highlightedCode = e . data , n . hooks . run ( "before-insert" , u ) , u . element . innerHTML = u . highlightedCode , a && a . call ( u . element ) , n . hooks . run ( "after-highlight" , u ) , n . hooks . run ( "complete" , u ) } , g . postMessage ( JSON . stringify ( { language : u . language , code : u . code , immediateClose : ! 0 } ) ) } else u . highlightedCode = n . highlight ( u . code , u . grammar , u . language ) , n . hooks . run ( "before-insert" , u ) , u . element . innerHTML = u . highlightedCode , a && a . call ( t ) , n . hooks . run ( "after-highlight" , u ) , n . hooks . run ( "complete" , u ) } , highlight : function ( e , t , a ) { var l = { code : e , grammar : t , language : a } ; return n . hooks . run ( "before-tokenize" , l ) , l . tokens = n . tokenize ( l . code , l . grammar ) , n . hooks . run ( "after-tokenize" , l ) , r . stringify ( n . util . encode ( l . tokens ) , l . language ) } , matchGrammar : function ( e , t , r , a , l , i , o ) { var s = n . Token ; for ( var u in r ) if ( r . hasOwnProperty ( u ) && r [ u ] ) { if ( u == o ) return ; var g = r [ u ] ; g = "Array" === n . util . type ( g ) ? g : [ g ] ; for ( var c = 0 ; c < g . length ; ++ c ) { var h = g [ c ] , f = h . inside , d = ! ! h . lookbehind , m = ! ! h . greedy , p = 0 , y = h . alias ; if ( m && ! h . pattern . global ) { var v = h . pattern . toString ( ) . match ( /[imuy]*$/ ) [ 0 ] ; h . pattern = RegExp ( h . pattern . source , v + "g" ) } h = h . pattern || h ; for ( var b = a , k = l ; b < t . length ; k += t [ b ] . length , ++ b ) { var w = t
Prism . languages . markup = { comment : /<!--[\s\S]*?-->/ , prolog : /<\?[\s\S]+?\?>/ , doctype : /<!DOCTYPE[\s\S]+?>/i , cdata : /<!\[CDATA\[[\s\S]*?]]>/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 ( a ) { "entity" === a . type && ( a . attributes . title = a . 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 ) ) ;
2018-09-20 10:31:32 +02:00
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" : /\w+(?=\()/ , number : /\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i , operator : /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/ , punctuation : /[{}[\];(),.:]/ } ;
2018-09-05 12:16:29 +02:00
Prism . languages . javascript = Prism . languages . extend ( "clike" , { "class-name" : [ Prism . languages . clike [ "class-name" ] , { pattern : /(^|[^$\w\xA0-\uFFFF])[_$A-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\.(?:prototype|constructor))/ , lookbehind : ! 0 } ] , keyword : [ { pattern : /((?:^|})\s*)(?:catch|finally)\b/ , lookbehind : ! 0 } , /\b(?:as|async|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|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/ ] , number : /\b(?:(?:0[xX][\dA-Fa-f]+|0[bB][01]+|0[oO][0-7]+)n?|\d+n|NaN|Infinity)\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/ , "function" : /[_$a-zA-Z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*\(|\.(?:apply|bind|call)\()/ , operator : /-[-=]?|\+[+=]?|!=?=?|<<?=?|>>?>?=?|=(?:==?|>)?|&[&=]?|\|[|=]?|\*\*?=?|\/=?|~|\^=?|%=?|\?|\.{3}/ } ) , Prism . languages . javascript [ "class-name" ] [ 0 ] . pattern = /(\b(?:class|interface|extends|implements|instanceof|new)\s+)[\w.\\]+/ , 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 : Prism . languages . javascript } } , string : /[\s\S]+/ } } } ) , 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 ;
Prism . languages . actionscript = Prism . languages . extend ( "javascript" , { keyword : /\b(?:as|break|case|catch|class|const|default|delete|do|else|extends|finally|for|function|if|implements|import|in|instanceof|interface|internal|is|native|new|null|package|private|protected|public|return|super|switch|this|throw|try|typeof|use|var|void|while|with|dynamic|each|final|get|include|namespace|native|override|set|static)\b/ , operator : /\+\+|--|(?:[+\-*\/%^]|&&?|\|\|?|<<?|>>?>?|[!=]=?)=?|[~?@]/ } ) , Prism . languages . actionscript [ "class-name" ] . alias = "function" , Prism . languages . markup && Prism . languages . insertBefore ( "actionscript" , "string" , { xml : { pattern : /(^|[^.])<\/?\w+(?:\s+[^\s>\/=]+=("|')(?:\\[\s\S]|(?!\2)[^\\])*\2)*\s*\/?>/ , lookbehind : ! 0 , inside : { rest : Prism . languages . markup } } } ) ;
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 : />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*\/%&|^!=<>]=?/ , 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 . 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 ( e ) { var t = { 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 ] } ; e . 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 : t } , { pattern : /(["'])(?:\\[\s\S]|\$\([^)]+\)|`[^`]+`|(?!\1)[^\\])*\1/ , greedy : ! 0 , inside : t } ] , variable : t . 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 : /\$?\(\(?|\)\)?|\.\.|[{}[\];]/ } ; var a = t . variable [ 1 ] . inside ; a . string = e . languages . bash . string , a [ "function" ] = e . languages . bash [ "function" ] , a . keyword = e . languages . bash . keyword , a [ "boolean" ] = e . languages . bash [ "boolean" ] , a . operator = e . languages . bash . operator , a . punctuation = e . languages . bash . punctuation , e . languages . shell = e . 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|[?:~]|[-+*\/%&|^!=<>]=?|\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 . 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 || { } } } ) ;
Prism . languages . css . selector = { pattern : /[^{}\s][^{}]*(?=\s*\{)/ , inside : { "pseudo-element" : /:(?:after|before|first-letter|first-line|selection)|::[-\w]+/ , "pseudo-class" : /:[-\w]+(?:\(.*\))?/ , "class" : /\.[-:.\w]+/ , id : /#[-:.\w]+/ , attribute : /\[[^\]]+\]/ } } , Prism . languages . insertBefore ( "css" , "function" , { hexcode : /#[\da-f]{3,8}/i , entity : /\\[\da-f]{1,8}/i , number : /[\d%.]+/ } ) ;
2017-10-15 02:07:41 +02:00
Prism . languages . diff = { coord : [ /^(?:\*{3}|-{3}|\+{3}).*$/m , /^@@.*@@$/m , /^\d+.*$/m ] , deleted : /^[-<].*$/m , inserted : /^[+>].*$/m , diff : { pattern : /^!(?!!).+$/m , alias : "important" } } ;
2018-09-05 12:16:29 +02:00
Prism . languages [ "markup-templating" ] = { } , Object . defineProperties ( Prism . languages [ "markup-templating" ] , { buildPlaceholders : { value : function ( e , t , n , a ) { e . language === t && ( e . tokenStack = [ ] , e . code = e . code . replace ( n , function ( n ) { if ( "function" == typeof a && ! a ( n ) ) return n ; for ( var r = e . tokenStack . length ; - 1 !== e . code . indexOf ( "___" + t . toUpperCase ( ) + r + "___" ) ; ) ++ r ; return e . tokenStack [ r ] = n , "___" + t . toUpperCase ( ) + r + "___" } ) , e . grammar = Prism . languages . markup ) } } , tokenizePlaceholders : { value : function ( e , t ) { if ( e . language === t && e . tokenStack ) { e . grammar = Prism . languages [ t ] ; var n = 0 , a = Object . keys ( e . tokenStack ) , r = function ( o ) { if ( ! ( n >= a . length ) ) for ( var i = 0 ; i < o . length ; i ++ ) { var g = o [ i ] ; if ( "string" == typeof g || g . content && "string" == typeof g . content ) { var c = a [ n ] , s = e . tokenStack [ c ] , l = "string" == typeof g ? g : g . content , p = l . indexOf ( "___" + t . toUpperCase ( ) + c + "___" ) ; if ( p > - 1 ) { ++ n ; var f , u = l . substring ( 0 , p ) , _ = new Prism . Token ( t , Prism . tokenize ( s , e . grammar , t ) , "language-" + t , s ) , k = l . substring ( p + ( "___" + t . toUpperCase ( ) + c + "___" ) . length ) ; if ( u || k ? ( f = [ u , _ , k ] . filter ( function ( e ) { return ! ! e } ) , r ( f ) ) : f = _ , "string" == typeof g ? Array . prototype . splice . apply ( o , [ i , 1 ] . concat ( f ) ) : g . content = f , n >= a . length ) break } } else g . content && "string" != typeof g . content && r ( g . content ) } } ; r ( e . tokens ) } } } } ) ;
2018-09-20 10:31:32 +02:00
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 ;
2018-09-05 12:16:29 +02:00
Prism . languages . perl = { comment : [ { pattern : /(^\s*)=\w+[\s\S]*?=cut.*/m , lookbehind : ! 0 } , { pattern : /(^|[^\\$])#.*/ , lookbehind : ! 0 } ] , string : [ { pattern : /\b(?:q|qq|qx|qw)\s*([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/ , greedy : ! 0 } , { pattern : /\b(?:q|qq|qx|qw)\s+([a-zA-Z0-9])(?:(?!\1)[^\\]|\\[\s\S])*\1/ , greedy : ! 0 } , { pattern : /\b(?:q|qq|qx|qw)\s*\((?:[^()\\]|\\[\s\S])*\)/ , greedy : ! 0 } , { pattern : /\b(?:q|qq|qx|qw)\s*\{(?:[^{}\\]|\\[\s\S])*\}/ , greedy : ! 0 } , { pattern : /\b(?:q|qq|qx|qw)\s*\[(?:[^[\]\\]|\\[\s\S])*\]/ , greedy : ! 0 } , { pattern : /\b(?:q|qq|qx|qw)\s*<(?:[^<>\\]|\\[\s\S])*>/ , greedy : ! 0 } , { pattern : /("|`)(?:(?!\1)[^\\]|\\[\s\S])*\1/ , greedy : ! 0 } , { pattern : /'(?:[^'\\\r\n]|\\.)*'/ , greedy : ! 0 } ] , regex : [ { pattern : /\b(?:m|qr)\s*([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1[msixpodualngc]*/ , greedy : ! 0 } , { pattern : /\b(?:m|qr)\s+([a-zA-Z0-9])(?:(?!\1)[^\\]|\\[\s\S])*\1[msixpodualngc]*/ , greedy : ! 0 } , { pattern : /\b(?:m|qr)\s*\((?:[^()\\]|\\[\s\S])*\)[msixpodualngc]*/ , greedy : ! 0 } , { pattern : /\b(?:m|qr)\s*\{(?:[^{}\\]|\\[\s\S])*\}[msixpodualngc]*/ , greedy : ! 0 } , { pattern : /\b(?:m|qr)\s*\[(?:[^[\]\\]|\\[\s\S])*\][msixpodualngc]*/ , greedy : ! 0 } , { pattern : /\b(?:m|qr)\s*<(?:[^<>\\]|\\[\s\S])*>[msixpodualngc]*/ , greedy : ! 0 } , { pattern : /(^|[^-]\b)(?:s|tr|y)\s*([^a-zA-Z0-9\s{(\[<])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2[msixpodualngcer]*/ , lookbehind : ! 0 , greedy : ! 0 } , { pattern : /(^|[^-]\b)(?:s|tr|y)\s+([a-zA-Z0-9])(?:(?!\2)[^\\]|\\[\s\S])*\2(?:(?!\2)[^\\]|\\[\s\S])*\2[msixpodualngcer]*/ , lookbehind : ! 0 , greedy : ! 0 } , { pattern : /(^|[^-]\b)(?:s|tr|y)\s*\((?:[^()\\]|\\[\s\S])*\)\s*\((?:[^()\\]|\\[\s\S])*\)[msixpodualngcer]*/ , lookbehind : ! 0 , greedy : ! 0 } , { pattern : /(^|[^-]\b)(?:s|tr|y)\s*\{(?:[^{}\\]|\\[\s\S])*\}\s*\{(?:[^{}\\]|\\[\s\S])*\}[msixpodualngcer]*/ , lookbehind : ! 0 , greedy : ! 0 } , { pattern : /(^|[^-]\b)(?:s|tr|y)\s*\[(?:[^[\]\\]|\\[\s\S])*\]\s*\[(?:[^[\]\\]|\\[\s\S])*\][msixpodualngcer]*/ , lookbehind : ! 0 , greedy : ! 0 } , { pattern : /(^|[^-]\b)(?:s|tr|y)\s*<(?:[^<>\\]|\\[\s\S])*>\s*<(?:[^<>\\]|\\[\s\S])*>[msixpodualngcer]*/ , lookbehind : ! 0 , greedy : ! 0 } , { pattern : /\/(?:[^\/\\\r\n]|\\.)*\/[msixpodualngc]*(?=\s*(?:$|[\r\n,.;})&|\-+*~<>!?^]|(lt|gt|le|ge|eq|ne|cmp|not|and|or|xor|x)\b))/ , greedy : ! 0 } ] , variable : [ /[&*$@%]\{\^[A-Z]+\}/ , /[&*$@%]\^[A-Z_]/ , /[&*$@%]#?(?=\{)/ , /[&*$@%]#?(?:(?:::)*'?(?!\d)[\w$]+)+(?:::)*/i , /[&*$@%]\d+/ , /(?!%=)[$@%][!"#$%&'()*+,\-.\/:;<=>?@[\\\]^_`{|}~]/ ] , filehandle : { pattern : /<(?![<=])\S*>|\b_\b/ , alias : "symbol" } , vstring : { pattern : /v\d+(?:\.\d+)*|\d+(?:\.\d+){2,}/ , alias : "string" } , "function" : { pattern : /sub [a-z0-9_]+/i , inside : { keyword : /sub/ } } , keyword : /\b(?:any|break|continue|default|delete|die|do|else|elsif|eval|for|foreach|given|goto|if|last|local|my|next|our|package|print|redo|require|say|state|sub|switch|undef|unless|until|use|when|while)\b/ , number : /\b(?:0x[\dA-Fa-f](?:_?[\dA-Fa-f])*|0b[01](?:_?[01])*|(?:\d(?:_?\d)*)?\.?\d(?:_?\d)*(?:[Ee][+-]?\d+)?)\b/ , operator : /-[rwxoRWXOezsfdlpSbctugkTBMAC]\b|\+[+=]?|-[-=>]?|\*\*?=?|\/\/?=?|=[=~>]?|~[~=]?|\|\|?=?|&&?=?|<(?:=>?|<=?)?|>>?=?|![~=]?|[%^]=?|\.(?:=|\.\.?)?|[\\?]|\bx(?:=|\b)|\b(?:lt|gt|le|ge|eq|ne|cmp|not|and|or|xor)\b/ , punctuation : /[{}[\];(),:]/ } ;
! function ( e ) { e . languages . php = e . 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 } } ) , e . languages . insertBefore ( "php" , "string" , { "shell-comment" : { pattern : /(^|[^\\])#.*/ , lookbehind : ! 0 , alias : "comment" } } ) , e . 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 : /\\/ } } } ) , e . languages . insertBefore ( "php" , "operator" , { property : { pattern : /(->)[\w]+/ , lookbehind : ! 0 } } ) ; var n = { pattern : /{\$(?:{(?:{[^{}]+}|[^{}]+)}|[^{}])+}|(^|[^\\{])\$+(?:\w+(?:\[.+?]|->\w+)*)/ , lookbehind : ! 0 , inside : { rest : e . languages . php } } ; e . 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 : n } } , "single-quoted-string" : { pattern : /'(?:\\[\s\S]|[^\\'])*'/ , greedy : ! 0 , alias : "string" } , "double-quoted-string" : { pattern : /"(?:\\[\s\S]|[^\\"])*"/ , greedy : ! 0 , alias : "string" , inside : { interpolation : n } } } ) , delete e . languages . php . string , e . hooks . add ( "before-tokenize" , function ( n ) { if ( /(?:<\?php|<\?)/gi . test ( n . code ) ) { var t = /(?:<\?php|<\?)[\s\S]*?(?:\?>|$)/gi ; e . languages [ "markup-templating" ] . buildPlaceholders ( n , "php" , t ) } } ) , e . hooks . add ( "after-tokenize" , function ( n ) { e . languages [ "markup-templating" ] . tokenizePlaceholders ( n , "php" ) } ) } ( Prism ) ;
Prism . languages . insertBefore ( "php" , "variable" , { "this" : /\$this\b/ , global : /\$(?:_(?:SERVER|GET|POST|FILES|REQUEST|SESSION|ENV|COOKIE)|GLOBALS|HTTP_RAW_POST_DATA|argc|argv|php_errormsg|http_response_header)\b/ , scope : { pattern : /\b[\w\\]+::/ , inside : { keyword : /static|self|parent/ , punctuation : /::|\\/ } } } ) ;
Prism . languages . sql = { comment : { pattern : /(^|[^\\])(?:\/\*[\s\S]*?\*\/|(?:--|\/\/|#).*)/ , lookbehind : ! 0 } , variable : [ { pattern : /@(["'`])(?:\\[\s\S]|(?!\1)[^\\])+\1/ , greedy : ! 0 } , /@[\w.$]+/ ] , string : { pattern : /(^|[^@\\])("|')(?:\\[\s\S]|(?!\2)[^\\]|\2\2)*\2/ , greedy : ! 0 , lookbehind : ! 0 } , "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)\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)\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 : /[{}[\];(),.:]/ } ;
Prism . languages . yaml = { scalar : { pattern : /([\-:]\s*(?:![^\s]+)?[ \t]*[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)[^\r\n]+(?:\2[^\r\n]+)*)/ , lookbehind : ! 0 , alias : "string" } , comment : /#.*/ , key : { pattern : /(\s*(?:^|[:\-,[{\r\n?])[ \t]*(?:![^\s]+)?[ \t]*)[^\r\n{[\]},#\s]+?(?=\s*:\s)/ , lookbehind : ! 0 , alias : "atrule" } , directive : { pattern : /(^[ \t]*)%.+/m , lookbehind : ! 0 , alias : "important" } , datetime : { pattern : /([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:\d{4}-\d\d?-\d\d?(?:[tT]|[ \t]+)\d\d?:\d{2}:\d{2}(?:\.\d*)?[ \t]*(?:Z|[-+]\d\d?(?::\d{2})?)?|\d{4}-\d{2}-\d{2}|\d\d?:\d{2}(?::\d{2}(?:\.\d*)?)?)(?=[ \t]*(?:$|,|]|}))/m , lookbehind : ! 0 , alias : "number" } , "boolean" : { pattern : /([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:true|false)[ \t]*(?=$|,|]|})/im , lookbehind : ! 0 , alias : "important" } , "null" : { pattern : /([:\-,[{]\s*(?:![^\s]+)?[ \t]*)(?:null|~)[ \t]*(?=$|,|]|})/im , lookbehind : ! 0 , alias : "important" } , string : { pattern : /([:\-,[{]\s*(?:![^\s]+)?[ \t]*)("|')(?:(?!\2)[^\\\r\n]|\\.)*\2(?=[ \t]*(?:$|,|]|}))/m , lookbehind : ! 0 , greedy : ! 0 } , number : { pattern : /([:\-,[{]\s*(?:![^\s]+)?[ \t]*)[+-]?(?:0x[\da-f]+|0o[0-7]+|(?:\d+\.?\d*|\.?\d+)(?:e[+-]?\d+)?|\.inf|\.nan)[ \t]*(?=$|,|]|})/im , lookbehind : ! 0 } , tag : /![^\s]+/ , important : /[&*][\w]+/ , punctuation : /---|[:[\]{}\-,|>?]|\.\.\./ } ;
! function ( ) { function e ( e , t ) { return Array . prototype . slice . call ( ( t || document ) . querySelectorAll ( e ) ) } function t ( e , t ) { return t = " " + t + " " , ( " " + e . className + " " ) . replace ( /[\n\t]/g , " " ) . indexOf ( t ) > - 1 } function n ( e , n , i ) { n = "string" == typeof n ? n : e . getAttribute ( "data-line" ) ; for ( var o , l = n . replace ( /\s+/g , "" ) . split ( "," ) , a = + e . getAttribute ( "data-line-offset" ) || 0 , s = r ( ) ? parseInt : parseFloat , d = s ( getComputedStyle ( e ) . lineHeight ) , u = t ( e , "line-numbers" ) , c = 0 ; o = l [ c ++ ] ; ) { var p = o . split ( "-" ) , m = + p [ 0 ] , f = + p [ 1 ] || m , h = e . querySelector ( '.line-highlight[data-range="' + o + '"]' ) || document . createElement ( "div" ) ; if ( h . setAttribute ( "aria-hidden" , "true" ) , h . setAttribute ( "data-range" , o ) , h . className = ( i || "" ) + " line-highlight" , u && Prism . plugins . lineNumbers ) { var g = Prism . plugins . lineNumbers . getLine ( e , m ) , y = Prism . plugins . lineNumbers . getLine ( e , f ) ; g && ( h . style . top = g . offsetTop + "px" ) , y && ( h . style . height = y . offsetTop - g . offsetTop + y . offsetHeight + "px" ) } else h . setAttribute ( "data-start" , m ) , f > m && h . setAttribute ( "data-end" , f ) , h . style . top = ( m - a - 1 ) * d + "px" , h . textContent = new Array ( f - m + 2 ) . join ( " \n" ) ; u ? e . appendChild ( h ) : ( e . querySelector ( "code" ) || e ) . appendChild ( h ) } } function i ( ) { var t = location . hash . slice ( 1 ) ; e ( ".temporary.line-highlight" ) . forEach ( function ( e ) { e . parentNode . removeChild ( e ) } ) ; var i = ( t . match ( /\.([\d,-]+)$/ ) || [ , "" ] ) [ 1 ] ; if ( i && ! document . getElementById ( t ) ) { var r = t . slice ( 0 , t . lastIndexOf ( "." ) ) , o = document . getElementById ( r ) ; o && ( o . hasAttribute ( "data-line" ) || o . setAttribute ( "data-line" , "" ) , n ( o , i , "temporary " ) , document . querySelector ( ".temporary.line-highlight" ) . scrollIntoView ( ) ) } } if ( "undefined" != typeof self && self . Prism && self . document && document . querySelector ) { var r = function ( ) { var e ; return function ( ) { if ( "undefined" == typeof e ) { var t = document . createElement ( "div" ) ; t . style . fontSize = "13px" , t . style . lineHeight = "1.5" , t . style . padding = 0 , t . style . border = 0 , t . innerHTML = " <br /> " , document . body . appendChild ( t ) , e = 38 === t . offsetHeight , document . body . removeChild ( t ) } return e } } ( ) , o = 0 ; Prism . hooks . add ( "before-sanity-check" , function ( t ) { var n = t . element . parentNode , i = n && n . getAttribute ( "data-line" ) ; if ( n && i && /pre/i . test ( n . nodeName ) ) { var r = 0 ; e ( ".line-highlight" , n ) . forEach ( function ( e ) { r += e . textContent . length , e . parentNode . removeChild ( e ) } ) , r && /^( \n)+$/ . test ( t . code . slice ( - r ) ) && ( t . code = t . code . slice ( 0 , - r ) ) } } ) , Prism . hooks . add ( "complete" , function l ( e ) { var r = e . element . parentNode , a = r && r . getAttribute ( "data-line" ) ; if ( r && a && /pre/i . test ( r . nodeName ) ) { clearTimeout ( o ) ; var s = Prism . plugins . lineNumbers , d = e . plugins && e . plugins . lineNumbers ; t ( r , "line-numbers" ) && s && ! d ? Prism . hooks . add ( "line-numbers" , l ) : ( n ( r , a ) , o = setTimeout ( i , 1 ) ) } } ) , window . addEventListener ( "hashchange" , i ) , window . addEventListener ( "resize" , function ( ) { var e = document . querySelectorAll ( "pre[data-line]" ) ; Array . prototype . forEach . call ( e , function ( e ) { n ( e ) } ) } ) } } ( ) ;
! function ( ) { if ( "undefined" != typeof self && self . Prism && self . document ) { var e = "line-numbers" , t = /\n(?!$)/g , n = function ( e ) { var n = r ( e ) , s = n [ "white-space" ] ; if ( "pre-wrap" === s || "pre-line" === s ) { var l = e . querySelector ( "code" ) , i = e . querySelector ( ".line-numbers-rows" ) , a = e . querySelector ( ".line-numbers-sizer" ) , o = l . textContent . split ( t ) ; a || ( a = document . createElement ( "span" ) , a . className = "line-numbers-sizer" , l . appendChild ( a ) ) , a . style . display = "block" , o . forEach ( function ( e , t ) { a . textContent = e || "\n" ; var n = a . getBoundingClientRect ( ) . height ; i . children [ t ] . style . height = n + "px" } ) , a . textContent = "" , a . style . display = "none" } } , r = function ( e ) { return e ? window . getComputedStyle ? getComputedStyle ( e ) : e . currentStyle || null : null } ; window . addEventListener ( "resize" , function ( ) { Array . prototype . forEach . call ( document . querySelectorAll ( "pre." + e ) , n ) } ) , Prism . hooks . add ( "complete" , function ( e ) { if ( e . code ) { var r = e . element . parentNode , s = /\s*\bline-numbers\b\s*/ ; if ( r && /pre/i . test ( r . nodeName ) && ( s . test ( r . className ) || s . test ( e . element . className ) ) && ! e . element . querySelector ( ".line-numbers-rows" ) ) { s . test ( e . element . className ) && ( e . element . className = e . element . className . replace ( s , " " ) ) , s . test ( r . className ) || ( r . className += " line-numbers" ) ; var l , i = e . code . match ( t ) , a = i ? i . length + 1 : 1 , o = new Array ( a + 1 ) ; o = o . join ( "<span></span>" ) , l = document . createElement ( "span" ) , l . setAttribute ( "aria-hidden" , "true" ) , l . className = "line-numbers-rows" , l . innerHTML = o , r . hasAttribute ( "data-start" ) && ( r . style . counterReset = "linenumber " + ( parseInt ( r . getAttribute ( "data-start" ) , 10 ) - 1 ) ) , e . element . appendChild ( l ) , n ( r ) , Prism . hooks . run ( "line-numbers" , e ) } } } ) , Prism . hooks . add ( "line-numbers" , function ( e ) { e . plugins = e . plugins || { } , e . plugins . lineNumbers = ! 0 } ) , Prism . plugins . lineNumbers = { getLine : function ( t , n ) { if ( "PRE" === t . tagName && t . classList . contains ( e ) ) { var r = t . querySelector ( ".line-numbers-rows" ) , s = parseInt ( t . getAttribute ( "data-start" ) , 10 ) || 1 , l = s + ( r . children . length - 1 ) ; s > n && ( n = s ) , n > l && ( n = l ) ; var i = n - s ; return r . children [ i ] } } } } } ( ) ;
! function ( ) { if ( ( "undefined" == typeof self || self . Prism ) && ( "undefined" == typeof global || global . Prism ) ) { var i = /\b([a-z]{3,7}:\/\/|tel:)[\w\-+%~\/.:=&]+(?:\?[\w\-+%~\/.:#=?&!$'()*,;]*)?(?:#[\w\-+%~\/.:#=?&!$'()*,;]*)?/ , n = /\b\S+@[\w.]+[a-z]{2}/ , e = /\[([^\]]+)]\(([^)]+)\)/ , t = [ "comment" , "url" , "attr-value" , "string" ] ; Prism . plugins . autolinker = { processGrammar : function ( r ) { r && ! r [ "url-link" ] && ( Prism . languages . DFS ( r , function ( r , a , l ) { t . indexOf ( l ) > - 1 && "Array" !== Prism . util . type ( a ) && ( a . pattern || ( a = this [ r ] = { pattern : a } ) , a . inside = a . inside || { } , "comment" == l && ( a . inside [ "md-link" ] = e ) , "attr-value" == l ? Prism . languages . insertBefore ( "inside" , "punctuation" , { "url-link" : i } , a ) : a . inside [ "url-link" ] = i , a . inside [ "email-link" ] = n ) } ) , r [ "url-link" ] = i , r [ "email-link" ] = n ) } } , Prism . hooks . add ( "before-highlight" , function ( i ) { Prism . plugins . autolinker . processGrammar ( i . grammar ) } ) , Prism . hooks . add ( "wrap" , function ( i ) { if ( /-link$/ . test ( i . type ) ) { i . tag = "a" ; var n = i . content ; if ( "email-link" == i . type && 0 != n . indexOf ( "mailto:" ) ) n = "mailto:" + n ; else if ( "md-link" == i . type ) { var t = i . content . match ( e ) ; n = t [ 2 ] , i . content = t [ 1 ] } i . attributes . href = n } try { i . content = decodeURIComponent ( i . content ) } catch ( r ) { } } ) } } ( ) ;