Skip to content

Commit

Permalink
PHP Extras: Add word boundary after global keywords + don't use captu…
Browse files Browse the repository at this point in the history
…res if not needed
  • Loading branch information
Golmote committed Oct 22, 2017
1 parent 0fe4cf6 commit 9049a2a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions components/prism-php-extras.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
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)/,
'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: /(::|\\)/
keyword: /static|self|parent/,
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 9049a2a

Please sign in to comment.