update to higlight.js 8.4
This commit is contained in:
@@ -2,11 +2,12 @@
|
||||
Language: PHP
|
||||
Author: Victor Karamzin <Victor.Karamzin@enterra-inc.com>
|
||||
Contributors: Evgeny Stepanischev <imbolk@gmail.com>, Ivan Sagalaev <maniac@softwaremaniacs.org>
|
||||
Category: common
|
||||
*/
|
||||
|
||||
function(hljs) {
|
||||
var VARIABLE = {
|
||||
className: 'variable', begin: '(\\$|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*'
|
||||
className: 'variable', begin: '\\$+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*'
|
||||
};
|
||||
var PREPROCESSOR = {
|
||||
className: 'preprocessor', begin: /<\?(php)?|\?>/
|
||||
@@ -64,6 +65,10 @@ function(hljs) {
|
||||
},
|
||||
PREPROCESSOR,
|
||||
VARIABLE,
|
||||
{
|
||||
// swallow class members to avoid parsing them as keywords
|
||||
begin: /->+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/
|
||||
},
|
||||
{
|
||||
className: 'function',
|
||||
beginKeywords: 'function', end: /[;{]/, excludeEnd: true,
|
||||
@@ -88,10 +93,7 @@ function(hljs) {
|
||||
beginKeywords: 'class interface', end: '{', excludeEnd: true,
|
||||
illegal: /[:\(\$"]/,
|
||||
contains: [
|
||||
{
|
||||
beginKeywords: 'extends implements',
|
||||
relevance: 10
|
||||
},
|
||||
{beginKeywords: 'extends implements'},
|
||||
hljs.UNDERSCORE_TITLE_MODE
|
||||
]
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user