2018-07-20 19:14:22 +02:00
/ * P r i s m J S 1 . 1 5 . 0
2019-01-06 11:44:38 +01:00
https : //prismjs.com/download.html#themes=prism-tomorrow&languages=markup+css+clike+javascript+actionscript+apacheconf+applescript+c+csharp+bash+cpp+coffeescript+ruby+csp+css-extras+diff+django+docker+elixir+elm+markup-templating+erlang+fsharp+flow+git+go+graphql+less+handlebars+haskell+http+java+json+kotlin+latex+markdown+makefile+objectivec+ocaml+perl+php+php-extras+sql+processing+scss+python+r+jsx+typescript+reason+textile+rust+sass+stylus+scheme+pug+swift+yaml+haml+toml+twig+tsx+vim+visual-basic+wasm&plugins=line-numbers+toolbar+jsonp-highlight+command-line+copy-to-clipboard */
2018-12-29 17:05:46 +01: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 a ? new a ( 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 ) . slice ( 8 , - 1 ) } , objId : function ( e ) { return e . _ _id || Object . defineProperty ( e , "__id" , { value : ++ t } ) , e . _ _id } , clone : function ( e , t ) { var a = n . util . type ( e ) ; switch ( t = t || { } , a ) { case "Object" : if ( t [ n . util . objId ( e ) ] ) return t [ n . util . objId ( e ) ] ; var r = { } ; t [ n . util . objId ( e ) ] = r ; for ( var l in e ) e . hasOwnProperty ( l ) && ( r [ l ] = n . util . clone ( e [ l ] , t ) ) ; return r ; case "Array" : if ( t [ n . util . objId ( e ) ] ) return t [ n . util . objId ( e ) ] ; var r = [ ] ; return t [ n . util . objId ( e ) ] = r , e . forEach ( function ( e , a ) { r [ a ] = n . util . clone ( e , t ) } ) , r } return e } } , languages : { extend : function ( e , t ) { var a = n . util . clone ( n . languages [ e ] ) ; for ( var r in t ) a [ r ] = t [ r ] ; return a } , insertBefore : function ( e , t , a , r ) { r = r || n . languages ; var l = r [ e ] , i = { } ; for ( var o in l ) if ( l . hasOwnProperty ( o ) ) { if ( o == t ) for ( var s in a ) a . hasOwnProperty ( s ) && ( i [ s ] = a [ s ] ) ; a . hasOwnProperty ( o ) || ( i [ o ] = l [ o ] ) } var u = r [ e ] ; return r [ e ] = i , n . languages . DFS ( n . languages , function ( t , n ) { n === u && t != e && ( this [ t ] = i ) } ) , i } , DFS : function ( e , t , a , r ) { r = r || { } ; for ( var l in e ) e . hasOwnProperty ( l ) && ( t . call ( e , l , e [ l ] , a || l ) , "Object" !== n . util . type ( e [ l ] ) || r [ n . util . objId ( e [ l ] ) ] ? "Array" !== n . util . type ( e [ l ] ) || r [ n . util . objId ( e [ l ] ) ] || ( r [ n . util . objId ( e [ l ] ) ] = ! 0 , n . languages . DFS ( e [ l ] , t , l , r ) ) : ( r [ n . util . objId ( e [ l ] ) ] = ! 0 , n . languages . DFS ( e [ l ] , t , null , r ) ) ) } } , plugins : { } , highlightAll : function ( e , t ) { n . highlightAllUnder ( document , e , t ) } , highlightAllUnder : function ( e , t , a ) { var r = { callback : a , selector : 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code' } ; n . hooks . run ( "before-highlightall" , r ) ; for ( var l , i = r . elements || e . querySelectorAll ( r . selector ) , o = 0 ; l = i [ o ++ ] ; ) n . highlightElement ( l , t === ! 0 , r . callback ) } , highlightElement : function ( t , a , r ) { 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 ) , a && _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 , n . hooks . run ( "after-highlight" , u ) , n . hooks . run ( "complete" , u ) , r && r . call ( u . element ) } , 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 , n . hooks . run ( "after-highlight" , u ) , n . hooks . run ( "complete" , u ) , r && r . call ( t ) } , highlight : function ( e , t , r ) { var l = { code : e , grammar : t , language : r } ; return n . hooks . run ( "before-tokenize" , l ) , l . tokens = n . tokenize ( l . code , l . grammar ) , n . hooks . run ( "after-tokenize" , l ) , a . stringify ( n . util . encode ( l . tokens ) , l . language ) } , matchGrammar : function ( e , t , a , r , l , i , o ) { var s = n . Token ; for ( var u in a ) if ( a . hasOwnProperty ( u ) && a [ u ] ) { if ( u == o ) return ; var g = a [ 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 = r , k = l ; b < t . length ; k += t [ b ] . length , ++ b ) { var w = t [ b ] ; if ( t . length > e . length ) return ; if ( ! ( w instanceof s ) ) { if ( m && b != t . length - 1 ) { h . lastIndex = k ; var _
2018-07-20 19:14:22 +02:00
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 ;
2018-12-29 17:05:46 +01:00
Prism . languages . css = { comment : /\/\*[\s\S]*?\*\// , atrule : { pattern : /@[\w-]+?[\s\S]*?(?:;|(?=\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 : /!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" : /\w+(?=\()/ , number : /\b0x[\da-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i , operator : /--?|\+\+?|!=?=?|<=?|>=?|==?=?|&&?|\|\|?|\?|\*|\/|~|\^|%/ , punctuation : /[{}[\];(),.:]/ } ;
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*(?:async\s*)?(?:\bfunction\b|(?:\([^()]*\)|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i , alias : "function" } , parameter : [ { pattern : /(function(?:\s+[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)?\s*\(\s*)[^\s()][^()]*?(?=\s*\))/ , lookbehind : ! 0 , inside : Prism . languages . javascript } , { pattern : /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=>)/ , inside : Prism . languages . javascript } , { pattern : /(\(\s*)[^\s()][^()]*?(?=\s*\)\s*=>)/ , lookbehind : ! 0 , inside : Prism . languages . javascript } , { pattern : /((?:\b|\s|^)(?!(?: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)(?![$\w\xA0-\uFFFF]))(?:[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*\s*)\(\s*)[^\s()][^()]*?(?=\s*\)\s*\{)/ , lookbehind : ! 0 , inside : Prism . languages . javascript } ] , 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 } } } ) ;
2018-09-07 23:05:49 +02: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
Prism . languages . applescript = { comment : [ /\(\*(?:\(\*[\s\S]*?\*\)|[\s\S])*?\*\)/ , /--.+/ , /#.+/ ] , string : /"(?:\\.|[^"\\\r\n])*"/ , number : /(?:\b\d+\.?\d*|\B\.\d+)(?:e-?\d+)?\b/i , operator : [ /[&=≠≤≥*+\-\/÷^]|[<>]=?/ , /\b(?:(?:start|begin|end)s? with|(?:(?:does not|doesn't) contain|contains?)|(?:is|isn't|is not) (?:in|contained by)|(?:(?:is|isn't|is not) )?(?:greater|less) than(?: or equal)?(?: to)?|(?:(?:does not|doesn't) come|comes) (?:before|after)|(?:is|isn't|is not) equal(?: to)?|(?:(?:does not|doesn't) equal|equals|equal to|isn't|is not)|(?:a )?(?:ref(?: to)?|reference to)|(?:and|or|div|mod|as|not))\b/ ] , keyword : /\b(?:about|above|after|against|apart from|around|aside from|at|back|before|beginning|behind|below|beneath|beside|between|but|by|considering|continue|copy|does|eighth|else|end|equal|error|every|exit|false|fifth|first|for|fourth|from|front|get|given|global|if|ignoring|in|instead of|into|is|it|its|last|local|me|middle|my|ninth|of|on|onto|out of|over|prop|property|put|repeat|return|returning|second|set|seventh|since|sixth|some|tell|tenth|that|the|then|third|through|thru|timeout|times|to|transaction|true|try|until|where|while|whose|with|without)\b/ , "class" : { pattern : /\b(?:alias|application|boolean|class|constant|date|file|integer|list|number|POSIX file|real|record|reference|RGB color|script|text|centimetres|centimeters|feet|inches|kilometres|kilometers|metres|meters|miles|yards|square feet|square kilometres|square kilometers|square metres|square meters|square miles|square yards|cubic centimetres|cubic centimeters|cubic feet|cubic inches|cubic metres|cubic meters|cubic yards|gallons|litres|liters|quarts|grams|kilograms|ounces|pounds|degrees Celsius|degrees Fahrenheit|degrees Kelvin)\b/ , alias : "builtin" } , punctuation : /[{}():,¬«»《》]/ } ;
2018-08-30 23:28:52 +02:00
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" ] ;
2018-12-29 17:05:46 +01:00
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 , operator : />>=?|<<=?|[-=]>|([-+&|?])\1|~|[-+*\/%&|^!=<>]=?/ , punctuation : /\?\.?|::|[{}[\];(),.:]/ } ) , 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|apt-cache|apt-get|aptitude|aspell|automysqlbackup|awk|basename|bash|bc|bconsole|bg|builtin|bzip2|cal|cat|cd|cfdisk|chgrp|chkconfig|chmod|chown|chroot|cksum|clear|cmp|comm|command|cp|cron|crontab|csplit|curl|cut|date|dc|dd|ddrescue|debootstrap|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|gparted|grep|groupadd|groupdel|groupmod|groups|grub-mkconfig|gzip|halt|hash|head|help|hg|history|host|hostname|htop|iconv|id|ifconfig|ifdown|ifup|import|install|ip|jobs|join|kill|killall|less|link|ln|locate|logname|logout|logrotate|look|lpc|lpr|lprint|lprintd|lprintq|lprm|ls|lsof|lynx|make|man|mc|mdadm|mkconfig|mkdir|mke2fs|mkfifo|mkfs|mkisofs|mknod|mkswap|mmv|more|most|mount|mtools|mtr|mutt|mv|nano|nc|netstat|nice|nl|nohup|notify-send|npm|nslookup|op|open|parted|passwd|paste|pathchk|ping|pkill|popd|pr|printcap|printenv|printf|ps|pushd|pv|pwd|quota|quotacheck|quotactl|ram|rar|rcp|read|readarray|readonly|reboot|remsync|rename|renice|rev|rm|rmdir|rpm|rsync|scp|screen|sdiff|sed|sendmail|seq|service|sftp|shift|shopt|shutdown|sleep|slocate|sort|source|split|ssh|stat|strace|su|sudo|sum|suspend|swapon|sync|tail|tar|tee|test|time|timeout|times|top|touch|tr|traceroute|trap|tsort|tty|type|ulimit|umask|umount|unalias|uname|unexpand|uniq|units|unrar|unshar|unzip|update-grub|uptime|useradd|userdel|usermod|users|uudecode|uuencode|vdir|vi|vim|virsh|vmstat|wait|watch|wc|wget|whereis|which|who|whoami|write|xargs|xdg-open|yes|zip|zypper)(?=$|[\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 ) ;
2018-08-30 23:28:52 +02:00
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 } } ) ;
2018-12-29 17:05:46 +01:00
! function ( e ) { var t = /#(?!\{).+/ , n = { pattern : /#\{[^}]+\}/ , alias : "variable" } ; e . languages . coffeescript = e . languages . extend ( "javascript" , { comment : t , string : [ { pattern : /'(?:\\[\s\S]|[^\\'])*'/ , greedy : ! 0 } , { pattern : /"(?:\\[\s\S]|[^\\"])*"/ , greedy : ! 0 , inside : { interpolation : n } } ] , 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" } } ) , e . languages . insertBefore ( "coffeescript" , "comment" , { "multiline-comment" : { pattern : /###[\s\S]+?###/ , alias : "comment" } , "block-regex" : { pattern : /\/{3}[\s\S]*?\/{3}/ , alias : "regex" , inside : { comment : t , interpolation : n } } } ) , e . languages . insertBefore ( "coffeescript" , "string" , { "inline-javascript" : { pattern : /`(?:\\[\s\S]|[^\\`])*`/ , inside : { delimiter : { pattern : /^`|`$/ , alias : "punctuation" } , rest : e . languages . javascript } } , "multiline-string" : [ { pattern : /'''[\s\S]*?'''/ , greedy : ! 0 , alias : "string" } , { pattern : /"""[\s\S]*?"""/ , greedy : ! 0 , alias : "string" , inside : { interpolation : n } } ] } ) , e . languages . insertBefore ( "coffeescript" , "keyword" , { property : /(?!\d)\w+(?=\s*:(?!:))/ } ) , delete e . languages . coffeescript [ "template-string" ] , e . languages . coffee = e . languages . coffeescript } ( Prism ) ;
! function ( e ) { e . languages . ruby = e . languages . extend ( "clike" , { comment : [ /#.*/ , { pattern : /^=begin(?:\r?\n|\r)(?:.*(?:\r?\n|\r))*?=end/m , greedy : ! 0 } ] , keyword : /\b(?:alias|and|BEGIN|begin|break|case|class|def|define_method|defined|do|each|else|elsif|END|end|ensure|false|for|if|in|module|new|next|nil|not|or|protected|private|public|raise|redo|require|rescue|retry|return|self|super|then|throw|true|undef|unless|until|when|while|yield)\b/ } ) ; var n = { pattern : /#\{[^}]+\}/ , inside : { delimiter : { pattern : /^#\{|\}$/ , alias : "tag" } , rest : e . languages . ruby } } ; delete e . languages . ruby . function , e . languages . insertBefore ( "ruby" , "keyword" , { regex : [ { pattern : /%r([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1[gim]{0,3}/ , greedy : ! 0 , inside : { interpolation : n } } , { pattern : /%r\((?:[^()\\]|\\[\s\S])*\)[gim]{0,3}/ , greedy : ! 0 , inside : { interpolation : n } } , { pattern : /%r\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}[gim]{0,3}/ , greedy : ! 0 , inside : { interpolation : n } } , { pattern : /%r\[(?:[^\[\]\\]|\\[\s\S])*\][gim]{0,3}/ , greedy : ! 0 , inside : { interpolation : n } } , { pattern : /%r<(?:[^<>\\]|\\[\s\S])*>[gim]{0,3}/ , greedy : ! 0 , inside : { interpolation : n } } , { pattern : /(^|[^\/])\/(?!\/)(\[.+?]|\\.|[^\/\\\r\n])+\/[gim]{0,3}(?=\s*($|[\r\n,.;})]))/ , lookbehind : ! 0 , greedy : ! 0 } ] , variable : /[@$]+[a-zA-Z_]\w*(?:[?!]|\b)/ , symbol : { pattern : /(^|[^:]):[a-zA-Z_]\w*(?:[?!]|\b)/ , lookbehind : ! 0 } , "method-definition" : { pattern : /(\bdef\s+)[\w.]+/ , lookbehind : ! 0 , inside : { "function" : /\w+$/ , rest : e . languages . ruby } } } ) , e . languages . insertBefore ( "ruby" , "number" , { builtin : /\b(?:Array|Bignum|Binding|Class|Continuation|Dir|Exception|FalseClass|File|Stat|Fixnum|Float|Hash|Integer|IO|MatchData|Method|Module|NilClass|Numeric|Object|Proc|Range|Regexp|String|Struct|TMS|Symbol|ThreadGroup|Thread|Time|TrueClass)\b/ , constant : /\b[A-Z]\w*(?:[?!]|\b)/ } ) , e . languages . ruby . string = [ { pattern : /%[qQiIwWxs]?([^a-zA-Z0-9\s{(\[<])(?:(?!\1)[^\\]|\\[\s\S])*\1/ , greedy : ! 0 , inside : { interpolation : n } } , { pattern : /%[qQiIwWxs]?\((?:[^()\\]|\\[\s\S])*\)/ , greedy : ! 0 , inside : { interpolation : n } } , { pattern : /%[qQiIwWxs]?\{(?:[^#{}\\]|#(?:\{[^}]+\})?|\\[\s\S])*\}/ , greedy : ! 0 , inside : { interpolation : n } } , { pattern : /%[qQiIwWxs]?\[(?:[^\[\]\\]|\\[\s\S])*\]/ , greedy : ! 0 , inside : { interpolation : n } } , { pattern : /%[qQiIwWxs]?<(?:[^<>\\]|\\[\s\S])*>/ , greedy : ! 0 , inside : { interpolation : n } } , { pattern : /("|')(?:#\{[^}]+\}|\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/ , greedy : ! 0 , inside : { interpolation : n } } ] , e . languages . rb = e . languages . ruby } ( Prism ) ;
2018-09-07 23:05:49 +02:00
Prism . languages . csp = { directive : { pattern : /\b(?:(?:base-uri|form-action|frame-ancestors|plugin-types|referrer|reflected-xss|report-to|report-uri|require-sri-for|sandbox) |(?:block-all-mixed-content|disown-opener|upgrade-insecure-requests)(?: |;)|(?:child|connect|default|font|frame|img|manifest|media|object|script|style|worker)-src )/i , alias : "keyword" } , safe : { pattern : /'(?:self|none|strict-dynamic|(?:nonce-|sha(?:256|384|512)-)[a-zA-Z\d+=\/]+)'/ , alias : "selector" } , unsafe : { pattern : /(?:'unsafe-inline'|'unsafe-eval'|'unsafe-hashed-attributes'|\*)/ , alias : "function" } } ;
2018-12-29 17:05:46 +01:00
Prism . languages . css . selector = { pattern : Prism . languages . css . selector , inside : { "pseudo-element" : /:(?:after|before|first-letter|first-line|selection)|::[-\w]+/ , "pseudo-class" : /:[-\w]+(?:\(.*\))?/ , "class" : /\.[-:.\w]+/ , id : /#[-:.\w]+/ , attribute : /\[[^\]]+\]/ } } , Prism . languages . insertBefore ( "css" , "property" , { variable : { pattern : /(^|[^-\w\xA0-\uFFFF])--[-_a-z\xA0-\uFFFF][-\w\xA0-\uFFFF]*/i , lookbehind : ! 0 } } ) , Prism . languages . insertBefore ( "css" , "function" , { operator : { pattern : /(\s)[+\-*\/](?=\s)/ , lookbehind : ! 0 } , hexcode : /#[\da-f]{3,8}/i , entity : /\\[\da-f]{1,8}/i , unit : { pattern : /(\d)(?:%|[a-z]+)/ , lookbehind : ! 0 } , number : /-?[\d.]+/ } ) ;
2018-08-30 23:28:52 +02:00
Prism . languages . diff = { coord : [ /^(?:\*{3}|-{3}|\+{3}).*$/m , /^@@.*@@$/m , /^\d+.*$/m ] , deleted : /^[-<].*$/m , inserted : /^[+>].*$/m , diff : { pattern : /^!(?!!).+$/m , alias : "important" } } ;
2018-09-07 23:05:49 +02:00
var _django _template = { property : { pattern : /(?:{{|{%)[\s\S]*?(?:%}|}})/g , greedy : ! 0 , inside : { string : { pattern : /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/ , greedy : ! 0 } , keyword : /\b(?:\||load|verbatim|widthratio|ssi|firstof|for|url|ifchanged|csrf_token|lorem|ifnotequal|autoescape|now|templatetag|debug|cycle|ifequal|regroup|comment|filter|endfilter|if|spaceless|with|extends|block|include|else|empty|endif|endfor|as|endblock|endautoescape|endverbatim|trans|endtrans|[Tt]rue|[Ff]alse|[Nn]one|in|is|static|macro|endmacro|call|endcall|set|endset|raw|endraw)\b/ , operator : /[-+=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]|\b(?:or|and|not)\b/ , "function" : /\b(?:_|abs|add|addslashes|attr|batch|callable|capfirst|capitalize|center|count|cut|d|date|default|default_if_none|defined|dictsort|dictsortreversed|divisibleby|e|equalto|escape|escaped|escapejs|even|filesizeformat|first|float|floatformat|force_escape|forceescape|format|get_digit|groupby|indent|int|iriencode|iterable|join|last|length|length_is|linebreaks|linebreaksbr|linenumbers|list|ljust|lower|make_list|map|mapping|number|odd|phone2numeric|pluralize|pprint|random|reject|rejectattr|removetags|replace|reverse|rjust|round|safe|safeseq|sameas|select|selectattr|sequence|slice|slugify|sort|string|stringformat|striptags|sum|time|timesince|timeuntil|title|trim|truncate|truncatechars|truncatechars_html|truncatewords|truncatewords_html|undefined|unordered_list|upper|urlencode|urlize|urlizetrunc|wordcount|wordwrap|xmlattr|yesno)\b/ , important : /\b-?\d+(?:\.\d+)?\b/ , variable : /\b\w+?\b/ , punctuation : /[[\];(),.:]/ } } } ; Prism . languages . django = Prism . languages . extend ( "markup" , { comment : /(?:<!--|{#)[\s\S]*?(?:#}|-->)/ } ) , Prism . languages . django . tag . pattern = /<\/?(?!\d)[^\s>\/=$<]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^>=]+))?)*\s*\/?>/i , Prism . languages . insertBefore ( "django" , "entity" , _django _template ) , Prism . languages . insertBefore ( "inside" , "tag" , _django _template , Prism . languages . django . tag ) , Prism . languages . javascript && ( Prism . languages . insertBefore ( "inside" , "string" , _django _template , Prism . languages . django . script ) , Prism . languages . django . script . inside . string . inside = _django _template ) , Prism . languages . css && ( Prism . languages . insertBefore ( "inside" , "atrule" , { tag : _django _template . property } , Prism . languages . django . style ) , Prism . languages . django . style . inside . string . inside = _django _template ) , Prism . languages . jinja2 = Prism . languages . django ;
2018-08-30 23:28:52 +02:00
Prism . languages . docker = { keyword : { pattern : /(^\s*)(?:ADD|ARG|CMD|COPY|ENTRYPOINT|ENV|EXPOSE|FROM|HEALTHCHECK|LABEL|MAINTAINER|ONBUILD|RUN|SHELL|STOPSIGNAL|USER|VOLUME|WORKDIR)(?=\s)/im , lookbehind : ! 0 } , string : /("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/ , comment : /#.*/ , punctuation : /---|\.\.\.|[:[\]{}\-,|>?]/ } , Prism . languages . dockerfile = Prism . languages . docker ;
Prism . languages . elixir = { comment : { pattern : /#.*/m , lookbehind : ! 0 } , regex : { pattern : /~[rR](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[uismxfr]*/ , greedy : ! 0 } , string : [ { pattern : /~[cCsSwW](?:("""|''')(?:\\[\s\S]|(?!\1)[^\\])+\1|([\/|"'])(?:\\.|(?!\2)[^\\\r\n])+\2|\((?:\\.|[^\\)\r\n])+\)|\[(?:\\.|[^\\\]\r\n])+\]|\{(?:\\.|#\{[^}]+\}|[^\\}\r\n])+\}|<(?:\\.|[^\\>\r\n])+>)[csa]?/ , greedy : ! 0 , inside : { } } , { pattern : /("""|''')[\s\S]*?\1/ , greedy : ! 0 , inside : { } } , { pattern : /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/ , greedy : ! 0 , inside : { } } ] , atom : { pattern : /(^|[^:]):\w+/ , lookbehind : ! 0 , alias : "symbol" } , "attr-name" : /\w+:(?!:)/ , capture : { pattern : /(^|[^&])&(?:[^&\s\d()][^\s()]*|(?=\())/ , lookbehind : ! 0 , alias : "function" } , argument : { pattern : /(^|[^&])&\d+/ , lookbehind : ! 0 , alias : "variable" } , attribute : { pattern : /@\w+/ , alias : "variable" } , number : /\b(?:0[box][a-f\d_]+|\d[\d_]*)(?:\.[\d_]+)?(?:e[+-]?[\d_]+)?\b/i , keyword : /\b(?:after|alias|and|case|catch|cond|def(?:callback|exception|impl|module|p|protocol|struct)?|do|else|end|fn|for|if|import|not|or|require|rescue|try|unless|use|when)\b/ , "boolean" : /\b(?:true|false|nil)\b/ , operator : [ /\bin\b|&&?|\|[|>]?|\\\\|::|\.\.\.?|\+\+?|-[->]?|<[-=>]|>=|!==?|\B!|=(?:==?|[>~])?|[*\/^]/ , { pattern : /([^<])<(?!<)/ , lookbehind : ! 0 } , { pattern : /([^>])>(?!>)/ , lookbehind : ! 0 } ] , punctuation : /<<|>>|[.,%\[\]{}()]/ } , Prism . languages . elixir . string . forEach ( function ( e ) { e . inside = { interpolation : { pattern : /#\{[^}]+\}/ , inside : { delimiter : { pattern : /^#\{|\}$/ , alias : "punctuation" } , rest : Prism . languages . elixir } } } } ) ;
Prism . languages . elm = { comment : /--.*|{-[\s\S]*?-}/ , "char" : { pattern : /'(?:[^\\'\r\n]|\\(?:[abfnrtv\\']|\d+|x[0-9a-fA-F]+))'/ , greedy : ! 0 } , string : [ { pattern : /"""[\s\S]*?"""/ , greedy : ! 0 } , { pattern : /"(?:[^\\"\r\n]|\\(?:[abfnrtv\\"]|\d+|x[0-9a-fA-F]+))*"/ , greedy : ! 0 } ] , import _statement : { pattern : /^\s*import\s+[A-Z]\w*(?:\.[A-Z]\w*)*(?:\s+as\s+([A-Z]\w*)(?:\.[A-Z]\w*)*)?(?:\s+exposing\s+)?/m , inside : { keyword : /\b(?:import|as|exposing)\b/ } } , keyword : /\b(?:alias|as|case|else|exposing|if|in|infixl|infixr|let|module|of|then|type)\b/ , builtin : /\b(?:abs|acos|always|asin|atan|atan2|ceiling|clamp|compare|cos|curry|degrees|e|flip|floor|fromPolar|identity|isInfinite|isNaN|logBase|max|min|negate|never|not|pi|radians|rem|round|sin|sqrt|tan|toFloat|toPolar|toString|truncate|turns|uncurry|xor)\b/ , number : /\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0x[0-9a-f]+)\b/i , operator : /\s\.\s|[+\-\/*=.$<>:&|^?%#@~!]{2,}|[+\-\/*=$<>:&|^?%#@~!]/ , hvariable : /\b(?:[A-Z]\w*\.)*[a-z]\w*\b/ , constant : /\b(?:[A-Z]\w*\.)*[A-Z]\w*\b/ , punctuation : /[{}[\]|(),.:]/ } ;
2018-07-20 19:14:22 +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-08-30 23:28:52 +02:00
Prism . languages . erlang = { comment : /%.+/ , string : { pattern : /"(?:\\.|[^\\"\r\n])*"/ , greedy : ! 0 } , "quoted-function" : { pattern : /'(?:\\.|[^\\'\r\n])+'(?=\()/ , alias : "function" } , "quoted-atom" : { pattern : /'(?:\\.|[^\\'\r\n])+'/ , alias : "atom" } , "boolean" : /\b(?:true|false)\b/ , keyword : /\b(?:fun|when|case|of|end|if|receive|after|try|catch)\b/ , number : [ /\$\\?./ , /\d+#[a-z0-9]+/i , /(?:\b\d+\.?\d*|\B\.\d+)(?:e[+-]?\d+)?/i ] , "function" : /\b[a-z][\w@]*(?=\()/ , variable : { pattern : /(^|[^@])(?:\b|\?)[A-Z_][\w@]*/ , lookbehind : ! 0 } , operator : [ /[=\/<>:]=|=[:\/]=|\+\+?|--?|[=*\/!]|\b(?:bnot|div|rem|band|bor|bxor|bsl|bsr|not|and|or|xor|orelse|andalso)\b/ , { pattern : /(^|[^<])<(?!<)/ , lookbehind : ! 0 } , { pattern : /(^|[^>])>(?!>)/ , lookbehind : ! 0 } ] , atom : /\b[a-z][\w@]*/ , punctuation : /[()[\]{}:;,.#|]|<<|>>/ } ;
2018-12-29 17:05:46 +01:00
Prism . languages . fsharp = Prism . languages . extend ( "clike" , { comment : [ { pattern : /(^|[^\\])\(\*[\s\S]*?\*\)/ , lookbehind : ! 0 } , { pattern : /(^|[^\\:])\/\/.*/ , lookbehind : ! 0 } ] , string : { pattern : /(?:"""[\s\S]*?"""|@"(?:""|[^"])*"|"(?:\\[\s\S]|[^\\"])*")B?|'(?:[^\\']|\\.)'B?/ , greedy : ! 0 } , "class-name" : { pattern : /(\b(?:exception|inherit|interface|new|of|type)\s+|\w\s*:\s*|\s:\??>\s*)[.\w]+\b(?:\s*(?:->|\*)\s*[.\w]+\b)*(?!\s*[:.])/ , lookbehind : ! 0 , inside : { operator : /->|\*/ , punctuation : /\./ } } , keyword : /\b(?:let|return|use|yield)(?:!\B|\b)|\b(abstract|and|as|assert|base|begin|class|default|delegate|do|done|downcast|downto|elif|else|end|exception|extern|false|finally|for|fun|function|global|if|in|inherit|inline|interface|internal|lazy|match|member|module|mutable|namespace|new|not|null|of|open|or|override|private|public|rec|select|static|struct|then|to|true|try|type|upcast|val|void|when|while|with|asr|land|lor|lsl|lsr|lxor|mod|sig|atomic|break|checked|component|const|constraint|constructor|continue|eager|event|external|fixed|functor|include|method|mixin|object|parallel|process|protected|pure|sealed|tailcall|trait|virtual|volatile)\b/ , number : [ /\b0x[\da-fA-F]+(?:un|lf|LF)?\b/ , /\b0b[01]+(?:y|uy)?\b/ , /(?:\b\d+\.?\d*|\B\.\d+)(?:[fm]|e[+-]?\d+)?\b/i , /\b\d+(?:[IlLsy]|u[lsy]?|UL)?\b/ ] , operator : /([<>~&^])\1\1|([*.:<>&])\2|<-|->|[!=:]=|<?\|{1,3}>?|\??(?:<=|>=|<>|[-+*\/%=<>])\??|[!?^&]|~[+~-]|:>|:\?>?/ } ) , Prism . languages . insertBefore ( "fsharp" , "keyword" , { preprocessor : { pattern : /^[^\r\n\S]*#.*/m , alias : "property" , inside : { directive : { pattern : /(\s*#)\b(?:else|endif|if|light|line|nowarn)\b/ , lookbehind : ! 0 , alias : "keyword" } } } } ) , Prism . languages . insertBefore ( "fsharp" , "punctuation" , { "computation-expression" : { pattern : /[_a-z]\w*(?=\s*\{)/i , alias : "keyword" } } ) , Prism . languages . insertBefore ( "fsharp" , "string" , { annotation : { pattern : /\[<.+?>\]/ , inside : { punctuation : /^\[<|>\]$/ , "class-name" : { pattern : /^\w+$|(^|;\s*)[A-Z]\w*(?=\()/ , lookbehind : ! 0 } , "annotation-content" : { pattern : /[\s\S]*/ , inside : Prism . languages . fsharp } } } } ) ;
! function ( e ) { e . languages . flow = e . languages . extend ( "javascript" , { } ) , e . languages . insertBefore ( "flow" , "keyword" , { type : [ { pattern : /\b(?:[Nn]umber|[Ss]tring|[Bb]oolean|Function|any|mixed|null|void)\b/ , alias : "tag" } ] } ) , e . languages . flow [ "function-variable" ] . pattern = /[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*(?=\s*=\s*(?:function\b|(?:\([^()]*\)(?:\s*:\s*\w+)?|[_$a-z\xA0-\uFFFF][$\w\xA0-\uFFFF]*)\s*=>))/i , delete e . languages . flow . parameter , e . languages . insertBefore ( "flow" , "operator" , { "flow-punctuation" : { pattern : /\{\||\|\}/ , alias : "punctuation" } } ) , "Array" !== e . util . type ( e . languages . flow . keyword ) && ( e . languages . flow . keyword = [ e . languages . flow . keyword ] ) , e . languages . flow . keyword . unshift ( { pattern : /(^|[^$]\b)(?:type|opaque|declare|Class)\b(?!\$)/ , lookbehind : ! 0 } , { pattern : /(^|[^$]\B)\$(?:await|Diff|Exact|Keys|ObjMap|PropertyType|Shape|Record|Supertype|Subtype|Enum)\b(?!\$)/ , lookbehind : ! 0 } ) } ( Prism ) ;
2018-08-30 23:28:52 +02:00
Prism . languages . git = { comment : /^#.*/m , deleted : /^[-– ].*/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 } ;
2018-07-20 19:14:22 +02: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 : /[*\/%^!=]=?|\+[=+]?|-[=-]?|\|[=|]?|&(?:=|&|\^=?)?|>(?:>=?|=)?|<(?:<=?|=|-)?|:=|\.\.\./ , 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" ] ;
2018-08-30 23:28:52 +02:00
Prism . languages . graphql = { comment : /#.*/ , string : { pattern : /"(?:\\.|[^\\"\r\n])*"/ , greedy : ! 0 } , number : /(?:\B-|\b)\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i , "boolean" : /\b(?:true|false)\b/ , variable : /\$[a-z_]\w*/i , directive : { pattern : /@[a-z_]\w*/i , alias : "function" } , "attr-name" : /[a-z_]\w*(?=\s*:)/i , keyword : [ { pattern : /(fragment\s+(?!on)[a-z_]\w*\s+|\.{3}\s*)on\b/ , lookbehind : ! 0 } , /\b(?:query|fragment|mutation)\b/ ] , operator : /!|=|\.{3}/ , punctuation : /[!(){}\[\]:=,]/ } ;
2018-12-29 17:05:46 +01:00
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 , operator : /[+\-*\/]/ } ) , Prism . languages . insertBefore ( "less" , "property" , { variable : [ { pattern : /@[\w-]+\s*:/ , inside : { punctuation : /:/ } } , /@@?[\w-]+/ ] , "mixin-usage" : { pattern : /([{;]\s*)[.#](?!\d)[\w-]+.*?(?=[(;])/ , lookbehind : ! 0 , alias : "function" } } ) ;
2018-07-20 19:14:22 +02:00
! function ( a ) { a . languages . handlebars = { comment : /\{\{![\s\S]*?\}\}/ , delimiter : { pattern : /^\{\{\{?|\}\}\}?$/i , alias : "punctuation" } , string : /(["'])(?:\\.|(?!\1)[^\\\r\n])*\1/ , number : /\b0x[\dA-Fa-f]+\b|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][+-]?\d+)?/ , "boolean" : /\b(?:true|false)\b/ , block : { pattern : /^(\s*~?\s*)[#\/]\S+?(?=\s*~?\s*$|\s)/i , lookbehind : ! 0 , alias : "keyword" } , brackets : { pattern : /\[[^\]]+\]/ , inside : { punctuation : /\[|\]/ , variable : /[\s\S]+/ } } , punctuation : /[!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~]/ , variable : /[^!"#%&'()*+,.\/;<=>@\[\\\]^`{|}~\s]+/ } , a . hooks . add ( "before-tokenize" , function ( e ) { var n = /\{\{\{[\s\S]+?\}\}\}|\{\{[\s\S]+?\}\}/g ; a . languages [ "markup-templating" ] . buildPlaceholders ( e , "handlebars" , n ) } ) , a . hooks . add ( "after-tokenize" , function ( e ) { a . languages [ "markup-templating" ] . tokenizePlaceholders ( e , "handlebars" ) } ) } ( Prism ) ;
2018-09-07 23:05:49 +02:00
Prism . languages . haskell = { comment : { pattern : /(^|[^-!#$%*+=?&@|~.:<>^\\\/])(?:--[^-!#$%*+=?&@|~.:<>^\\\/].*|{-[\s\S]*?-})/m , lookbehind : ! 0 } , "char" : /'(?:[^\\']|\\(?:[abfnrtv\\"'&]|\^[A-Z@[\]^_]|NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|\d+|o[0-7]+|x[0-9a-fA-F]+))'/ , string : { pattern : /"(?:[^\\"]|\\(?:[abfnrtv\\"'&]|\^[A-Z@[\]^_]|NUL|SOH|STX|ETX|EOT|ENQ|ACK|BEL|BS|HT|LF|VT|FF|CR|SO|SI|DLE|DC1|DC2|DC3|DC4|NAK|SYN|ETB|CAN|EM|SUB|ESC|FS|GS|RS|US|SP|DEL|\d+|o[0-7]+|x[0-9a-fA-F]+)|\\\s+\\)*"/ , greedy : ! 0 } , keyword : /\b(?:case|class|data|deriving|do|else|if|in|infixl|infixr|instance|let|module|newtype|of|primitive|then|type|where)\b/ , import _statement : { pattern : /((?:\r?\n|\r|^)\s*)import\s+(?:qualified\s+)?(?:[A-Z][\w']*)(?:\.[A-Z][\w']*)*(?:\s+as\s+(?:[A-Z][_a-zA-Z0-9']*)(?:\.[A-Z][\w']*)*)?(?:\s+hiding\b)?/m , lookbehind : ! 0 , inside : { keyword : /\b(?:import|qualified|as|hiding)\b/ } } , builtin : /\b(?:abs|acos|acosh|all|and|any|appendFile|approxRational|asTypeOf|asin|asinh|atan|atan2|atanh|basicIORun|break|catch|ceiling|chr|compare|concat|concatMap|const|cos|cosh|curry|cycle|decodeFloat|denominator|digitToInt|div|divMod|drop|dropWhile|either|elem|encodeFloat|enumFrom|enumFromThen|enumFromThenTo|enumFromTo|error|even|exp|exponent|fail|filter|flip|floatDigits|floatRadix|floatRange|floor|fmap|foldl|foldl1|foldr|foldr1|fromDouble|fromEnum|fromInt|fromInteger|fromIntegral|fromRational|fst|gcd|getChar|getContents|getLine|group|head|id|inRange|index|init|intToDigit|interact|ioError|isAlpha|isAlphaNum|isAscii|isControl|isDenormalized|isDigit|isHexDigit|isIEEE|isInfinite|isLower|isNaN|isNegativeZero|isOctDigit|isPrint|isSpace|isUpper|iterate|last|lcm|length|lex|lexDigits|lexLitChar|lines|log|logBase|lookup|map|mapM|mapM_|max|maxBound|maximum|maybe|min|minBound|minimum|mod|negate|not|notElem|null|numerator|odd|or|ord|otherwise|pack|pi|pred|primExitWith|print|product|properFraction|putChar|putStr|putStrLn|quot|quotRem|range|rangeSize|read|readDec|readFile|readFloat|readHex|readIO|readInt|readList|readLitChar|readLn|readOct|readParen|readSigned|reads|readsPrec|realToFrac|recip|rem|repeat|replicate|return|reverse|round|scaleFloat|scanl|scanl1|scanr|scanr1|seq|sequence|sequence_|show|showChar|showInt|showList|showLitChar|showParen|showSigned|showString|shows|showsPrec|significand|signum|sin|sinh|snd|sort|span|splitAt|sqrt|subtract|succ|sum|tail|take|takeWhile|tan|tanh|threadToIOResult|toEnum|toInt|toInteger|toLower|toRational|toUpper|truncate|uncurry|undefined|unlines|until|unwords|unzip|unzip3|userError|words|writeFile|zip|zip3|zipWith|zipWith3)\b/ , number : /\b(?:\d+(?:\.\d+)?(?:e[+-]?\d+)?|0o[0-7]+|0x[0-9a-f]+)\b/i , operator : /\s\.\s|[-!#$%*+=?&@|~.:<>^\\\/]*\.[-!#$%*+=?&@|~.:<>^\\\/]+|[-!#$%*+=?&@|~.:<>^\\\/]+\.[-!#$%*+=?&@|~.:<>^\\\/]*|[-!#$%*+=?&@|~:<>^\\\/]+|`([A-Z][\w']*\.)*[_a-z][\w']*`/ , hvariable : /\b(?:[A-Z][\w']*\.)*[_a-z][\w']*\b/ , constant : /\b(?:[A-Z][\w']*\.)*[A-Z][\w']*\b/ , punctuation : /[{}[\];(),.:]/ } ;
2018-12-29 17:05:46 +01:00
! function ( t ) { function a ( t ) { var a = t . replace ( /^[a-z]+\// , "" ) , e = "\\w+/(?:[\\w.-]+\\+)+" + a + "(?![+\\w.-])" ; return "(?:" + t + "|" + e + ")" } t . languages . http = { "request-line" : { pattern : /^(?:POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\s(?:https?:\/\/|\/)\S+\sHTTP\/[0-9.]+/m , inside : { property : /^(?:POST|GET|PUT|DELETE|OPTIONS|PATCH|TRACE|CONNECT)\b/ , "attr-name" : /:\w+/ } } , "response-status" : { pattern : /^HTTP\/1.[01] \d+.*/m , inside : { property : { pattern : /(^HTTP\/1.[01] )\d+.*/i , lookbehind : ! 0 } } } , "header-name" : { pattern : /^[\w-]+:(?=.)/m , alias : "keyword" } } ; var e , n = t . languages , r = { "application/javascript" : n . javascript , "application/json" : n . json || n . javascript , "application/xml" : n . xml , "text/xml" : n . xml , "text/html" : n . html , "text/css" : n . css } , i = { "application/json" : ! 0 , "application/xml" : ! 0 } ; for ( var s in r ) if ( r [ s ] ) { e = e || { } ; var p = i [ s ] ? a ( s ) : s ; e [ s ] = { pattern : RegExp ( "(content-type:\\s*" + p + "[\\s\\S]*?)(?:\\r?\\n|\\r){2}[\\s\\S]*" , "i" ) , lookbehind : ! 0 , inside : { rest : r [ s ] } } } e && t . languages . insertBefore ( "http" , "header-name" , e ) } ( Prism ) ;
! function ( a ) { var e = /\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|var|null|exports|module|open|opens|provides|requires|to|transitive|uses|with)\b/ , t = /\b[A-Z](?:\w*[a-z]\w*)?\b/ ; a . languages . java = a . languages . extend ( "clike" , { "class-name" : [ t , /\b[A-Z]\w*(?=\s+\w+\s*[;,=())])/ ] , keyword : e , "function" : [ a . languages . clike . function , { pattern : /(\:\:)[a-z_]\w*/ , lookbehind : ! 0 } ] , number : /\b0b[01][01_]*L?\b|\b0x[\da-f_]*\.?[\da-f_p+-]+\b|(?:\b\d[\d_]*\.?[\d_]*|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i , operator : { pattern : /(^|[^.])(?:<<=?|>>>?=?|->|([-+&|])\2|[?:~]|[-+*\/%&|^!=<>]=?)/m , lookbehind : ! 0 } } ) , a . languages . insertBefore ( "java" , "class-name" , { annotation : { alias : "punctuation" , pattern : /(^|[^.])@\w+/ , lookbehind : ! 0 } , namespace : { pattern : /(\b(?:exports|import(?:\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\s+)[a-z]\w*(\.[a-z]\w*)+/ , lookbehind : ! 0 , inside : { punctuation : /\./ } } , generics : { pattern : /<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/ , inside : { "class-name" : t , keyword : e , punctuation : /[<>(),.:]/ , operator : /[?&|]/ } } } ) } ( Prism ) ;
Prism . languages . json = { comment : /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/ , property : { pattern : /"(?:\\.|[^\\"\r\n])*"(?=\s*:)/ , greedy : ! 0 } , string : { pattern : /"(?:\\.|[^\\"\r\n])*"(?!\s*:)/ , greedy : ! 0 } , number : /-?\d+\.?\d*(e[+-]?\d+)?/i , punctuation : /[{}[\],]/ , operator : /:/ , "boolean" : /\b(?:true|false)\b/ , "null" : /\bnull\b/ } , Prism . languages . jsonp = Prism . languages . json ;
2018-08-30 23:28:52 +02:00
! function ( e ) { e . languages . kotlin = e . 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 e . languages . kotlin [ "class-name" ] , e . languages . insertBefore ( "kotlin" , "string" , { "raw-string" : { pattern : /("""|''')[\s\S]*?\1/ , alias : "string" } } ) , e . languages . insertBefore ( "kotlin" , "keyword" , { annotation : { pattern : /\B@(?:\w+:)?(?:[A-Z]\w*|\[[^\]]+\])/ , alias : "builtin" } } ) , e . languages . insertBefore ( "kotlin" , "function" , { label : { pattern : /\w+@|@\w+/ , alias : "symbol" } } ) ; var n = [ { pattern : /\$\{[^}]+\}/ , inside : { delimiter : { pattern : /^\$\{|\}$/ , alias : "variable" } , rest : e . languages . kotlin } } , { pattern : /\$\w+/ , alias : "variable" } ] ; e . languages . kotlin . string . inside = e . languages . kotlin [ "raw-string" ] . inside = { interpolation : n } } ( Prism ) ;
! function ( a ) { var e = /\\(?:[^a-z()[\]]|[a-z*]+)/i , n = { "equation-command" : { pattern : e , alias : "regex" } } ; a . languages . latex = { comment : /%.*/m , cdata : { pattern : /(\\begin\{((?:verbatim|lstlisting)\*?)\})[\s\S]*?(?=\\end\{\2\})/ , lookbehind : ! 0 } , equation : [ { pattern : /\$(?:\\[\s\S]|[^\\$])*\$|\\\([\s\S]*?\\\)|\\\[[\s\S]*?\\\]/ , inside : n , alias : "string" } , { pattern : /(\\begin\{((?:equation|math|eqnarray|align|multline|gather)\*?)\})[\s\S]*?(?=\\end\{\2\})/ , lookbehind : ! 0 , inside : n , alias : "string" } ] , keyword : { pattern : /(\\(?:begin|end|ref|cite|label|usepackage|documentclass)(?:\[[^\]]+\])?\{)[^}]+(?=\})/ , lookbehind : ! 0 } , url : { pattern : /(\\url\{)[^}]+(?=\})/ , lookbehind : ! 0 } , headline : { pattern : /(\\(?:part|chapter|section|subsection|frametitle|subsubsection|paragraph|subparagraph|subsubparagraph|subsubsubparagraph)\*?(?:\[[^\]]+\])?\{)[^}]+(?=\}(?:\[[^\]]+\])?)/ , lookbehind : ! 0 , alias : "class-name" } , "function" : { pattern : e , alias : "selector" } , punctuation : /[[\]{}&]/ } } ( Prism ) ;
2018-12-29 17:05:46 +01: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" } , { pattern : /^```[\s\S]*?^```$/m , greedy : ! 0 , inside : { "code-block" : { pattern : /^(```.*(?:\r?\n|\r))[\s\S]+?(?=(?:\r?\n|\r)^```$)/m , lookbehind : ! 0 } , "code-language" : { pattern : /^(```).+/ , lookbehind : ! 0 } , punctuation : /```/ } } ] , title : [ { pattern : /\S.*(?:\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 , greedy : ! 0 , inside : { punctuation : /^\*\*|^__|\*\*$|__$/ } } , italic : { pattern : /(^|[^\\])([*_])(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/ , lookbehind : ! 0 , greedy : ! 0 , inside : { punctuation : /^[*_]|[*_]$/ } } , strike : { pattern : /(^|[^\\])(~~?)(?:(?:\r?\n|\r)(?!\r?\n|\r)|.)+?\2/ , lookbehind : ! 0 , greedy : ! 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 . strike . inside . url = Prism . languages . markdown . url , Prism . languages . markdown . bold . inside . italic = Prism . languages . markdown . italic , Prism . languages . markdown . bold . inside . strike = Prism . languages . markdown . strike , Prism . languages . markdown . italic . inside . bold = Prism . languages . markdown . bold , Prism . languages . markdown . italic . inside . strike = Prism . languages . markdown . strike , Prism . languages . markdown . strike . inside . bold = Prism . languages . markdown . bold , Prism . languages . markdown . strike . inside . italic = Prism . languages . markdown . italic , Prism . hooks . add ( "after-tokenize" , function ( a ) { function n ( a ) { if ( a && "string" != typeof a ) for ( var e = 0 , i = a . length ; i > e ; e ++ ) { var r = a [ e ] ; if ( "code" === r . type ) { var t = r . content [ 1 ] , s = r . content [ 3 ] ; if ( t && s && "code-language" === t . type && "code-block" === s . type && "string" == typeof t . content ) { var o = "language-" + t . content . trim ( ) . split ( /\s+/ ) [ 0 ] . toLowerCase ( ) ; s . alias ? "string" == typeof s . alias ? s . alias = [ s . alias , o ] : s . alias . push ( o ) : s . alias = [ o ] } } else n ( r . content ) } } "markdown" === a . language && n ( a . tokens ) } ) , Prism . hooks . add ( "wrap" , function ( a ) { if ( "code-block" === a . type ) { for ( var n = "" , e = 0 , i = a . classes . length ; i > e ; e ++ ) { var r = a . classes [ e ] , t = /language-(\w+)/ . exec ( r ) ; if ( t ) { n = t [ 1 ] ; break } } var s = Prism . languages [ n ] ; if ( s ) { var o = a . content . replace ( /</g , "<" ) . replace ( /&/g , "&" ) ; a . content = Prism . highlight ( o , s , n ) } } } ) , Prism . languages . md = Prism . languages . markdown ;
2018-08-30 23:28:52 +02:00
Prism . languages . makefile = { comment : { pattern : /(^|[^\\])#(?:\\(?:\r\n|[\s\S])|[^\\\r\n])*/ , lookbehind : ! 0 } , string : { pattern : /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/ , greedy : ! 0 } , builtin : /\.[A-Z][^:#=\s]+(?=\s*:(?!=))/ , symbol : { pattern : /^[^:=\r\n]+(?=\s*:(?!=))/m , inside : { variable : /\$+(?:[^(){}:#=\s]+|(?=[({]))/ } } , variable : /\$+(?:[^(){}:#=\s]+|\([@*%<^+?][DF]\)|(?=[({]))/ , keyword : [ /-include\b|\b(?:define|else|endef|endif|export|ifn?def|ifn?eq|include|override|private|sinclude|undefine|unexport|vpath)\b/ , { pattern : /(\()(?:addsuffix|abspath|and|basename|call|dir|error|eval|file|filter(?:-out)?|findstring|firstword|flavor|foreach|guile|if|info|join|lastword|load|notdir|or|origin|patsubst|realpath|shell|sort|strip|subst|suffix|value|warning|wildcard|word(?:s|list)?)(?=[ \t])/ , lookbehind : ! 0 } ] , operator : /(?:::|[?:+!])?=|[|@]/ , punctuation : /[:;(){}]/ } ;
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 : /-[->]?|\+\+?|!=?|<<?=?|>>?=?|==?|&&?|\|\|?|[~^%?*\/@]/ } ) ;
2018-07-20 19:14:22 +02:00
Prism . languages . ocaml = { comment : /\(\*[\s\S]*?\*\)/ , string : [ { pattern : /"(?:\\.|[^\\\r\n"])*"/ , greedy : ! 0 } , { pattern : /(['`])(?:\\(?:\d+|x[\da-f]+|.)|(?!\1)[^\\\r\n])\1/i , greedy : ! 0 } ] , number : /\b(?:0x[\da-f][\da-f_]+|(?:0[bo])?\d[\d_]*\.?[\d_]*(?:e[+-]?[\d_]+)?)/i , type : { pattern : /\B['`]\w*/ , alias : "variable" } , directive : { pattern : /\B#\w+/ , alias : "function" } , keyword : /\b(?:as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|object|of|open|prefix|private|rec|then|sig|struct|to|try|type|val|value|virtual|where|while|with)\b/ , "boolean" : /\b(?:false|true)\b/ , operator : /:=|[=<>@^|&+\-*\/$%!?~][!$%&*+\-.\/:<=>?@^|~]*|\b(?:and|asr|land|lor|lxor|lsl|lsr|mod|nor|or)\b/ , punctuation : /[(){}\[\]|_.,:;]/ } ;
2018-08-30 23:28:52 +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 : /[{}[\];(),:]/ } ;
2019-01-06 11:44:38 +01:00
! function ( e ) { e . languages . php = e . languages . extend ( "clike" , { keyword : /\b(?:__halt_compiler|abstract|and|array|as|break|callable|case|catch|class|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|eval|exit|extends|final|finally|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|namespace|new|null|or|parent|print|private|protected|public|require|require_once|return|static|switch|throw|trait|try|unset|use|var|while|xor|yield)\b/i , constant : /\b[A-Z_][A-Z0-9_]*\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 ) ;
2018-08-30 23:28:52 +02:00
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 : { p attern : /(^|[^\\])(?:\/\*[\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 : /[;[\]()`,.]/ } ;
2018-09-07 23:05:49 +02:00
Prism . languages . processing = Prism . languages . extend ( "clike" , { keyword : /\b(?:break|catch|case|class|continue|default|else|extends|final|for|if|implements|import|new|null|private|public|return|static|super|switch|this|try|void|while)\b/ , operator : /<[<=]?|>[>=]?|&&?|\|\|?|[%?]|[!=+\-*\/]=?/ } ) , Prism . languages . insertBefore ( "processing" , "number" , { constant : /\b(?!XML\b)[A-Z][A-Z\d_]+\b/ , type : { pattern : /\b(?:boolean|byte|char|color|double|float|int|XML|[A-Z]\w*)\b/ , alias : "variable" } } ) , Prism . languages . processing [ "function" ] . pattern = /\w+(?=\s*\()/ , Prism . languages . processing [ "class-name" ] . alias = "variable" ;
2018-12-29 17:05:46 +01:00
Prism . languages . scss = Prism . languages . extend ( "css" , { comment : { pattern : /(^|[^\\])(?:\/\*[\s\S]*?\*\/|\/\/.*)/ , lookbehind : ! 0 } , atrule : { pattern : /@[\w-]+(?:\([^()]+\)|[^(])*?(?=\s+[{;])/ , inside : { rule : /@[\w-]+/ } } , url : /(?:[-a-z]+-)*url(?=\()/i , selector : { pattern : /(?=\S)[^@;{}()]?(?:[^@;{}()]|#\{\$[-\w]+\})+(?=\s*\{(?:\}|\s|[^}]+[:{][^}]+))/m , inside : { parent : { pattern : /&/ , alias : "important" } , placeholder : /%[-\w]+/ , variable : /\$[-\w]+|#\{\$[-\w]+\}/ } } , property : { pattern : /(?:[\w-]|\$[-\w]+|#\{\$[-\w]+\})+(?=\s*:)/ , inside : { variable : /\$[-\w]+|#\{\$[-\w]+\}/ } } } ) , Prism . languages . insertBefore ( "scss" , "atrule" , { keyword : [ /@(?:if|else(?: if)?|for|each|while|import|extend|debug|warn|mixin|include|function|return|content)/i , { pattern : /( +)(?:from|through)(?= )/ , lookbehind : ! 0 } ] } ) , Prism . languages . insertBefore ( "scss" , "important" , { variable : /\$[-\w]+|#\{\$[-\w]+\}/ } ) , Prism . languages . insertBefore ( "scss" , "function" , { placeholder : { pattern : /%[-\w]+/ , alias : "selector" } , statement : { pattern : /\B!(?:default|optional)\b/i , alias : "keyword" } , "boolean" : /\b(?:true|false)\b/ , "null" : /\bnull\b/ , operator : { pattern : /(\s)(?:[-+*\/%]|[=!]=|<=?|>=?|and|or|not)(?=\s)/ , lookbehind : ! 0 } } ) , Prism . languages . scss . atrule . inside . rest = Prism . languages . scss ;
Prism . languages . python = { comment : { pattern : /(^|[^\\])#.*/ , lookbehind : ! 0 } , "string-interpolation" : { pattern : /(?:f|rf|fr)(?:("""|''')[\s\S]+?\1|("|')(?:\\.|(?!\2)[^\\\r\n])*\2)/i , greedy : ! 0 , inside : { interpolation : { pattern : /((?:^|[^{])(?:{{)*){(?!{)(?:[^{}]|{(?!{)(?:[^{}]|{(?!{)(?:[^{}])+})+})+}/ , lookbehind : ! 0 , inside : { "format-spec" : { pattern : /(:)[^:(){}]+(?=}$)/ , lookbehind : ! 0 } , "conversion-option" : { pattern : /![sra](?=[:}]$)/ , alias : "punctuation" } , rest : null } } , string : /[\s\S]+/ } } , "triple-quoted-string" : { pattern : /(?:[rub]|rb|br)?("""|''')[\s\S]+?\1/i , greedy : ! 0 , alias : "string" } , string : { pattern : /(?:[rub]|rb|br)?("|')(?:\\.|(?!\1)[^\\\r\n])*\1/i , greedy : ! 0 } , "function" : { pattern : /((?:^|\s)def[ \t]+)[a-zA-Z_]\w*(?=\s*\()/g , lookbehind : ! 0 } , "class-name" : { pattern : /(\bclass\s+)\w+/i , lookbehind : ! 0 } , decorator : { pattern : /(^\s*)@\w+(?:\.\w+)*/i , lookbehind : ! 0 , alias : [ "annotation" , "punctuation" ] , inside : { punctuation : /\./ } } , keyword : /\b(?:and|as|assert|async|await|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|nonlocal|not|or|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 : /[-+%=]=?|!=|\*\*?=?|\/\/?=?|<[<=>]?|>[=>]?|[&|^~]/ , punctuation : /[{}[\];(),.:]/ } , Prism . languages . python [ "string-interpolation" ] . inside . interpolation . inside . rest = Prism . languages . python , Prism . languages . py = Prism . languages . python ;
2019-01-06 11:44:38 +01:00
Prism . languages . r = { comment : /#.*/ , string : { pattern : /(['"])(?:\\.|(?!\1)[^\\\r\n])*\1/ , greedy : ! 0 } , "percent-operator" : { pattern : /%[^%\s]*%/ , alias : "operator" } , "boolean" : /\b(?:TRUE|FALSE)\b/ , ellipsis : /\.\.(?:\.|\d+)/ , number : [ /\b(?:NaN|Inf)\b/ , /(?:\b0x[\dA-Fa-f]+(?:\.\d*)?|\b\d+\.?\d*|\B\.\d+)(?:[EePp][+-]?\d+)?[iL]?/ ] , keyword : /\b(?:if|else|repeat|while|function|for|in|next|break|NULL|NA|NA_integer_|NA_real_|NA_complex_|NA_character_)\b/ , operator : /->?>?|<(?:=|<?-)?|[>=!]=?|::?|&&?|\|\|?|[+*\/^$@~]/ , punctuation : /[(){}\[\],;]/ } ;
2018-08-30 23:28:52 +02:00
! function ( t ) { var n = t . util . clone ( t . languages . javascript ) ; t . languages . jsx = t . languages . extend ( "markup" , n ) , t . languages . jsx . tag . pattern = /<\/?(?:[\w.:-]+\s*(?:\s+(?:[\w.:-]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s{'">=]+|\{(?:\{(?:\{[^}]*\}|[^{}])*\}|[^{}])+\}))?|\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}))*\s*\/?)?>/i , t . languages . jsx . tag . inside . tag . pattern = /^<\/?[^\s>\/]*/i , t . languages . jsx . tag . inside [ "attr-value" ] . pattern = /=(?!\{)(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">]+)/i , t . languages . jsx . tag . inside . tag . inside [ "class-name" ] = /^[A-Z]\w*$/ , t . languages . insertBefore ( "inside" , "attr-name" , { spread : { pattern : /\{\.{3}[a-z_$][\w$]*(?:\.[a-z_$][\w$]*)*\}/ , inside : { punctuation : /\.{3}|[{}.]/ , "attr-value" : /\w+/ } } } , t . languages . jsx . tag ) , t . languages . insertBefore ( "inside" , "attr-value" , { script : { pattern : /=(\{(?:\{(?:\{[^}]*\}|[^}])*\}|[^}])+\})/i , inside : { "script-punctuation" : { pattern : /^=(?={)/ , alias : "punctuation" } , rest : t . languages . jsx } , alias : "language-javascript" } } , t . languages . jsx . tag ) ; var e = function ( t ) { return t ? "string" == typeof t ? t : "string" == typeof t . content ? t . content : t . content . map ( e ) . join ( "" ) : "" } , a = function ( n ) { for ( var s = [ ] , g = 0 ; g < n . length ; g ++ ) { var i = n [ g ] , o = ! 1 ; if ( "string" != typeof i && ( "tag" === i . type && i . content [ 0 ] && "tag" === i . content [ 0 ] . type ? "</" === i . content [ 0 ] . content [ 0 ] . content ? s . length > 0 && s [ s . length - 1 ] . tagName === e ( i . content [ 0 ] . content [ 1 ] ) && s . pop ( ) : "/>" === i . content [ i . content . length - 1 ] . content || s . push ( { tagName : e ( i . content [ 0 ] . content [ 1 ] ) , openedBraces : 0 } ) : s . length > 0 && "punctuation" === i . type && "{" === i . content ? s [ s . length - 1 ] . openedBraces ++ : s . length > 0 && s [ s . length - 1 ] . openedBraces > 0 && "punctuation" === i . type && "}" === i . content ? s [ s . length - 1 ] . openedBraces -- : o = ! 0 ) , ( o || "string" == typeof i ) && s . length > 0 && 0 === s [ s . length - 1 ] . openedBraces ) { var p = e ( i ) ; g < n . length - 1 && ( "string" == typeof n [ g + 1 ] || "plain-text" === n [ g + 1 ] . type ) && ( p += e ( n [ g + 1 ] ) , n . splice ( g + 1 , 1 ) ) , g > 0 && ( "string" == typeof n [ g - 1 ] || "plain-text" === n [ g - 1 ] . type ) && ( p = e ( n [ g - 1 ] ) + p , n . splice ( g - 1 , 1 ) , g -- ) , n [ g ] = new t . Token ( "plain-text" , p , null , p ) } i . content && "string" != typeof i . content && a ( i . content ) } } ; t . hooks . add ( "after-tokenize" , function ( t ) { ( "jsx" === t . language || "tsx" === t . language ) && a ( t . tokens ) } ) } ( Prism ) ;
2018-12-29 17:05:46 +01:00
Prism . languages . typescript = Prism . languages . extend ( "javascript" , { keyword : /\b(?:abstract|as|async|await|break|case|catch|class|const|constructor|continue|debugger|declare|default|delete|do|else|enum|export|extends|finally|for|from|function|get|if|implements|import|in|instanceof|interface|is|keyof|let|module|namespace|new|null|of|package|private|protected|public|readonly|return|require|set|static|super|switch|this|throw|try|type|typeof|var|void|while|with|yield)\b/ , builtin : /\b(?:string|Function|any|number|boolean|Array|symbol|console|Promise|unknown|never)\b/ } ) , Prism . languages . ts = Prism . languages . typescript ;
Prism . languages . reason = Prism . languages . extend ( "clike" , { comment : { pattern : /(^|[^\\])\/\*[\s\S]*?\*\// , lookbehind : ! 0 } , string : { pattern : /"(?:\\(?:\r\n|[\s\S])|[^\\\r\n"])*"/ , greedy : ! 0 } , "class-name" : /\b[A-Z]\w*/ , keyword : /\b(?:and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|method|module|mutable|new|nonrec|object|of|open|or|private|rec|sig|struct|switch|then|to|try|type|val|virtual|when|while|with)\b/ , operator : /\.{3}|:[:=]|\|>|->|=(?:==?|>)?|<=?|>=?|[|^?'#!~`]|[+\-*\/]\.?|\b(?:mod|land|lor|lxor|lsl|lsr|asr)\b/ } ) , Prism . languages . insertBefore ( "reason" , "class-name" , { character : { pattern : /'(?:\\x[\da-f]{2}|\\o[0-3][0-7][0-7]|\\\d{3}|\\.|[^'\\\r\n])'/ , alias : "string" } , constructor : { pattern : /\b[A-Z]\w*\b(?!\s*\.)/ , alias : "variable" } , label : { pattern : /\b[a-z]\w*(?=::)/ , alias : "symbol" } } ) , delete Prism . languages . reason . function ;
2018-09-07 23:05:49 +02:00
! function ( e ) { var i = "(?:\\([^|)]+\\)|\\[[^\\]]+\\]|\\{[^}]+\\})+" , n = { css : { pattern : /\{[^}]+\}/ , inside : { rest : e . languages . css } } , "class-id" : { pattern : /(\()[^)]+(?=\))/ , lookbehind : ! 0 , alias : "attr-value" } , lang : { pattern : /(\[)[^\]]+(?=\])/ , lookbehind : ! 0 , alias : "attr-value" } , punctuation : /[\\\/]\d+|\S/ } ; e . languages . textile = e . languages . extend ( "markup" , { phrase : { pattern : /(^|\r|\n)\S[\s\S]*?(?=$|\r?\n\r?\n|\r\r)/ , lookbehind : ! 0 , inside : { "block-tag" : { pattern : RegExp ( "^[a-z]\\w*(?:" + i + "|[<>=()])*\\." ) , inside : { modifier : { pattern : RegExp ( "(^[a-z]\\w*)(?:" + i + "|[<>=()])+(?=\\.)" ) , lookbehind : ! 0 , inside : n } , tag : /^[a-z]\w*/ , punctuation : /\.$/ } } , list : { pattern : RegExp ( "^[*#]+(?:" + i + ")?\\s+.+" , "m" ) , inside : { modifier : { pattern : RegExp ( "(^[*#]+)" + i ) , lookbehind : ! 0 , inside : n } , punctuation : /^[*#]+/ } } , table : { pattern : RegExp ( "^(?:(?:" + i + "|[<>=()^~])+\\.\\s*)?(?:\\|(?:(?:" + i + "|[<>=()^~_]|[\\\\/]\\d+)+\\.)?[^|]*)+\\|" , "m" ) , inside : { modifier : { pattern : RegExp ( "(^|\\|(?:\\r?\\n|\\r)?)(?:" + i + "|[<>=()^~_]|[\\\\/]\\d+)+(?=\\.)" ) , lookbehind : ! 0 , inside : n } , punctuation : /\||^\./ } } , inline : { pattern : RegExp ( "(\\*\\*|__|\\?\\?|[*_%@+\\-^~])(?:" + i + ")?.+?\\1" ) , inside : { bold : { pattern : RegExp ( "(^(\\*\\*?)(?:" + i + ")?).+?(?=\\2)" ) , lookbehind : ! 0 } , italic : { pattern : RegExp ( "(^(__?)(?:" + i + ")?).+?(?=\\2)" ) , lookbehind : ! 0 } , cite : { pattern : RegExp ( "(^\\?\\?(?:" + i + ")?).+?(?=\\?\\?)" ) , lookbehind : ! 0 , alias : "string" } , code : { pattern : RegExp ( "(^@(?:" + i + ")?).+?(?=@)" ) , lookbehind : ! 0 , alias : "keyword" } , inserted : { pattern : RegExp ( "(^\\+(?:" + i + ")?).+?(?=\\+)" ) , lookbehind : ! 0 } , deleted : { pattern : RegExp ( "(^-(?:" + i + ")?).+?(?=-)" ) , lookbehind : ! 0 } , span : { pattern : RegExp ( "(^%(?:" + i + ")?).+?(?=%)" ) , lookbehind : ! 0 } , modifier : { pattern : RegExp ( "(^\\*\\*|__|\\?\\?|[*_%@+\\-^~])" + i ) , lookbehind : ! 0 , inside : n } , punctuation : /[*_%?@+\-^~]+/ } } , "link-ref" : { pattern : /^\[[^\]]+\]\S+$/m , inside : { string : { pattern : /(\[)[^\]]+(?=\])/ , lookbehind : ! 0 } , url : { pattern : /(\])\S+$/ , lookbehind : ! 0 } , punctuation : /[\[\]]/ } } , link : { pattern : RegExp ( '"(?:' + i + ')?[^"]+":.+?(?=[^\\w/]?(?:\\s|$))' ) , inside : { text : { pattern : RegExp ( '(^"(?:' + i + ')?)[^"]+(?=")' ) , lookbehind : ! 0 } , modifier : { pattern : RegExp ( '(^")' + i ) , lookbehind : ! 0 , inside : n } , url : { pattern : /(:).+/ , lookbehind : ! 0 } , punctuation : /[":]/ } } , image : { pattern : RegExp ( "!(?:" + i + "|[<>=()])*[^!\\s()]+(?:\\([^)]+\\))?!(?::.+?(?=[^\\w/]?(?:\\s|$)))?" ) , inside : { source : { pattern : RegExp ( "(^!(?:" + i + "|[<>=()])*)[^!\\s()]+(?:\\([^)]+\\))?(?=!)" ) , lookbehind : ! 0 , alias : "url" } , modifier : { pattern : RegExp ( "(^!)(?:" + i + "|[<>=()])+" ) , lookbehind : ! 0 , inside : n } , url : { pattern : /(:).+/ , lookbehind : ! 0 } , punctuation : /[!:]/ } } , footnote : { pattern : /\b\[\d+\]/ , alias : "comment" , inside : { punctuation : /\[|\]/ } } , acronym : { pattern : /\b[A-Z\d]+\([^)]+\)/ , inside : { comment : { pattern : /(\()[^)]+(?=\))/ , lookbehind : ! 0 } , punctuation : /[()]/ } } , mark : { pattern : /\b\((?:TM|R|C)\)/ , alias : "comment" , inside : { punctuation : /[()]/ } } } } } ) ; var t = { inline : e . languages . textile . phrase . inside . inline , link : e . languages . textile . phrase . inside . link , image : e . languages . textile . phrase . inside . image , footnote : e . languages . textile . phrase . inside . footnote , acronym : e . languages . textile . phrase . inside . acronym , mark : e . languages . textile . phrase . inside . mark } ; e . languages . textile . tag . pattern = /<\/?(?!\d)[a-z0-9]+(?:\s+[^\s>\/=]+(?:=(?:("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|[^\s'">=]+))?)*\s*\/?>/i , e . languages . textile . phrase . inside . inline . inside . bold . inside = t , e . languages . textile . phrase . inside . inline . inside . italic . inside = t , e . languages . textile . phrase . inside . inline . inside . inserted . inside = t , e . languages . textile . phrase . inside . inline . inside . deleted . inside = t , e . languages . textile . phrase . inside . inline . inside . span . inside = t , e . languages . textile . phrase . inside . table . inside . inline = t . inline , e . languages . textile . phrase . inside . table . inside . link = t . link , e . languages . textile . phrase . inside . table . inside . image = t . image , e . languages . textile . phrase . inside . table . inside . footnote = t . footnote , e . languages . textile . phrase . inside . table . inside . acronym = t . acronym , e . languages . textile . phrase . inside . table . inside . mark = t . mark } ( Prism ) ;
2018-12-29 17:05:46 +01:00
Prism . languages . rust = { comment : [ { pattern : /(^|[^\\])\/\*[\s\S]*?\*\// , lookbehind : ! 0 } , { pattern : /(^|[^\\:])\/\/.*/ , lookbehind : ! 0 } ] , string : [ { pattern : /b?r(#*)"(?:\\.|(?!"\1)[^\\\r\n])*"\1/ , greedy : ! 0 } , { pattern : /b?"(?:\\.|[^\\\r\n"])*"/ , greedy : ! 0 } ] , "char" : { pattern : /b?'(?:\\(?:x[0-7][\da-fA-F]|u{(?:[\da-fA-F]_*){1,6}|.)|[^\\\r\n\t'])'/ , alias : "string" } , "lifetime-annotation" : { pattern : /'[^\s>']+/ , alias : "symbol" } , keyword : /\b(?:abstract|alignof|as|be|box|break|const|continue|crate|do|dyn|else|enum|extern|false|final|fn|for|if|impl|in|let|loop|match|mod|move|mut|offsetof|once|override|priv|pub|pure|ref|return|sizeof|static|self|Self|struct|super|true|trait|type|typeof|union|unsafe|unsized|use|virtual|where|while|yield)\b/ , attribute : { pattern : /#!?\[.+?\]/ , greedy : ! 0 , alias : "attr-name" } , "function" : [ /\w+(?=\s*\()/ , /\w+!(?=\s*\(|\[)/ ] , "macro-rules" : { pattern : /\w+!/ , alias : "function" } , 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)?|f32|f64))?\b/ , "closure-params" : { pattern : /\|[^|]*\|(?=\s*[{-])/ , inside : { punctuation : /[|:,]/ , operator : /[&*]/ } } , punctuation : /[{}[\];(),:]|\.+|->/ , operator : /[-+*\/%!^]=?|=[=>]?|@|&[&=]?|\|[|=]?|<<?=?|>>?=?/ } ;
! function ( e ) { e . languages . sass = e . languages . extend ( "css" , { comment : { pattern : /^([ \t]*)\/[\/*].*(?:(?:\r?\n|\r)\1[ \t]+.+)*/m , lookbehind : ! 0 } } ) , e . languages . insertBefore ( "sass" , "atrule" , { "atrule-line" : { pattern : /^(?:[ \t]*)[@+=].+/m , inside : { atrule : /(?:@[\w-]+|[+=])/m } } } ) , delete e . languages . sass . atrule ; var t = /\$[-\w]+|#\{\$[-\w]+\}/ , a = [ /[+*\/%]|[=!]=|<=?|>=?|\b(?:and|or|not)\b/ , { pattern : /(\s+)-(?=\s)/ , lookbehind : ! 0 } ] ; e . languages . insertBefore ( "sass" , "property" , { "variable-line" : { pattern : /^[ \t]*\$.+/m , inside : { punctuation : /:/ , variable : t , operator : a } } , "property-line" : { pattern : /^[ \t]*(?:[^:\s]+ *:.*|:[^:\s]+.*)/m , inside : { property : [ /[^:\s]+(?=\s*:)/ , { pattern : /(:)[^:\s]+/ , lookbehind : ! 0 } ] , punctuation : /:/ , variable : t , operator : a , important : e . languages . sass . important } } } ) , delete e . languages . sass . property , delete e . languages . sass . important , e . languages . insertBefore ( "sass" , "punctuation" , { selector : { pattern : /([ \t]*)\S(?:,?[^,\r\n]+)*(?:,(?:\r?\n|\r)\1[ \t]+\S(?:,?[^,\r\n]+)*)*/ , lookbehind : ! 0 } } ) } ( Prism ) ;
2018-09-07 23:05:49 +02:00
! function ( n ) { var t = { url : /url\((["']?).*?\1\)/i , string : { pattern : /("|')(?:(?!\1)[^\\\r\n]|\\(?:\r\n|[\s\S]))*\1/ , greedy : ! 0 } , interpolation : null , func : null , important : /\B!(?:important|optional)\b/i , keyword : { pattern : /(^|\s+)(?:(?:if|else|for|return|unless)(?=\s+|$)|@[\w-]+)/ , lookbehind : ! 0 } , hexcode : /#[\da-f]{3,6}/i , number : /\b\d+(?:\.\d+)?%?/ , "boolean" : /\b(?:true|false)\b/ , operator : [ /~|[+!\/%<>?=]=?|[-:]=|\*[*=]?|\.+|&&|\|\||\B-\B|\b(?:and|in|is(?: a| defined| not|nt)?|not|or)\b/ ] , punctuation : /[{}()\[\];:,]/ } ; t . interpolation = { pattern : /\{[^\r\n}:]+\}/ , alias : "variable" , inside : { delimiter : { pattern : /^{|}$/ , alias : "punctuation" } , rest : t } } , t . func = { pattern : /[\w-]+\([^)]*\).*/ , inside : { "function" : /^[^(]+/ , rest : t } } , n . languages . stylus = { comment : { pattern : /(^|[^\\])(\/\*[\s\S]*?\*\/|\/\/.*)/ , lookbehind : ! 0 } , "atrule-declaration" : { pattern : /(^\s*)@.+/m , lookbehind : ! 0 , inside : { atrule : /^@[\w-]+/ , rest : t } } , "variable-declaration" : { pattern : /(^[ \t]*)[\w$-]+\s*.?=[ \t]*(?:(?:\{[^}]*\}|.+)|$)/m , lookbehind : ! 0 , inside : { variable : /^\S+/ , rest : t } } , statement : { pattern : /(^[ \t]*)(?:if|else|for|return|unless)[ \t]+.+/m , lookbehind : ! 0 , inside : { keyword : /^\S+/ , rest : t } } , "property-declaration" : { pattern : /((?:^|\{)([ \t]*))(?:[\w-]|\{[^}\r\n]+\})+(?:\s*:\s*|[ \t]+)[^{\r\n]*(?:;|[^{\r\n,](?=$)(?!(\r?\n|\r)(?:\{|\2[ \t]+)))/m , lookbehind : ! 0 , inside : { property : { pattern : /^[^\s:]+/ , inside : { interpolation : t . interpolation } } , rest : t } } , selector : { pattern : /(^[ \t]*)(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\))?|\{[^}\r\n]+\})+)(?:(?:\r?\n|\r)(?:\1(?:(?=\S)(?:[^{}\r\n:()]|::?[\w-]+(?:\([^)\r\n]*\))?|\{[^}\r\n]+\})+)))*(?:,$|\{|(?=(?:\r?\n|\r)(?:\{|\1[ \t]+)))/m , lookbehind : ! 0 , inside : { interpolation : t . interpolation , punctuation : /[{},]/ } } , func : t . func , string : t . string , interpolation : t . interpolation , punctuation : /[{}()\[\];:.]/ } } ( Prism ) ;
2018-12-29 17:05:46 +01:00
Prism . languages . scheme = { comment : /;.*/ , string : { pattern : /"(?:[^"\\\r\n]|\\.)*"|'[^()#'\s]+/ , greedy : ! 0 } , character : { pattern : /#\\(?:u[a-fA-F\d]{4}|[a-zA-Z]+|\S)/ , alias : "string" } , keyword : { pattern : /(\()(?:define(?:-syntax|-library|-values)?|(?:case-)?lambda|let(?:\*|rec)?(?:-values)?|else|if|cond|begin|delay(?:-force)?|parameterize|guard|set!|(?:quasi-)?quote|syntax-rules)(?=[()\s])/ , lookbehind : ! 0 } , builtin : { pattern : /(\()(?:(?:cons|car|cdr|list|call-with-current-continuation|call\/cc|append|abs|apply|eval)\b|null\?|pair\?|boolean\?|eof-object\?|char\?|procedure\?|number\?|port\?|string\?|vector\?|symbol\?|bytevector\?)(?=[()\s])/ , lookbehind : ! 0 } , number : { pattern : /(\s|[()])[-+]?\d*\.?\d+(?:\s*[-+]\s*\d*\.?\d+i)?\b/ , lookbehind : ! 0 } , "boolean" : /#[tf]/ , operator : { pattern : /(\()(?:[-+*%\/]|[<>]=?|=>?)/ , lookbehind : ! 0 } , "function" : { pattern : /(\()[^()#'\s]+(?=[()\s)])/ , lookbehind : ! 0 } , punctuation : /[()']/ } ;
2018-08-30 23:28:52 +02:00
! function ( e ) { e . languages . pug = { comment : { pattern : /(^([\t ]*))\/\/.*(?:(?:\r?\n|\r)\2[\t ]+.+)*/m , lookbehind : ! 0 } , "multiline-script" : { pattern : /(^([\t ]*)script\b.*\.[\t ]*)(?:(?:\r?\n|\r(?!\n))(?:\2[\t ]+.+|\s*?(?=\r?\n|\r)))+/m , lookbehind : ! 0 , inside : { rest : e . languages . javascript } } , filter : { pattern : /(^([\t ]*)):.+(?:(?:\r?\n|\r(?!\n))(?:\2[\t ]+.+|\s*?(?=\r?\n|\r)))+/m , lookbehind : ! 0 , inside : { "filter-name" : { pattern : /^:[\w-]+/ , alias : "variable" } } } , "multiline-plain-text" : { pattern : /(^([\t ]*)[\w\-#.]+\.[\t ]*)(?:(?:\r?\n|\r(?!\n))(?:\2[\t ]+.+|\s*?(?=\r?\n|\r)))+/m , lookbehind : ! 0 } , markup : { pattern : /(^[\t ]*)<.+/m , lookbehind : ! 0 , inside : { rest : e . languages . markup } } , doctype : { pattern : /((?:^|\n)[\t ]*)doctype(?: .+)?/ , lookbehind : ! 0 } , "flow-control" : { pattern : /(^[\t ]*)(?:if|unless|else|case|when|default|each|while)\b(?: .+)?/m , lookbehind : ! 0 , inside : { each : { pattern : /^each .+? in\b/ , inside : { keyword : /\b(?:each|in)\b/ , punctuation : /,/ } } , branch : { pattern : /^(?:if|unless|else|case|when|default|while)\b/ , alias : "keyword" } , rest : e . languages . javascript } } , keyword : { pattern : /(^[\t ]*)(?:block|extends|include|append|prepend)\b.+/m , lookbehind : ! 0 } , mixin : [ { pattern : /(^[\t ]*)mixin .+/m , lookbehind : ! 0 , inside : { keyword : /^mixin/ , "function" : /\w+(?=\s*\(|\s*$)/ , punctuation : /[(),.]/ } } , { pattern : /(^[\t ]*)\+.+/m , lookbehind : ! 0 , inside : { name : { pattern : /^\+\w+/ , alias : "function" } , rest : e . languages . javascript } } ] , script : { pattern : /(^[\t ]*script(?:(?:&[^(]+)?\([^)]+\))*[\t ]+).+/m , lookbehind : ! 0 , inside : { rest : e . languages . javascript } } , "plain-text" : { pattern : /(^[\t ]*(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?[\t ]+).+/m , lookbehind : ! 0 } , tag : { pattern : /(^[\t ]*)(?!-)[\w\-#.]*[\w\-](?:(?:&[^(]+)?\([^)]+\))*\/?:?/m , lookbehind : ! 0 , inside : { attributes : [ { pattern : /&[^(]+\([^)]+\)/ , inside : { rest : e . languages . javascript } } , { pattern : /\([^)]+\)/ , inside : { "attr-value" : { pattern : /(=\s*)(?:\{[^}]*\}|[^,)\r\n]+)/ , lookbehind : ! 0 , inside : { rest : e . languages . javascript } } , "attr-name" : /[\w-]+(?=\s*!?=|\s*[,)])/ , punctuation : /[!=(),]+/ } } ] , punctuation : /:/ } } , code : [ { pattern : /(^[\t ]*(?:-|!?=)).+/m , lookbehind : ! 0 , inside : { rest : e . languages . javascript } } ] , punctuation : /[.\-!=|]+/ } ; for ( var t = "(^([\\t ]*)):{{filter_name}}(?:(?:\\r?\\n|\\r(?!\\n))(?:\\2[\\t ]+.+|\\s*?(?=\\r?\\n|\\r)))+" , n = [ { filter : "atpl" , language : "twig" } , { filter : "coffee" , language : "coffeescript" } , "ejs" , "handlebars" , "hogan" , "less" , "livescript" , "markdown" , "mustache" , "plates" , { filter : "sass" , language : "scss" } , "stylus" , "swig" ] , a = { } , i = 0 , r = n . length ; r > i ; i ++ ) { var s = n [ i ] ; s = "string" == typeof s ? { filter : s , language : s } : s , e . languages [ s . language ] && ( a [ "filter-" + s . filter ] = { pattern : RegExp ( t . replace ( "{{filter_name}}" , s . filter ) , "m" ) , lookbehind : ! 0 , inside : { "filter-name" : { pattern : /^:[\w-]+/ , alias : "variable" } , rest : e . languages [ s . language ] } } ) } e . languages . insertBefore ( "pug" , "filter" , a ) } ( Prism ) ;
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 ;
2018-12-29 17:05:46 +01:00
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]*(?:$|,|]|}|\s*#))/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 : /---|[:[\]{}\-,|>?]|\.\.\./ } , Prism . languages . yml = Prism . languages . yaml ;
2018-08-30 23:28:52 +02:00
! function ( e ) { e . languages . haml = { "multiline-comment" : { pattern : /((?:^|\r?\n|\r)([\t ]*))(?:\/|-#).*(?:(?:\r?\n|\r)\2[\t ]+.+)*/ , lookbehind : ! 0 , alias : "comment" } , "multiline-code" : [ { pattern : /((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*,[\t ]*(?:(?:\r?\n|\r)\2[\t ]+.*,[\t ]*)*(?:(?:\r?\n|\r)\2[\t ]+.+)/ , lookbehind : ! 0 , inside : { rest : e . languages . ruby } } , { pattern : /((?:^|\r?\n|\r)([\t ]*)(?:[~-]|[&!]?=)).*\|[\t ]*(?:(?:\r?\n|\r)\2[\t ]+.*\|[\t ]*)*/ , lookbehind : ! 0 , inside : { rest : e . languages . ruby } } ] , filter : { pattern : /((?:^|\r?\n|\r)([\t ]*)):[\w-]+(?:(?:\r?\n|\r)(?:\2[\t ]+.+|\s*?(?=\r?\n|\r)))+/ , lookbehind : ! 0 , inside : { "filter-name" : { pattern : /^:[\w-]+/ , alias : "variable" } } } , markup : { pattern : /((?:^|\r?\n|\r)[\t ]*)<.+/ , lookbehind : ! 0 , inside : { rest : e . languages . markup } } , doctype : { pattern : /((?:^|\r?\n|\r)[\t ]*)!!!(?: .+)?/ , lookbehind : ! 0 } , tag : { pattern : /((?:^|\r?\n|\r)[\t ]*)[%.#][\w\-#.]*[\w\-](?:\([^)]+\)|\{(?:\{[^}]+\}|[^}])+\}|\[[^\]]+\])*[\/<>]*/ , lookbehind : ! 0 , inside : { attributes : [ { pattern : /(^|[^#])\{(?:\{[^}]+\}|[^}])+\}/ , lookbehind : ! 0 , inside : { rest : e . languages . ruby } } , { pattern : /\([^)]+\)/ , inside : { "attr-value" : { pattern : /(=\s*)(?:"(?:\\.|[^\\"\r\n])*"|[^)\s]+)/ , lookbehind : ! 0 } , "attr-name" : /[\w:-]+(?=\s*!?=|\s*[,)])/ , punctuation : /[=(),]/ } } , { pattern : /\[[^\]]+\]/ , inside : { rest : e . languages . ruby } } ] , punctuation : /[<>]/ } } , code : { pattern : /((?:^|\r?\n|\r)[\t ]*(?:[~-]|[&!]?=)).+/ , lookbehind : ! 0 , inside : { rest : e . languages . ruby } } , interpolation : { pattern : /#\{[^}]+\}/ , inside : { delimiter : { pattern : /^#\{|\}$/ , alias : "punctuation" } , rest : e . languages . ruby } } , punctuation : { pattern : /((?:^|\r?\n|\r)[\t ]*)[~=\-&!]+/ , lookbehind : ! 0 } } ; for ( var t = "((?:^|\\r?\\n|\\r)([\\t ]*)):{{filter_name}}(?:(?:\\r?\\n|\\r)(?:\\2[\\t ]+.+|\\s*?(?=\\r?\\n|\\r)))+" , r = [ "css" , { filter : "coffee" , language : "coffeescript" } , "erb" , "javascript" , "less" , "markdown" , "ruby" , "scss" , "textile" ] , n = { } , a = 0 , i = r . length ; i > a ; a ++ ) { var l = r [ a ] ; l = "string" == typeof l ? { filter : l , language : l } : l , e . languages [ l . language ] && ( n [ "filter-" + l . filter ] = { pattern : RegExp ( t . replace ( "{{filter_name}}" , l . filter ) ) , lookbehind : ! 0 , inside : { "filter-name" : { pattern : /^:[\w-]+/ , alias : "variable" } , rest : e . languages [ l . language ] } } ) } e . languages . insertBefore ( "haml" , "filter" , n ) } ( Prism ) ;
2018-12-29 17:05:46 +01:00
! function ( e ) { var d = "(?:[\\w-]+|'[^'\n\r]*'|\"(?:\\.|[^\\\\\"\r\n])*\")" ; e . languages . toml = { comment : { pattern : /#.*/ , greedy : ! 0 } , table : { pattern : RegExp ( "(\\[\\s*)" + d + "(?:\\s*\\.\\s*" + d + ")*(?=\\s*\\])" ) , lookbehind : ! 0 , greedy : ! 0 , alias : "class-name" } , key : { pattern : RegExp ( "(^\\s*|[{,]\\s*)" + d + "(?:\\s*\\.\\s*" + d + ")*(?=\\s*=)" , "m" ) , lookbehind : ! 0 , greedy : ! 0 , alias : "property" } , string : { pattern : /"""(?:\\[\s\S]|[^\\])*?"""|'''[\s\S]*?'''|'[^'\n\r]*'|"(?:\\.|[^\\"\r\n])*"/ , greedy : ! 0 } , date : [ { pattern : /\d{4}-\d{2}-\d{2}(?:[T\s]\d{2}:\d{2}:\d{2}(?:\.\d+)?(?:Z|[+-]\d{2}:\d{2})?)?/i , alias : "number" } , { pattern : /\d{2}:\d{2}:\d{2}(?:\.\d+)?/i , alias : "number" } ] , number : /(?:\b0(?:x[\da-zA-Z]+(?:_[\da-zA-Z]+)*|o[0-7]+(?:_[0-7]+)*|b[10]+(?:_[10]+)*))\b|[-+]?\d+(?:_\d+)*(?:\.\d+(?:_\d+)*)?(?:[eE][+-]?\d+(?:_\d+)*)?\b|[-+]?(?:inf|nan)\b/ , "boolean" : /\b(?:true|false)\b/ , punctuation : /[.,=[\]{}]/ } } ( Prism ) ;
2018-09-07 23:05:49 +02:00
Prism . languages . twig = { comment : /\{#[\s\S]*?#\}/ , tag : { pattern : /\{\{[\s\S]*?\}\}|\{%[\s\S]*?%\}/ , inside : { ld : { pattern : /^(?:\{\{-?|\{%-?\s*\w+)/ , inside : { punctuation : /^(?:\{\{|\{%)-?/ , keyword : /\w+/ } } , rd : { pattern : /-?(?:%\}|\}\})$/ , inside : { punctuation : /.*/ } } , string : { pattern : /("|')(?:\\.|(?!\1)[^\\\r\n])*\1/ , inside : { punctuation : /^['"]|['"]$/ } } , keyword : /\b(?:even|if|odd)\b/ , "boolean" : /\b(?:true|false|null)\b/ , number : /\b0x[\dA-Fa-f]+|(?:\b\d+\.?\d*|\B\.\d+)(?:[Ee][-+]?\d+)?/ , operator : [ { pattern : /(\s)(?:and|b-and|b-xor|b-or|ends with|in|is|matches|not|or|same as|starts with)(?=\s)/ , lookbehind : ! 0 } , /[=<>]=?|!=|\*\*?|\/\/?|\?:?|[-+~%|]/ ] , property : /\b[a-zA-Z_]\w*\b/ , punctuation : /[()\[\]{}:.,]/ } } , other : { pattern : /\S(?:[\s\S]*\S)?/ , inside : Prism . languages . markup } } ;
2018-08-30 23:28:52 +02:00
var typescript = Prism . util . clone ( Prism . languages . typescript ) ; Prism . languages . tsx = Prism . languages . extend ( "jsx" , typescript ) ;
2018-09-07 23:05:49 +02:00
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
Prism . languages [ "visual-basic" ] = { comment : { pattern : /(?:['‘ ’ ]|REM\b).*/i , inside : { keyword : /^REM/i } } , directive : { pattern : /#(?:Const|Else|ElseIf|End|ExternalChecksum|ExternalSource|If|Region)(?:[^\S\r\n]_[^\S\r\n]*(?:\r\n?|\n)|.)+/i , alias : "comment" , greedy : ! 0 } , string : { pattern : /["“”](?:["“”]{2}|[^"“”])*["“”]C?/i , greedy : ! 0 } , date : { pattern : /#[^\S\r\n]*(?:\d+([\/-])\d+\1\d+(?:[^\S\r\n]+(?:\d+[^\S\r\n]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[^\S\r\n]*(?:AM|PM))?))?|(?:\d+[^\S\r\n]*(?:AM|PM)|\d+:\d+(?::\d+)?(?:[^\S\r\n]*(?:AM|PM))?))[^\S\r\n]*#/i , alias : "builtin" } , number : /(?:(?:\b\d+(?:\.\d+)?|\.\d+)(?:E[+-]?\d+)?|&[HO][\dA-F]+)(?:U?[ILS]|[FRD])?/i , "boolean" : /\b(?:True|False|Nothing)\b/i , keyword : /\b(?:AddHandler|AddressOf|Alias|And(?:Also)?|As|Boolean|ByRef|Byte|ByVal|Call|Case|Catch|C(?:Bool|Byte|Char|Date|Dbl|Dec|Int|Lng|Obj|SByte|Short|Sng|Str|Type|UInt|ULng|UShort)|Char|Class|Const|Continue|Date|Decimal|Declare|Default|Delegate|Dim|DirectCast|Do|Double|Each|Else(?:If)?|End(?:If)?|Enum|Erase|Error|Event|Exit|Finally|For|Friend|Function|Get(?:Type|XMLNamespace)?|Global|GoSub|GoTo|Handles|If|Implements|Imports|In|Inherits|Integer|Interface|Is|IsNot|Let|Lib|Like|Long|Loop|Me|Mod|Module|Must(?:Inherit|Override)|My(?:Base|Class)|Namespace|Narrowing|New|Next|Not(?:Inheritable|Overridable)?|Object|Of|On|Operator|Option(?:al)?|Or(?:Else)?|Out|Overloads|Overridable|Overrides|ParamArray|Partial|Private|Property|Protected|Public|RaiseEvent|ReadOnly|ReDim|RemoveHandler|Resume|Return|SByte|Select|Set|Shadows|Shared|short|Single|Static|Step|Stop|String|Structure|Sub|SyncLock|Then|Throw|To|Try|TryCast|TypeOf|U(?:Integer|Long|Short)|Using|Variant|Wend|When|While|Widening|With(?:Events)?|WriteOnly|Xor)\b/i , operator : [ /[+\-*\/\\^<=>&#@$%!]/ , { pattern : /([^\S\r\n])_(?=[^\S\r\n]*[\r\n])/ , lookbehind : ! 0 } ] , punctuation : /[{}().,:?]/ } , Prism . languages . vb = Prism . languages [ "visual-basic" ] ;
Prism . languages . wasm = { comment : [ /\(;[\s\S]*?;\)/ , { pattern : /;;.*/ , greedy : ! 0 } ] , string : { pattern : /"(?:\\[\s\S]|[^"\\])*"/ , greedy : ! 0 } , keyword : [ { pattern : /\b(?:align|offset)=/ , inside : { operator : /=/ } } , { pattern : /\b(?:(?:f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))?|memory\.(?:grow|size))\b/ , inside : { punctuation : /\./ } } , /\b(?:anyfunc|block|br(?:_if|_table)?|call(?:_indirect)?|data|drop|elem|else|end|export|func|get_(?:global|local)|global|if|import|local|loop|memory|module|mut|nop|offset|param|result|return|select|set_(?:global|local)|start|table|tee_local|then|type|unreachable)\b/ ] , variable : /\$[\w!#$%&'*+\-.\/:<=>?@\\^_`|~]+/i , number : /[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/ , punctuation : /[()]/ } ;
2018-08-30 23:28:52 +02:00
! 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 && self . document ) { var t = [ ] , e = { } , n = function ( ) { } ; Prism . plugins . toolbar = { } ; var a = Prism . plugins . toolbar . registerButton = function ( n , a ) { var o ; o = "function" == typeof a ? a : function ( t ) { var e ; return "function" == typeof a . onClick ? ( e = document . createElement ( "button" ) , e . type = "button" , e . addEventListener ( "click" , function ( ) { a . onClick . call ( this , t ) } ) ) : "string" == typeof a . url ? ( e = document . createElement ( "a" ) , e . href = a . url ) : e = document . createElement ( "span" ) , e . textContent = a . text , e } , t . push ( e [ n ] = o ) } , o = Prism . plugins . toolbar . hook = function ( a ) { var o = a . element . parentNode ; if ( o && /pre/i . test ( o . nodeName ) && ! o . parentNode . classList . contains ( "code-toolbar" ) ) { var r = document . createElement ( "div" ) ; r . classList . add ( "code-toolbar" ) , o . parentNode . insertBefore ( r , o ) , r . appendChild ( o ) ; var i = document . createElement ( "div" ) ; i . classList . add ( "toolbar" ) , document . body . hasAttribute ( "data-toolbar-order" ) && ( t = document . body . getAttribute ( "data-toolbar-order" ) . split ( "," ) . map ( function ( t ) { return e [ t ] || n } ) ) , t . forEach ( function ( t ) { var e = t ( a ) ; if ( e ) { var n = document . createElement ( "div" ) ; n . classList . add ( "toolbar-item" ) , n . appendChild ( e ) , i . appendChild ( n ) } } ) , r . appendChild ( i ) } } ; a ( "label" , function ( t ) { var e = t . element . parentNode ; if ( e && /pre/i . test ( e . nodeName ) && e . hasAttribute ( "data-label" ) ) { var n , a , o = e . getAttribute ( "data-label" ) ; try { a = document . querySelector ( "template#" + o ) } catch ( r ) { } return a ? n = a . content : ( e . hasAttribute ( "data-url" ) ? ( n = document . createElement ( "a" ) , n . href = e . getAttribute ( "data-url" ) ) : n = document . createElement ( "span" ) , n . textContent = o ) , n } } ) , Prism . hooks . add ( "complete" , o ) } } ( ) ;
2018-09-07 23:05:49 +02:00
! function ( ) { function t ( t ) { "function" != typeof t || e ( t ) || r . push ( t ) } function e ( t ) { return "function" == typeof t ? r . filter ( function ( e ) { return e . valueOf ( ) === t . valueOf ( ) } ) [ 0 ] : "string" == typeof t && t . length > 0 ? r . filter ( function ( e ) { return e . name === t } ) [ 0 ] : null } function n ( t ) { if ( "string" == typeof t && ( t = e ( t ) ) , "function" == typeof t ) { var n = r . indexOf ( t ) ; n >= 0 && r . splice ( n , 1 ) } } function a ( ) { Array . prototype . slice . call ( document . querySelectorAll ( "pre[data-jsonp]" ) ) . forEach ( function ( t ) { t . textContent = "" ; var e = document . createElement ( "code" ) ; e . textContent = i , t . appendChild ( e ) ; var n = t . getAttribute ( "data-adapter" ) , a = null ; if ( n ) { if ( "function" != typeof window [ n ] ) return e . textContent = "JSONP adapter function '" + n + "' doesn't exist" , void 0 ; a = window [ n ] } var u = "prismjsonp" + o ++ , f = document . createElement ( "a" ) , l = f . href = t . getAttribute ( "data-jsonp" ) ; f . href += ( f . search ? "&" : "?" ) + ( t . getAttribute ( "data-callback" ) || "callback" ) + "=" + u ; var s = setTimeout ( function ( ) { e . textContent === i && ( e . textContent = "Timeout loading '" + l + "'" ) } , 5e3 ) , d = document . createElement ( "script" ) ; d . src = f . href , window [ u ] = function ( n ) { document . head . removeChild ( d ) , clearTimeout ( s ) , delete window [ u ] ; var o = "" ; if ( a ) o = a ( n , t ) ; else for ( var i in r ) if ( o = r [ i ] ( n , t ) , null !== o ) break ; null === o ? e . textContent = "Cannot parse response (perhaps you need an adapter function?)" : ( e . textContent = o , Prism . highlightElement ( e ) ) } , document . head . appendChild ( d ) } ) } if ( self . Prism && self . document && document . querySelectorAll && [ ] . filter ) { var r = [ ] ; Prism . plugins . jsonphighlight = { registerAdapter : t , removeAdapter : n , highlight : a } , t ( function ( t ) { if ( t && t . meta && t . data ) { if ( t . meta . status && t . meta . status >= 400 ) return "Error: " + ( t . data . message || t . meta . status ) ; if ( "string" == typeof t . data . content ) return "function" == typeof atob ? atob ( t . data . content . replace ( /\s/g , "" ) ) : "Your browser cannot decode base64" } return null } ) , t ( function ( t , e ) { if ( t && t . meta && t . data && t . data . files ) { if ( t . meta . status && t . meta . status >= 400 ) return "Error: " + ( t . data . message || t . meta . status ) ; var n = e . getAttribute ( "data-filename" ) ; if ( null == n ) for ( var a in t . data . files ) if ( t . data . files . hasOwnProperty ( a ) ) { n = a ; break } return void 0 !== t . data . files [ n ] ? t . data . files [ n ] . content : "Error: unknown or missing gist file " + n } return null } ) , t ( function ( t ) { return t && t . node && "string" == typeof t . data ? t . data : null } ) ; var o = 0 , i = "Loading…" ; a ( ) } } ( ) ;
2018-12-29 17:05:46 +01:00
! function ( ) { if ( "undefined" != typeof self && self . Prism && self . document ) { var e = /(?:^|\s)command-line(?:\s|$)/ ; Prism . hooks . add ( "before-highlight" , function ( t ) { var a = t . vars = t . vars || { } , n = a [ "command-line" ] = a [ "command-line" ] || { } ; if ( n . complete || ! t . code ) return n . complete = ! 0 , void 0 ; var r = t . element . parentNode ; if ( ! r || ! /pre/i . test ( r . nodeName ) || ! e . test ( r . className ) && ! e . test ( t . element . className ) ) return n . complete = ! 0 , void 0 ; if ( t . element . querySelector ( ".command-line-prompt" ) ) return n . complete = ! 0 , void 0 ; var o = t . code . split ( "\n" ) ; n . numberOfLines = o . length ; var s = n . outputLines = [ ] , i = r . getAttribute ( "data-output" ) , l = r . getAttribute ( "data-filter-output" ) ; if ( i || "" === i ) { i = i . split ( "," ) ; for ( var m = 0 ; m < i . length ; m ++ ) { var d = i [ m ] . split ( "-" ) , p = parseInt ( d [ 0 ] , 10 ) , c = 2 === d . length ? parseInt ( d [ 1 ] , 10 ) : p ; if ( ! isNaN ( p ) && ! isNaN ( c ) ) { 1 > p && ( p = 1 ) , c > o . length && ( c = o . length ) , p -- , c -- ; for ( var u = p ; c >= u ; u ++ ) s [ u ] = o [ u ] , o [ u ] = "" } } } else if ( l ) for ( var m = 0 ; m < o . length ; m ++ ) 0 === o [ m ] . indexOf ( l ) && ( s [ m ] = o [ m ] . slice ( l . length ) , o [ m ] = "" ) ; t . code = o . join ( "\n" ) } ) , Prism . hooks . add ( "before-insert" , function ( e ) { var t = e . vars = e . vars || { } , a = t [ "command-line" ] = t [ "command-line" ] || { } ; if ( ! a . complete ) { for ( var n = e . highlightedCode . split ( "\n" ) , r = 0 ; r < a . outputLines . length ; r ++ ) a . outputLines . hasOwnProperty ( r ) && ( n [ r ] = a . outputLines [ r ] ) ; e . highlightedCode = n . join ( "\n" ) } } ) , Prism . hooks . add ( "complete" , function ( t ) { var a = t . vars = t . vars || { } , n = a [ "command-line" ] = a [ "command-line" ] || { } ; if ( ! n . complete ) { var r = t . element . parentNode ; e . test ( t . element . className ) && ( t . element . className = t . element . className . replace ( e , " " ) ) , e . test ( r . className ) || ( r . className += " command-line" ) ; var o = function ( e , t ) { return ( r . getAttribute ( e ) || t ) . replace ( /"/g , """ ) } , s = new Array ( n . numberOfLines + 1 ) , i = o ( "data-prompt" , "" ) ; if ( "" !== i ) s = s . join ( '<span data-prompt="' + i + '"></span>' ) ; else { var l = o ( "data-user" , "user" ) , m = o ( "data-host" , "localhost" ) ; s = s . join ( '<span data-user="' + l + '" data-host="' + m + '"></span>' ) } var d = document . createElement ( "span" ) ; d . className = "command-line-prompt" , d . innerHTML = s ; for ( var p = 0 ; p < n . outputLines . length ; p ++ ) if ( n . outputLines . hasOwnProperty ( p ) ) { var c = d . children [ p ] ; c . removeAttribute ( "data-user" ) , c . removeAttribute ( "data-host" ) , c . removeAttribute ( "data-prompt" ) } t . element . insertBefore ( d , t . element . firstChild ) , n . complete = ! 0 } } ) } } ( ) ;
2018-08-30 23:28:52 +02:00
! function ( ) { if ( "undefined" != typeof self && self . Prism && self . document ) { if ( ! Prism . plugins . toolbar ) return console . warn ( "Copy to Clipboard plugin loaded before Toolbar plugin." ) , void 0 ; var o = window . ClipboardJS || void 0 ; o || "function" != typeof require || ( o = require ( "clipboard" ) ) ; var e = [ ] ; if ( ! o ) { var t = document . createElement ( "script" ) , n = document . querySelector ( "head" ) ; t . onload = function ( ) { if ( o = window . ClipboardJS ) for ( ; e . length ; ) e . pop ( ) ( ) } , t . src = "https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.0/clipboard.min.js" , n . appendChild ( t ) } Prism . plugins . toolbar . registerButton ( "copy-to-clipboard" , function ( t ) { function n ( ) { var e = new o ( i , { text : function ( ) { return t . code } } ) ; e . on ( "success" , function ( ) { i . textContent = "Copied!" , r ( ) } ) , e . on ( "error" , function ( ) { i . textContent = "Press Ctrl+C to copy" , r ( ) } ) } function r ( ) { setTimeout ( function ( ) { i . textContent = "Copy" } , 5e3 ) } var i = document . createElement ( "a" ) ; return i . textContent = "Copy" , o ? n ( ) : e . push ( n ) , i } ) } } ( ) ;