Skip to content

Commit

Permalink
PHP extras: Improved scope and this (#3243)
Browse files Browse the repository at this point in the history
  • Loading branch information
RunDevelopment committed Dec 10, 2021
1 parent f22ea9f commit 59ef51d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions components/prism-php-extras.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': /::|\\/
}
}
});
2 changes: 1 addition & 1 deletion components/prism-php-extras.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 59ef51d

Please sign in to comment.