Skip to content
Permalink
Browse files
PHP extras: Improved scope and this (#3243)
  • Loading branch information
RunDevelopment committed Dec 10, 2021
1 parent f22ea9f commit 59ef51dbc3c7787611c421808e657ae03d113557
Showing with 7 additions and 4 deletions.
  1. +6 −3 components/prism-php-extras.js
  2. +1 −1 components/prism-php-extras.min.js
@@ -1,11 +1,14 @@
Prism.languages.insertBefore('php', 'variable', {
'this': /\$this\b/,
'this': {
pattern: /\$this\b/,
alias: 'keyword'
},
'global': /\$(?:GLOBALS|HTTP_RAW_POST_DATA|_(?:COOKIE|ENV|FILES|GET|POST|REQUEST|SERVER|SESSION)|argc|argv|http_response_header|php_errormsg)\b/,
'scope': {
pattern: /\b[\w\\]+::/,
inside: {
keyword: /parent|self|static/,
punctuation: /::|\\/
'keyword': /\b(?:parent|self|static)\b/,
'punctuation': /::|\\/
}
}
});

Some generated files are not rendered by default. Learn more.

0 comments on commit 59ef51d

Please sign in to comment.