diff options
Diffstat (limited to 'public/prism/prism-php.min.js')
| -rw-r--r-- | public/prism/prism-php.min.js | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/public/prism/prism-php.min.js b/public/prism/prism-php.min.js index 72aed84..050bc84 100644 --- a/public/prism/prism-php.min.js +++ b/public/prism/prism-php.min.js @@ -1,5 +1,5 @@ -!(function (a) { - var e = /\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/, +!(function (e) { + var a = /\/\*[\s\S]*?\*\/|\/\/.*|#(?!\[).*/, t = [ { pattern: /\b(?:false|true)\b/i, alias: 'boolean' }, { pattern: /(::\s*)\b[a-z_]\w*\b(?!\s*\()/i, greedy: !0, lookbehind: !0 }, @@ -16,9 +16,9 @@ n = /<?=>|\?\?=?|\.{3}|\??->|[!=]=?=?|::|\*\*=?|--|\+\+|&&|\|\||<<|>>|[?~]|[/^|%*&<>.+-]=?/, s = /[{}\[\](),:;]/; - a.languages.php = { + e.languages.php = { delimiter: { pattern: /\?>$|^<\?(?:php(?=\s)|=)?/i, alias: 'important' }, - comment: e, + comment: a, variable: /\$+(?:\w+\b|(?=\{))/, package: { pattern: @@ -53,7 +53,7 @@ }, { pattern: - /(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|object|self|static|string|void)\b/i, + /(\)\s*:\s*(?:\?\s*)?)\b(?:array(?!\s*\()|bool|callable|(?:false|null)(?=\s*\|)|float|int|iterable|mixed|never|object|self|static|string|void)\b/i, alias: 'return-type', greedy: !0, lookbehind: !0, @@ -79,12 +79,12 @@ /\bclass\b/i, { pattern: - /((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|new|or|parent|print|private|protected|public|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i, + /((?:^|[^\s>:]|(?:^|[^-])>|(?:^|[^:]):)\s*)\b(?:abstract|and|array|as|break|callable|case|catch|clone|const|continue|declare|default|die|do|echo|else|elseif|empty|enddeclare|endfor|endforeach|endif|endswitch|endwhile|enum|eval|exit|extends|final|finally|fn|for|foreach|function|global|goto|if|implements|include|include_once|instanceof|insteadof|interface|isset|list|match|namespace|never|new|or|parent|print|private|protected|public|readonly|require|require_once|return|self|static|switch|throw|trait|try|unset|use|var|while|xor|yield|__halt_compiler)\b/i, lookbehind: !0, }, ], 'argument-name': { - pattern: /([(,]\s+)\b[a-z_]\w*(?=\s*:(?!:))/i, + pattern: /([(,]\s*)\b[a-z_]\w*(?=\s*:(?!:))/i, lookbehind: !0, }, 'class-name': [ @@ -177,7 +177,7 @@ pattern: /\{\$(?:\{(?:\{[^{}]+\}|[^{}]+)\}|[^{}])+\}|(^|[^\\{])\$+(?:\w+(?:\[[^\r\n\[\]]+\]|->\w+)?)/, lookbehind: !0, - inside: a.languages.php, + inside: e.languages.php, }, r = [ { @@ -223,7 +223,7 @@ inside: { interpolation: l }, }, ]; - a.languages.insertBefore('php', 'variable', { + e.languages.insertBefore('php', 'variable', { string: r, attribute: { pattern: @@ -234,7 +234,7 @@ pattern: /^(#\[)[\s\S]+(?=\]$)/, lookbehind: !0, inside: { - comment: e, + comment: a, string: r, 'attribute-class-name': [ { @@ -261,16 +261,15 @@ }, }, }), - a.hooks.add('before-tokenize', function (e) { - if (/<\?/.test(e.code)) { - a.languages['markup-templating'].buildPlaceholders( - e, + e.hooks.add('before-tokenize', function (a) { + /<\?/.test(a.code) && + e.languages['markup-templating'].buildPlaceholders( + a, 'php', /<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/g ); - } }), - a.hooks.add('after-tokenize', function (e) { - a.languages['markup-templating'].tokenizePlaceholders(e, 'php'); + e.hooks.add('after-tokenize', function (a) { + e.languages['markup-templating'].tokenizePlaceholders(a, 'php'); }); })(Prism); |
