Add PrismJS languages compatibility
Now, text highlighting supports HTML, CSS, C, JS, Bash, Batch, C++, C#, .gitignore, Java, JSON and YAML.
2021-01-03 11:49:54 +01:00
/ * P r i s m J S 1 . 2 3 . 0
https : //prismjs.com/download.html#themes=prism-tomorrow&languages=markup+css+clike+javascript+bash+batch+c+csharp+cpp+ignore+java+json+yaml */
var _self = "undefined" != typeof window ? window : "undefined" != typeof WorkerGlobalScope && self instanceof WorkerGlobalScope ? self : { } , Prism = function ( u ) { var c = /\blang(?:uage)?-([\w-]+)\b/i , n = 0 , _ = { manual : u . Prism && u . Prism . manual , disableWorkerMessageHandler : u . Prism && u . Prism . disableWorkerMessageHandler , util : { encode : function e ( n ) { return n instanceof M ? new M ( n . type , e ( n . content ) , n . alias ) : Array . isArray ( n ) ? n . map ( e ) : n . 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 : ++ n } ) , e . _ _id } , clone : function t ( e , r ) { var a , n ; switch ( r = r || { } , _ . util . type ( e ) ) { case "Object" : if ( n = _ . util . objId ( e ) , r [ n ] ) return r [ n ] ; for ( var i in a = { } , r [ n ] = a , e ) e . hasOwnProperty ( i ) && ( a [ i ] = t ( e [ i ] , r ) ) ; return a ; case "Array" : return n = _ . util . objId ( e ) , r [ n ] ? r [ n ] : ( a = [ ] , r [ n ] = a , e . forEach ( function ( e , n ) { a [ n ] = t ( e , r ) } ) , a ) ; default : return e } } , getLanguage : function ( e ) { for ( ; e && ! c . test ( e . className ) ; ) e = e . parentElement ; return e ? ( e . className . match ( c ) || [ , "none" ] ) [ 1 ] . toLowerCase ( ) : "none" } , currentScript : function ( ) { if ( "undefined" == typeof document ) return null ; if ( "currentScript" in document ) return document . currentScript ; try { throw new Error } catch ( e ) { var n = ( /at [^(\r\n]*\((.*):.+:.+\)$/i . exec ( e . stack ) || [ ] ) [ 1 ] ; if ( n ) { var t = document . getElementsByTagName ( "script" ) ; for ( var r in t ) if ( t [ r ] . src == n ) return t [ r ] } return null } } , isActive : function ( e , n , t ) { for ( var r = "no-" + n ; e ; ) { var a = e . classList ; if ( a . contains ( n ) ) return ! 0 ; if ( a . contains ( r ) ) return ! 1 ; e = e . parentElement } return ! ! t } } , languages : { extend : function ( e , n ) { var t = _ . util . clone ( _ . languages [ e ] ) ; for ( var r in n ) t [ r ] = n [ r ] ; return t } , insertBefore : function ( t , e , n , r ) { var a = ( r = r || _ . languages ) [ t ] , i = { } ; for ( var l in a ) if ( a . hasOwnProperty ( l ) ) { if ( l == e ) for ( var o in n ) n . hasOwnProperty ( o ) && ( i [ o ] = n [ o ] ) ; n . hasOwnProperty ( l ) || ( i [ l ] = a [ l ] ) } var s = r [ t ] ; return r [ t ] = i , _ . languages . DFS ( _ . languages , function ( e , n ) { n === s && e != t && ( this [ e ] = i ) } ) , i } , DFS : function e ( n , t , r , a ) { a = a || { } ; var i = _ . util . objId ; for ( var l in n ) if ( n . hasOwnProperty ( l ) ) { t . call ( n , l , n [ l ] , r || l ) ; var o = n [ l ] , s = _ . util . type ( o ) ; "Object" !== s || a [ i ( o ) ] ? "Array" !== s || a [ i ( o ) ] || ( a [ i ( o ) ] = ! 0 , e ( o , t , l , a ) ) : ( a [ i ( o ) ] = ! 0 , e ( o , t , null , a ) ) } } } , plugins : { } , highlightAll : function ( e , n ) { _ . highlightAllUnder ( document , e , n ) } , highlightAllUnder : function ( e , n , t ) { var r = { callback : t , container : e , selector : 'code[class*="language-"], [class*="language-"] code, code[class*="lang-"], [class*="lang-"] code' } ; _ . hooks . run ( "before-highlightall" , r ) , r . elements = Array . prototype . slice . apply ( r . container . querySelectorAll ( r . selector ) ) , _ . hooks . run ( "before-all-elements-highlight" , r ) ; for ( var a , i = 0 ; a = r . elements [ i ++ ] ; ) _ . highlightElement ( a , ! 0 === n , r . callback ) } , highlightElement : function ( e , n , t ) { var r = _ . util . getLanguage ( e ) , a = _ . languages [ r ] ; e . className = e . className . replace ( c , "" ) . replace ( /\s+/g , " " ) + " language-" + r ; var i = e . parentElement ; i && "pre" === i . nodeName . toLowerCase ( ) && ( i . className = i . className . replace ( c , "" ) . replace ( /\s+/g , " " ) + " language-" + r ) ; var l = { element : e , language : r , grammar : a , code : e . textContent } ; function o ( e ) { l . highlightedCode = e , _ . hooks . run ( "before-insert" , l ) , l . element . innerHTML = l . highlightedCode , _ . hooks . run ( "after-highlight" , l ) , _ . hooks . run ( "complete" , l ) , t && t . call ( l . element ) } if ( _ . hooks . run ( "before-sanity-check" , l ) , ! l . code ) return _ . hooks . run ( "complete" , l ) , void ( t && t . call ( l . element ) ) ; if ( _ . hooks . run ( "before-highlight" , l ) , l . grammar ) if ( n && u . Worker ) { var s = new Worker ( _ . filename ) ; s . onmessage = function ( e ) { o ( e . data ) } , s . postMessage ( JSON . stringify ( { language : l . language , code : l . code , immediateClose : ! 0 } ) ) } else o ( _ . highlight ( l . code , l . grammar , l . language ) ) ; else o ( _ . util . encode ( l . code ) ) } , highlight : function ( e , n , t ) { var r = { code : e , grammar : n , language : t } ; return _ . hooks . run ( "before-tokenize" , r ) , r . tokens = _ . tokenize ( r . code , r . grammar ) , _ . hooks . run ( "after-tokenize" , r ) , M . stringify ( _ . util . encode ( r . tokens ) , r . language ) } , tokenize : function ( e , n ) { var t = n . rest ; if ( t ) { for ( var r in t ) n [ r ] = t [ r ] ; delete n . rest } var a = new i ; return z ( a , a . head , e ) , function e ( n , t , r , a , i , l ) { for ( var o in r ) if ( r . hasOwnProperty ( o ) && r [ o ] ) { var s = r [ o ] ; s = Array . isArray ( s ) ? s : [ s ] ; for ( var u = 0 ; u < s . length ; ++ u ) { if ( l && l . cause == o + "," + u ) return ; var c = s [ u ] , g = c .
Prism . languages . markup = { comment : /<!--[\s\S]*?-->/ , prolog : /<\?[\s\S]+?\?>/ , doctype : { pattern : /<!DOCTYPE(?:[^>"'[\]]|"[^"]*"|'[^']*')+(?:\[(?:[^<"'\]]|"[^"]*"|'[^']*'|<(?!!--)|<!--(?:[^-]|-(?!->))*-->)*\]\s*)?>/i , greedy : ! 0 , inside : { "internal-subset" : { pattern : /(\[)[\s\S]+(?=\]>$)/ , lookbehind : ! 0 , greedy : ! 0 , inside : null } , string : { pattern : /"[^"]*"|'[^']*'/ , greedy : ! 0 } , punctuation : /^<!|>$|[[\]]/ , "doctype-tag" : /^DOCTYPE/ , name : /[^\s<>'"]+/ } } , cdata : /<!\[CDATA\[[\s\S]*?]]>/i , tag : { pattern : /<\/?(?!\d)[^\s>\/=$<%]+(?:\s(?:\s*[^\s>\/=]+(?:\s*=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+(?=[\s>]))|(?=[\s/>])))+)?\s*\/?>/ , greedy : ! 0 , inside : { tag : { pattern : /^<\/?[^\s>\/]+/ , inside : { punctuation : /^<\/?/ , namespace : /^[^\s>\/:]+:/ } } , "attr-value" : { pattern : /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/ , inside : { punctuation : [ { pattern : /^=/ , alias : "attr-equals" } , /"|'/ ] } } , punctuation : /\/?>/ , "attr-name" : { pattern : /[^\s>\/]+/ , inside : { namespace : /^[^\s>\/:]+:/ } } } } , entity : [ { pattern : /&[\da-z]{1,8};/i , alias : "named-entity" } , /&#x?[\da-f]{1,8};/i ] } , Prism . languages . markup . tag . inside [ "attr-value" ] . inside . entity = Prism . languages . markup . entity , Prism . languages . markup . doctype . inside [ "internal-subset" ] . inside = Prism . languages . markup , Prism . hooks . add ( "wrap" , function ( a ) { "entity" === a . type && ( a . attributes . title = a . content . replace ( /&/ , "&" ) ) } ) , Object . defineProperty ( Prism . languages . markup . tag , "addInlined" , { value : function ( a , e ) { var s = { } ; s [ "language-" + e ] = { pattern : /(^<!\[CDATA\[)[\s\S]+?(?=\]\]>$)/i , lookbehind : ! 0 , inside : Prism . languages [ e ] } , s . cdata = /^<!\[CDATA\[|\]\]>$/i ; var n = { "included-cdata" : { pattern : /<!\[CDATA\[[\s\S]*?\]\]>/i , inside : s } } ; n [ "language-" + e ] = { pattern : /[\s\S]+/ , inside : Prism . languages [ e ] } ; var t = { } ; t [ a ] = { pattern : RegExp ( "(<__[^>]*>)(?:<!\\[CDATA\\[(?:[^\\]]|\\](?!\\]>))*\\]\\]>|(?!<!\\[CDATA\\[)[^])*?(?=</__>)" . replace ( /__/g , function ( ) { return a } ) , "i" ) , lookbehind : ! 0 , greedy : ! 0 , inside : n } , Prism . languages . insertBefore ( "markup" , "cdata" , t ) } } ) , Prism . languages . html = Prism . languages . markup , Prism . languages . mathml = Prism . languages . markup , Prism . languages . svg = Prism . languages . markup , Prism . languages . xml = Prism . languages . extend ( "markup" , { } ) , Prism . languages . ssml = Prism . languages . xml , Prism . languages . atom = Prism . languages . xml , Prism . languages . rss = Prism . languages . xml ;
! function ( s ) { var e = /("|')(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/ ; s . languages . css = { comment : /\/\*[\s\S]*?\*\// , atrule : { pattern : /@[\w-](?:[^;{\s]|\s+(?![\s{]))*(?:;|(?=\s*\{))/ , inside : { rule : /^@[\w-]+/ , "selector-function-argument" : { pattern : /(\bselector\s*\(\s*(?![\s)]))(?:[^()\s]|\s+(?![\s)])|\((?:[^()]|\([^()]*\))*\))+(?=\s*\))/ , lookbehind : ! 0 , alias : "selector" } , keyword : { pattern : /(^|[^\w-])(?:and|not|only|or)(?![\w-])/ , lookbehind : ! 0 } } } , url : { pattern : RegExp ( "\\burl\\((?:" + e . source + "|(?:[^\\\\\r\n()\"']|\\\\[^])*)\\)" , "i" ) , greedy : ! 0 , inside : { function : /^url/i , punctuation : /^\(|\)$/ , string : { pattern : RegExp ( "^" + e . source + "$" ) , alias : "url" } } } , selector : RegExp ( "[^{}\\s](?:[^{};\"'\\s]|\\s+(?![\\s{])|" + e . source + ")*(?=\\s*\\{)" ) , string : { pattern : e , greedy : ! 0 } , property : /(?!\s)[-_a-z\xA0-\uFFFF](?:(?!\s)[-\w\xA0-\uFFFF])*(?=\s*:)/i , important : /!important\b/i , function : /[-a-z0-9]+(?=\()/i , punctuation : /[(){};:,]/ } , s . languages . css . atrule . inside . rest = s . languages . css ; var t = s . languages . markup ; t && ( t . tag . addInlined ( "style" , "css" ) , s . languages . insertBefore ( "inside" , "attr-value" , { "style-attr" : { pattern : /(^|["'\s])style\s*=\s*(?:"[^"]*"|'[^']*')/i , lookbehind : ! 0 , inside : { "attr-value" : { pattern : /=\s*(?:"[^"]*"|'[^']*'|[^\s'">=]+)/ , inside : { style : { pattern : /(["'])[\s\S]+(?=["']$)/ , lookbehind : ! 0 , alias : "language-css" , inside : s . languages . css } , punctuation : [ { pattern : /^=/ , alias : "attr-equals" } , /"|'/ ] } } , "attr-name" : /^style/i } } } , t . tag ) ) } ( Prism ) ;
Prism . languages . clike = { comment : [ { pattern : /(^|[^\\])\/\*[\s\S]*?(?:\*\/|$)/ , lookbehind : ! 0 , greedy : ! 0 } , { pattern : /(^|[^\\:])\/\/.*/ , lookbehind : ! 0 , greedy : ! 0 } ] , string : { pattern : /(["'])(?:\\(?:\r\n|[\s\S])|(?!\1)[^\\\r\n])*\1/ , greedy : ! 0 } , "class-name" : { pattern : /(\b(?:class|interface|extends|implements|trait|instanceof|new)\s+|\bcatch\s+\()[\w.\\]+/i , lookbehind : ! 0 , inside : { punctuation : /[.\\]/ } } , keyword : /\b(?:if|else|while|do|for|return|in|instanceof|function|new|try|throw|catch|finally|null|break|continue)\b/ , boolean : /\b(?:true|false)\b/ , function : /\w+(?=\()/ , number : /\b0x[\da-f]+\b|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?/i , operator : /[<>]=?|[!=]=?=?|--?|\+\+?|&&?|\|\|?|[?*/~^%]/ , punctuation : /[{}[\];(),.:]/ } ;
Prism . languages . javascript = Prism . languages . extend ( "clike" , { "class-name" : [ Prism . languages . clike [ "class-name" ] , { pattern : /(^|[^$\w\xA0-\uFFFF])(?!\s)[_$A-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\.(?:prototype|constructor))/ , lookbehind : ! 0 } ] , keyword : [ { pattern : /((?:^|})\s*)(?:catch|finally)\b/ , lookbehind : ! 0 } , { pattern : /(^|[^.]|\.\.\.\s*)\b(?:as|async(?=\s*(?:function\b|\(|[$\w\xA0-\uFFFF]|$))|await|break|case|class|const|continue|debugger|default|delete|do|else|enum|export|extends|for|from|function|(?:get|set)(?=\s*[\[$\w\xA0-\uFFFF])|if|implements|import|in|instanceof|interface|let|new|null|of|package|private|protected|public|return|static|super|switch|this|throw|try|typeof|undefined|var|void|while|with|yield)\b/ , lookbehind : ! 0 } ] , function : /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*(?:\.\s*(?:apply|bind|call)\s*)?\()/ , number : /\b(?:(?:0[xX](?:[\dA-Fa-f](?:_[\dA-Fa-f])?)+|0[bB](?:[01](?:_[01])?)+|0[oO](?:[0-7](?:_[0-7])?)+)n?|(?:\d(?:_\d)?)+n|NaN|Infinity)\b|(?:\b(?:\d(?:_\d)?)+\.?(?:\d(?:_\d)?)*|\B\.(?:\d(?:_\d)?)+)(?:[Ee][+-]?(?:\d(?:_\d)?)+)?/ , 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]|\b(?:return|yield))\s*)\/(?:\[(?:[^\]\\\r\n]|\\.)*]|\\.|[^/\\\[\r\n])+\/[gimyus]{0,6}(?=(?:\s|\/\*(?:[^*]|\*(?!\/))*\*\/)*(?:$|[\r\n,.;:})\]]|\/\/))/ , lookbehind : ! 0 , greedy : ! 0 , inside : { "regex-source" : { pattern : /^(\/)[\s\S]+(?=\/[a-z]*$)/ , lookbehind : ! 0 , alias : "language-regex" , inside : Prism . languages . regex } , "regex-flags" : /[a-z]+$/ , "regex-delimiter" : /^\/|\/$/ } } , "function-variable" : { pattern : /#?(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*[=:]\s*(?:async\s*)?(?:\bfunction\b|(?:\((?:[^()]|\([^()]*\))*\)|(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)\s*=>))/ , alias : "function" } , parameter : [ { pattern : /(function(?:\s+(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*)?\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\))/ , lookbehind : ! 0 , inside : Prism . languages . javascript } , { pattern : /(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*(?=\s*=>)/i , inside : Prism . languages . javascript } , { pattern : /(\(\s*)(?!\s)(?:[^()\s]|\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|undefined|var|void|while|with|yield)(?![$\w\xA0-\uFFFF]))(?:(?!\s)[_$a-zA-Z\xA0-\uFFFF](?:(?!\s)[$\w\xA0-\uFFFF])*\s*)\(\s*|\]\s*\(\s*)(?!\s)(?:[^()\s]|\s+(?![\s)])|\([^()]*\))+(?=\s*\)\s*\{)/ , lookbehind : ! 0 , inside : Prism . languages . javascript } ] , constant : /\b[A-Z](?:[A-Z_]|\dx?)*\b/ } ) , Prism . languages . insertBefore ( "javascript" , "string" , { "template-string" : { pattern : /`(?:\\[\s\S]|\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}|(?!\${)[^\\`])*`/ , greedy : ! 0 , inside : { "template-punctuation" : { pattern : /^`|`$/ , alias : "string" } , interpolation : { pattern : /((?:^|[^\\])(?:\\{2})*)\${(?:[^{}]|{(?:[^{}]|{[^}]*})*})+}/ , lookbehind : ! 0 , inside : { "interpolation-punctuation" : { pattern : /^\${|}$/ , alias : "punctuation" } , rest : Prism . languages . javascript } } , string : /[\s\S]+/ } } } ) , Prism . languages . markup && Prism . languages . markup . tag . addInlined ( "script" , "javascript" ) , Prism . languages . js = Prism . languages . javascript ;
! function ( e ) { var t = "\\b(?:BASH|BASHOPTS|BASH_ALIASES|BASH_ARGC|BASH_ARGV|BASH_CMDS|BASH_COMPLETION_COMPAT_DIR|BASH_LINENO|BASH_REMATCH|BASH_SOURCE|BASH_VERSINFO|BASH_VERSION|COLORTERM|COLUMNS|COMP_WORDBREAKS|DBUS_SESSION_BUS_ADDRESS|DEFAULTS_PATH|DESKTOP_SESSION|DIRSTACK|DISPLAY|EUID|GDMSESSION|GDM_LANG|GNOME_KEYRING_CONTROL|GNOME_KEYRING_PID|GPG_AGENT_INFO|GROUPS|HISTCONTROL|HISTFILE|HISTFILESIZE|HISTSIZE|HOME|HOSTNAME|HOSTTYPE|IFS|INSTANCE|JOB|LANG|LANGUAGE|LC_ADDRESS|LC_ALL|LC_IDENTIFICATION|LC_MEASUREMENT|LC_MONETARY|LC_NAME|LC_NUMERIC|LC_PAPER|LC_TELEPHONE|LC_TIME|LESSCLOSE|LESSOPEN|LINES|LOGNAME|LS_COLORS|MACHTYPE|MAILCHECK|MANDATORY_PATH|NO_AT_BRIDGE|OLDPWD|OPTERR|OPTIND|ORBIT_SOCKETDIR|OSTYPE|PAPERSIZE|PATH|PIPESTATUS|PPID|PS1|PS2|PS3|PS4|PWD|RANDOM|REPLY|SECONDS|SELINUX_INIT|SESSION|SESSIONTYPE|SESSION_MANAGER|SHELL|SHELLOPTS|SHLVL|SSH_AUTH_SOCK|TERM|UID|UPSTART_EVENTS|UPSTART_INSTANCE|UPSTART_JOB|UPSTART_SESSION|USER|WINDOWID|XAUTHORITY|XDG_CONFIG_DIRS|XDG_CURRENT_DESKTOP|XDG_DATA_DIRS|XDG_GREETER_DATA_DIR|XDG_MENU_PREFIX|XDG_RUNTIME_DIR|XDG_SEAT|XDG_SEAT_PATH|XDG_SESSION_DESKTOP|XDG_SESSION_ID|XDG_SESSION_PATH|XDG_SESSION_TYPE|XDG_VTNR|XMODIFIERS)\\b" , n = { pattern : /(^(["']?)\w+\2)[ \t]+\S.*/ , lookbehind : ! 0 , alias : "punctuation" , inside : null } , a = { bash : n , environment : { pattern : RegExp ( "\\$" + t ) , alias : "constant" } , variable : [ { pattern : /\$?\(\([\s\S]+?\)\)/ , greedy : ! 0 , 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 : /^\$\(|^`|\)$|`$/ } } , { pattern : /\$\{[^}]+\}/ , greedy : ! 0 , inside : { operator : /:[-=?+]?|[!\/]|##?|%%?|\^\^?|,,?/ , punctuation : /[\[\]]/ , environment : { pattern : RegExp ( "(\\{)" + t ) , lookbehind : ! 0 , alias : "constant" } } } , /\$(?:\w+|[#?*!@$])/ ] , entity : /\\(?:[abceEfnrtv\\"]|O?[0-7]{1,3}|x[0-9a-fA-F]{1,2}|u[0-9a-fA-F]{4}|U[0-9a-fA-F]{8})/ } ; e . languages . bash = { shebang : { pattern : /^#!\s*\/.*/ , alias : "important" } , comment : { pattern : /(^|[^"{\\$])#.*/ , lookbehind : ! 0 } , "function-name" : [ { pattern : /(\bfunction\s+)\w+(?=(?:\s*\(?:\s*\))?\s*\{)/ , lookbehind : ! 0 , alias : "function" } , { pattern : /\b\w+(?=\s*\(\s*\)\s*\{)/ , alias : "function" } ] , "for-or-select" : { pattern : /(\b(?:for|select)\s+)\w+(?=\s+in\s)/ , alias : "variable" , lookbehind : ! 0 } , "assign-left" : { pattern : /(^|[\s;|&]|[<>]\()\w+(?=\+?=)/ , inside : { environment : { pattern : RegExp ( "(^|[\\s;|&]|[<>]\\()" + t ) , lookbehind : ! 0 , alias : "constant" } } , alias : "variable" , lookbehind : ! 0 } , string : [ { pattern : /((?:^|[^<])<<-?\s*)(\w+?)\s[\s\S]*?(?:\r?\n|\r)\2/ , lookbehind : ! 0 , greedy : ! 0 , inside : a } , { pattern : /((?:^|[^<])<<-?\s*)(["'])(\w+)\2\s[\s\S]*?(?:\r?\n|\r)\3/ , lookbehind : ! 0 , greedy : ! 0 , inside : { bash : n } } , { pattern : /(^|[^\\](?:\\\\)*)(["'])(?:\\[\s\S]|\$\([^)]+\)|\$(?!\()|`[^`]+`|(?!\2)[^\\`$])*\2/ , lookbehind : ! 0 , greedy : ! 0 , inside : a } ] , environment : { pattern : RegExp ( "\\$?" + t ) , alias : "constant" } , variable : a . variable , function : { pattern : / ( ^ | [ \ s ; | & ] | [ < > ] \ ( ) ( ? : a d d | a p r o p o s | a p t | a p t i t u d e | a p t - c a c h e | a p t - g e t | a s p e l l | a u t o m y s q l b a c k u p | a w k | b a s e n a m e | b a s h | b c | b c o n s o l e | b g | b z i p 2 | c a l | c a t | c f d i s k | c h g r p | c h k c o n f i g | c h m o d | c h o w n | c h r o o t | c k s u m | c l e a r | c m p | c o l u m n | c o m m | c o m p o s e r | c p | c r o n | c r o n t a b | c s p l i t | c u r l | c u t | d a t e | d c | d d | d d r e s c u e | d e b o o t s t r a p | d f | d i f f | d i f f 3 | d i g | d i r | d i r c o l o r s | d i r n a m e | d i r s | d m e s g | d u | e g r e p | e j e c t | e n v | e t h t o o l | e x p a n d | e x p e c t | e x p r | f d f o r m a t | f d i s k | f g | f g r e p | f i l e | f i n d | f m t | f o l d | f o r m a t | f r e e | f s c k | f t p | f u s e r | g a w k | g i t | g p a r t e d | g r e p | g r o u p a d d | g r o u p d e l | g r o u p m o d | g r o u p s | g r u b - m k c o n f i g | g z i p | h a l t | h e a d | h g | h i s t o r y | h o s t | h o s t n a m e | h t o p | i c o n v | i d | i f c o n f i g | i f d o w n | i f u p | i m p o r t | i n s t a l l | i p | j o b s | j o i n | k i l l | k i l l a l l | l e s s | l i n k | l n | l o c a t e | l o g n a m e | l o g r o t a t e | l o o k | l p c | l p r | l p r i n t | l p r i n t d | l p r i n t q | l p r m | l s | l s o f | l y n x | m a k e | m a n | m c | m d a d m | m k c o n f i g | m k d i r | m k e 2 f s | m k f i f o | m k f s | m k i s o f s | m k n o d | m k s w a p | m m v | m o r e | m o s t | m o u n t | m t o o l s | m t r | m u t t | m v | n a n o | n c | n e t s t a t | n i c e | n l | n o h u p | n o t i f y - s e n d | n p m | n s l o o k u p | o p | o p e n | p a r t e d | p a s s w d | p a s t e | p a t h c h k | p i n g | p k i l l | p n p m | p o p d | p r | p r i n t c a p | p r i n t e n v | p s | p u s h d | p v | q u o t a | q u o t a c h e c k | q u o t a c t l | r a m | r a r | r c p | r e b o o t | r e m s y n c | r e n a m e | r e n i c e | r e v | r m | r
! function ( e ) { var r = /%%?[~:\w]+%?|!\S+!/ , t = { pattern : /\/[a-z?]+(?=[ :]|$):?|-[a-z]\b|--[a-z-]+\b/im , alias : "attr-name" , inside : { punctuation : /:/ } } , n = /"(?:[\\"]"|[^"])*"(?!")/ , i = /(?:\b|-)\d+\b/ ; Prism . languages . batch = { comment : [ /^::.*/m , { pattern : /((?:^|[&(])[ \t]*)rem\b(?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im , lookbehind : ! 0 } ] , label : { pattern : /^:.*/m , alias : "property" } , command : [ { pattern : /((?:^|[&(])[ \t]*)for(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* \S+ in \([^)]+\) do/im , lookbehind : ! 0 , inside : { keyword : /^for\b|\b(?:in|do)\b/i , string : n , parameter : t , variable : r , number : i , punctuation : /[()',]/ } } , { pattern : /((?:^|[&(])[ \t]*)if(?: \/[a-z?](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:not )?(?:cmdextversion \d+|defined \w+|errorlevel \d+|exist \S+|(?:"[^"]*"|(?!")(?:(?!==)\S)+)?(?:==| (?:equ|neq|lss|leq|gtr|geq) )(?:"[^"]*"|[^\s"]\S*))/im , lookbehind : ! 0 , inside : { keyword : /^if\b|\b(?:not|cmdextversion|defined|errorlevel|exist)\b/i , string : n , parameter : t , variable : r , number : i , operator : /\^|==|\b(?:equ|neq|lss|leq|gtr|geq)\b/i } } , { pattern : /((?:^|[&()])[ \t]*)else\b/im , lookbehind : ! 0 , inside : { keyword : /^else\b/i } } , { pattern : /((?:^|[&(])[ \t]*)set(?: \/[a-z](?:[ :](?:"[^"]*"|[^\s"/]\S*))?)* (?:[^^&)\r\n]|\^(?:\r\n|[\s\S]))*/im , lookbehind : ! 0 , inside : { keyword : /^set\b/i , string : n , parameter : t , variable : [ r , /\w+(?=(?:[*\/%+\-&^|]|<<|>>)?=)/ ] , number : i , operator : /[*\/%+\-&^|]=?|<<=?|>>=?|[!~_=]/ , punctuation : /[()',]/ } } , { pattern : /((?:^|[&(])[ \t]*@?)\w+\b(?:"(?:[\\"]"|[^"])*"(?!")|[^"^&)\r\n]|\^(?:\r\n|[\s\S]))*/im , lookbehind : ! 0 , inside : { keyword : /^\w+\b/i , string : n , parameter : t , label : { pattern : /(^\s*):\S+/m , lookbehind : ! 0 , alias : "property" } , variable : r , number : i , operator : /\^/ } } ] , operator : /[&@]/ , punctuation : /[()']/ } } ( ) ;
Prism . languages . c = Prism . languages . extend ( "clike" , { comment : { pattern : /\/\/(?:[^\r\n\\]|\\(?:\r\n?|\n|(?![\r\n])))*|\/\*[\s\S]*?(?:\*\/|$)/ , greedy : ! 0 } , "class-name" : { pattern : /(\b(?:enum|struct)\s+(?:__attribute__\s*\(\([\s\S]*?\)\)\s*)?)\w+|\b[a-z]\w*_t\b/ , lookbehind : ! 0 } , keyword : /\b(?:__attribute__|_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/ , function : /[a-z_]\w*(?=\s*\()/i , number : /(?:\b0x(?:[\da-f]+(?:\.[\da-f]*)?|\.[\da-f]+)(?:p[+-]?\d+)?|(?:\b\d+(?:\.\d*)?|\B\.\d+)(?:e[+-]?\d+)?)[ful]{0,4}/i , operator : />>=?|<<=?|->|([-+&|:])\1|[?:~]|[-+*/%&|^!=<>]=?/ } ) , Prism . languages . insertBefore ( "c" , "string" , { macro : { pattern : /(^\s*)#\s*[a-z](?:[^\r\n\\/]|\/(?!\*)|\/\*(?:[^*]|\*(?!\/))*\*\/|\\(?:\r\n|[\s\S]))*/im , lookbehind : ! 0 , greedy : ! 0 , alias : "property" , inside : { string : [ { pattern : /^(#\s*include\s*)<[^>]+>/ , lookbehind : ! 0 } , Prism . languages . c . string ] , comment : Prism . languages . c . comment , "macro-name" : [ { pattern : /(^#\s*define\s+)\w+\b(?!\()/i , lookbehind : ! 0 } , { pattern : /(^#\s*define\s+)\w+\b(?=\()/i , lookbehind : ! 0 , alias : "function" } ] , directive : { pattern : /^(#\s*)[a-z]+/ , lookbehind : ! 0 , alias : "keyword" } , "directive-hash" : /^#/ , punctuation : /##|\\(?=[\r\n])/ , expression : { pattern : /\S[\s\S]*/ , inside : Prism . languages . c } } } , constant : /\b(?:__FILE__|__LINE__|__DATE__|__TIME__|__TIMESTAMP__|__func__|EOF|NULL|SEEK_CUR|SEEK_END|SEEK_SET|stdin|stdout|stderr)\b/ } ) , delete Prism . languages . c . boolean ;
! function ( s ) { function a ( e , s ) { return e . replace ( /<<(\d+)>>/g , function ( e , n ) { return "(?:" + s [ + n ] + ")" } ) } function t ( e , n , s ) { return RegExp ( a ( e , n ) , s || "" ) } function e ( e , n ) { for ( var s = 0 ; s < n ; s ++ ) e = e . replace ( /<<self>>/g , function ( ) { return "(?:" + e + ")" } ) ; return e . replace ( /<<self>>/g , "[^\\s\\S]" ) } var n = "bool byte char decimal double dynamic float int long object sbyte short string uint ulong ushort var void" , i = "class enum interface struct" , r = "add alias and ascending async await by descending from get global group into join let nameof not notnull on or orderby partial remove select set unmanaged value when where" , o = "abstract as base break case catch checked const continue default delegate do else event explicit extern finally fixed for foreach goto if implicit in internal is lock namespace new null operator out override params private protected public readonly ref return sealed sizeof stackalloc static switch this throw try typeof unchecked unsafe using virtual volatile while yield" ; function l ( e ) { return "\\b(?:" + e . trim ( ) . replace ( / /g , "|" ) + ")\\b" } var d = l ( i ) , p = RegExp ( l ( n + " " + i + " " + r + " " + o ) ) , c = l ( i + " " + r + " " + o ) , u = l ( n + " " + i + " " + o ) , g = e ( "<(?:[^<>;=+\\-*/%&|^]|<<self>>)*>" , 2 ) , b = e ( "\\((?:[^()]|<<self>>)*\\)" , 2 ) , h = "@?\\b[A-Za-z_]\\w*\\b" , f = a ( "<<0>>(?:\\s*<<1>>)?" , [ h , g ] ) , m = a ( "(?!<<0>>)<<1>>(?:\\s*\\.\\s*<<1>>)*" , [ c , f ] ) , k = "\\[\\s*(?:,\\s*)*\\]" , y = a ( "<<0>>(?:\\s*(?:\\?\\s*)?<<1>>)*(?:\\s*\\?)?" , [ m , k ] ) , w = a ( "(?:<<0>>|<<1>>)(?:\\s*(?:\\?\\s*)?<<2>>)*(?:\\s*\\?)?" , [ a ( "\\(<<0>>+(?:,<<0>>+)+\\)" , [ a ( "[^,()<>[\\];=+\\-*/%&|^]|<<0>>|<<1>>|<<2>>" , [ g , b , k ] ) ] ) , m , k ] ) , v = { keyword : p , punctuation : /[<>()?,.:[\]]/ } , x = "'(?:[^\r\n'\\\\]|\\\\.|\\\\[Uux][\\da-fA-F]{1,8})'" , $ = '"(?:\\\\.|[^\\\\"\r\n])*"' ; s . languages . csharp = s . languages . extend ( "clike" , { string : [ { pattern : t ( "(^|[^$\\\\])<<0>>" , [ '@"(?:""|\\\\[^]|[^\\\\"])*"(?!")' ] ) , lookbehind : ! 0 , greedy : ! 0 } , { pattern : t ( "(^|[^@$\\\\])<<0>>" , [ $ ] ) , lookbehind : ! 0 , greedy : ! 0 } , { pattern : RegExp ( x ) , greedy : ! 0 , alias : "character" } ] , "class-name" : [ { pattern : t ( "(\\busing\\s+static\\s+)<<0>>(?=\\s*;)" , [ m ] ) , lookbehind : ! 0 , inside : v } , { pattern : t ( "(\\busing\\s+<<0>>\\s*=\\s*)<<1>>(?=\\s*;)" , [ h , w ] ) , lookbehind : ! 0 , inside : v } , { pattern : t ( "(\\busing\\s+)<<0>>(?=\\s*=)" , [ h ] ) , lookbehind : ! 0 } , { pattern : t ( "(\\b<<0>>\\s+)<<1>>" , [ d , f ] ) , lookbehind : ! 0 , inside : v } , { pattern : t ( "(\\bcatch\\s*\\(\\s*)<<0>>" , [ m ] ) , lookbehind : ! 0 , inside : v } , { pattern : t ( "(\\bwhere\\s+)<<0>>" , [ h ] ) , lookbehind : ! 0 } , { pattern : t ( "(\\b(?:is(?:\\s+not)?|as)\\s+)<<0>>" , [ y ] ) , lookbehind : ! 0 , inside : v } , { pattern : t ( "\\b<<0>>(?=\\s+(?!<<1>>)<<2>>(?:\\s*[=,;:{)\\]]|\\s+(?:in|when)\\b))" , [ w , u , h ] ) , inside : v } ] , keyword : p , number : /(?:\b0(?:x[\da-f_]*[\da-f]|b[01_]*[01])|(?:\B\.\d+(?:_+\d+)*|\b\d+(?:_+\d+)*(?:\.\d+(?:_+\d+)*)?)(?:e[-+]?\d+(?:_+\d+)*)?)(?:ul|lu|[dflmu])?\b/i , operator : />>=?|<<=?|[-=]>|([-+&|])\1|~|\?\?=?|[-+*/%&|^!=<>]=?/ , punctuation : /\?\.?|::|[{}[\];(),.:]/ } ) , s . languages . insertBefore ( "csharp" , "number" , { range : { pattern : /\.\./ , alias : "operator" } } ) , s . languages . insertBefore ( "csharp" , "punctuation" , { "named-parameter" : { pattern : t ( "([(,]\\s*)<<0>>(?=\\s*:)" , [ h ] ) , lookbehind : ! 0 , alias : "punctuation" } } ) , s . languages . insertBefore ( "csharp" , "class-name" , { namespace : { pattern : t ( "(\\b(?:namespace|using)\\s+)<<0>>(?:\\s*\\.\\s*<<0>>)*(?=\\s*[;{])" , [ h ] ) , lookbehind : ! 0 , inside : { punctuation : /\./ } } , "type-expression" : { pattern : t ( "(\\b(?:default|typeof|sizeof)\\s*\\(\\s*(?!\\s))(?:[^()\\s]|\\s(?!\\s)|<<0>>)*(?=\\s*\\))" , [ b ] ) , lookbehind : ! 0 , alias : "class-name" , inside : v } , "return-type" : { pattern : t ( "<<0>>(?=\\s+(?:<<1>>\\s*(?:=>|[({]|\\.\\s*this\\s*\\[)|this\\s*\\[))" , [ w , m ] ) , inside : v , alias : "class-name" } , "constructor-invocation" : { pattern : t ( "(\\bnew\\s+)<<0>>(?=\\s*[[({])" , [ w ] ) , lookbehind : ! 0 , inside : v , alias : "class-name" } , "generic-method" : { pattern : t ( "<<0>>\\s*<<1>>(?=\\s*\\()" , [ h , g ] ) , inside : { function : t ( "^<<0>>" , [ h ] ) , generic : { pattern : RegExp ( g ) , alias : "class-name" , inside : v } } } , "type-list" : { pattern : t ( "\\b((?:<<0>>\\s+<<1>>|where\\s+<<2>>)\\s*:\\s*)(?:<<3>>|<<4>>)(?:\\s*,\\s*(?:<<3>>|<<4>>))*(?=\\s*(?:where|[{;]|=>|$))" , [ d , f , h , w , p . source ] ) , lookbehind : ! 0 , inside : { keyword : p , "class-name" : { pattern : RegExp ( w ) , greedy : ! 0 , inside : v } , punctuation : /,/ } } , preprocessor : { pattern : /(^\s*)#.*/m
! function ( e ) { var t = /\b(?:alignas|alignof|asm|auto|bool|break|case|catch|char|char8_t|char16_t|char32_t|class|compl|concept|const|consteval|constexpr|constinit|const_cast|continue|co_await|co_return|co_yield|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|requires|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/ ; e . languages . cpp = e . languages . extend ( "c" , { "class-name" : [ { pattern : RegExp ( "(\\b(?:class|concept|enum|struct|typename)\\s+)(?!<keyword>)\\w+" . replace ( /<keyword>/g , function ( ) { return t . source } ) ) , lookbehind : ! 0 } , /\b[A-Z]\w*(?=\s*::\s*\w+\s*\()/ , /\b[A-Z_]\w*(?=\s*::\s*~\w+\s*\()/i , /\w+(?=\s*<(?:[^<>]|<(?:[^<>]|<[^<>]*>)*>)*>\s*::\s*\w+\s*\()/ ] , keyword : t , number : { pattern : /(?:\b0b[01']+|\b0x(?:[\da-f']+(?:\.[\da-f']*)?|\.[\da-f']+)(?:p[+-]?[\d']+)?|(?:\b[\d']+(?:\.[\d']*)?|\B\.[\d']+)(?:e[+-]?[\d']+)?)[ful]{0,4}/i , greedy : ! 0 } , operator : />>=?|<<=?|->|([-+&|:])\1|[?:~]|<=>|[-+*/%&|^!=<>]=?|\b(?:and|and_eq|bitand|bitor|not|not_eq|or|or_eq|xor|xor_eq)\b/ , boolean : /\b(?:true|false)\b/ } ) , e . languages . insertBefore ( "cpp" , "string" , { "raw-string" : { pattern : /R"([^()\\ ]{0,16})\([\s\S]*?\)\1"/ , alias : "string" , greedy : ! 0 } } ) , e . languages . insertBefore ( "cpp" , "class-name" , { "base-clause" : { pattern : /(\b(?:class|struct)\s+\w+\s*:\s*)[^;{}"'\s]+(?:\s+[^;{}"'\s]+)*(?=\s*[;{])/ , lookbehind : ! 0 , greedy : ! 0 , inside : e . languages . extend ( "cpp" , { } ) } } ) , e . languages . insertBefore ( "inside" , "operator" , { "class-name" : /\b[a-z_]\w*\b(?!\s*::)/i } , e . languages . cpp [ "base-clause" ] ) } ( Prism ) ;
! function ( n ) { n . languages . ignore = { comment : /^#.*/m , entry : { pattern : /\S(?:.*(?:(?:\\ )|\S))?/ , alias : "string" , inside : { operator : /^!|\*\*?|\?/ , regex : { pattern : /(^|[^\\])\[[^\[\]]*\]/ , lookbehind : ! 0 } , punctuation : /\// } } } , n . languages . gitignore = n . languages . ignore , n . languages . hgignore = n . languages . ignore , n . languages . npmignore = n . languages . ignore } ( Prism ) ;
! function ( e ) { var t = /\b(?:abstract|assert|boolean|break|byte|case|catch|char|class|const|continue|default|do|double|else|enum|exports|extends|final|finally|float|for|goto|if|implements|import|instanceof|int|interface|long|module|native|new|non-sealed|null|open|opens|package|permits|private|protected|provides|public|record|requires|return|sealed|short|static|strictfp|super|switch|synchronized|this|throw|throws|to|transient|transitive|try|uses|var|void|volatile|while|with|yield)\b/ , n = "(^|[^\\w.])(?:[a-z]\\w*\\s*\\.\\s*)*(?:[A-Z]\\w*\\s*\\.\\s*)*" , a = { pattern : RegExp ( n + "[A-Z](?:[\\d_A-Z]*[a-z]\\w*)?\\b" ) , lookbehind : ! 0 , inside : { namespace : { pattern : /^[a-z]\w*(?:\s*\.\s*[a-z]\w*)*(?:\s*\.)?/ , inside : { punctuation : /\./ } } , punctuation : /\./ } } ; e . languages . java = e . languages . extend ( "clike" , { "class-name" : [ a , { pattern : RegExp ( n + "[A-Z]\\w*(?=\\s+\\w+\\s*[;,=())])" ) , lookbehind : ! 0 , inside : a . inside } ] , keyword : t , function : [ e . languages . clike . function , { pattern : /(\:\:\s*)[a-z_]\w*/ , lookbehind : ! 0 } ] , number : /\b0b[01][01_]*L?\b|\b0x(?:\.[\da-f_p+-]+|[\da-f_]+(?:\.[\da-f_p+-]+)?)\b|(?:\b\d[\d_]*(?:\.[\d_]*)?|\B\.\d[\d_]*)(?:e[+-]?\d[\d_]*)?[dfl]?/i , operator : { pattern : /(^|[^.])(?:<<=?|>>>?=?|->|--|\+\+|&&|\|\||::|[?:~]|[-+*/%&|^!=<>]=?)/m , lookbehind : ! 0 } } ) , e . languages . insertBefore ( "java" , "string" , { "triple-quoted-string" : { pattern : /"""[ \t]*[\r\n](?:(?:"|"")?(?:\\.|[^"\\]))*"""/ , greedy : ! 0 , alias : "string" } } ) , e . languages . insertBefore ( "java" , "class-name" , { annotation : { pattern : /(^|[^.])@\w+(?:\s*\.\s*\w+)*/ , lookbehind : ! 0 , alias : "punctuation" } , generics : { pattern : /<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<(?:[\w\s,.&?]|<[\w\s,.&?]*>)*>)*>)*>/ , inside : { "class-name" : a , keyword : t , punctuation : /[<>(),.:]/ , operator : /[?&|]/ } } , namespace : { pattern : RegExp ( "(\\b(?:exports|import(?:\\s+static)?|module|open|opens|package|provides|requires|to|transitive|uses|with)\\s+)(?!<keyword>)[a-z]\\w*(?:\\.[a-z]\\w*)*\\.?" . replace ( /<keyword>/g , function ( ) { return t . source } ) ) , lookbehind : ! 0 , inside : { punctuation : /\./ } } } ) } ( Prism ) ;
Prism . languages . json = { property : { pattern : /"(?:\\.|[^\\"\r\n])*"(?=\s*:)/ , greedy : ! 0 } , string : { pattern : /"(?:\\.|[^\\"\r\n])*"(?!\s*:)/ , greedy : ! 0 } , comment : { pattern : /\/\/.*|\/\*[\s\S]*?(?:\*\/|$)/ , greedy : ! 0 } , number : /-?\b\d+(?:\.\d+)?(?:e[+-]?\d+)?\b/i , punctuation : /[{}[\],]/ , operator : /:/ , boolean : /\b(?:true|false)\b/ , null : { pattern : /\bnull\b/ , alias : "keyword" } } , Prism . languages . webmanifest = Prism . languages . json ;
! function ( e ) { var n = /[*&][^\s[\]{},]+/ , r = /!(?:<[\w\-%#;/?:@&=+$,.!~*'()[\]]+>|(?:[a-zA-Z\d-]*!)?[\w\-%#;/?:@&=+$.~*'()]+)?/ , t = "(?:" + r . source + "(?:[ \t]+" + n . source + ")?|" + n . source + "(?:[ \t]+" + r . source + ")?)" , a = "(?:[^\\s\\x00-\\x08\\x0e-\\x1f!\"#%&'*,\\-:>?@[\\]`{|}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]|[?:-]<PLAIN>)(?:[ \t]*(?:(?![#:])<PLAIN>|:<PLAIN>))*" . replace ( /<PLAIN>/g , function ( ) { return "[^\\s\\x00-\\x08\\x0e-\\x1f,[\\]{}\\x7f-\\x84\\x86-\\x9f\\ud800-\\udfff\\ufffe\\uffff]" } ) , d = "\"(?:[^\"\\\\\r\n]|\\\\.)*\"|'(?:[^'\\\\\r\n]|\\\\.)*'" ; function o ( e , n ) { n = ( n || "" ) . replace ( /m/g , "" ) + "m" ; var r = "([:\\-,[{]\\s*(?:\\s<<prop>>[ \t]+)?)(?:<<value>>)(?=[ \t]*(?:$|,|]|}|(?:[\r\n]\\s*)?#))" . replace ( /<<prop>>/g , function ( ) { return t } ) . replace ( /<<value>>/g , function ( ) { return e } ) ; return RegExp ( r , n ) } e . languages . yaml = { scalar : { pattern : RegExp ( "([\\-:]\\s*(?:\\s<<prop>>[ \t]+)?[|>])[ \t]*(?:((?:\r?\n|\r)[ \t]+)\\S[^\r\n]*(?:\\2[^\r\n]+)*)" . replace ( /<<prop>>/g , function ( ) { return t } ) ) , lookbehind : ! 0 , alias : "string" } , comment : /#.*/ , key : { pattern : RegExp ( "((?:^|[:\\-,[{\r\n?])[ \t]*(?:<<prop>>[ \t]+)?)<<key>>(?=\\s*:\\s)" . replace ( /<<prop>>/g , function ( ) { return t } ) . replace ( /<<key>>/g , function ( ) { return "(?:" + a + "|" + d + ")" } ) ) , lookbehind : ! 0 , greedy : ! 0 , alias : "atrule" } , directive : { pattern : /(^[ \t]*)%.+/m , lookbehind : ! 0 , alias : "important" } , datetime : { pattern : o ( "\\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*)?)?" ) , lookbehind : ! 0 , alias : "number" } , boolean : { pattern : o ( "true|false" , "i" ) , lookbehind : ! 0 , alias : "important" } , null : { pattern : o ( "null|~" , "i" ) , lookbehind : ! 0 , alias : "important" } , string : { pattern : o ( d ) , lookbehind : ! 0 , greedy : ! 0 } , number : { pattern : o ( "[+-]?(?:0x[\\da-f]+|0o[0-7]+|(?:\\d+(?:\\.\\d*)?|\\.?\\d+)(?:e[+-]?\\d+)?|\\.inf|\\.nan)" , "i" ) , lookbehind : ! 0 } , tag : r , important : n , punctuation : /---|[:[\]{}\-,|>?]|\.\.\./ } , e . languages . yml = e . languages . yaml } ( Prism ) ;