diff --git a/docs/css-classes-reference.rst b/docs/css-classes-reference.rst index 70d45e4dc4..9cea743642 100644 --- a/docs/css-classes-reference.rst +++ b/docs/css-classes-reference.rst @@ -70,6 +70,8 @@ in mind so a better choice (for best theme support) might possibly be ``string`` +--------------------------+-------------------------------------------------------------+ | title.function | name of a function | +--------------------------+-------------------------------------------------------------+ +| title.function.invoke | name of a function (when being invoked) | ++--------------------------+-------------------------------------------------------------+ | params | block of function arguments (parameters) at the | | | place of declaration | +--------------------------+-------------------------------------------------------------+ diff --git a/src/languages/php.js b/src/languages/php.js index 4832f88d71..371ef2ae78 100644 --- a/src/languages/php.js +++ b/src/languages/php.js @@ -330,7 +330,7 @@ export default function(hljs) { regex.lookahead(/(?=\()/) ], scope: { - 3: "function.title.invoke", + 3: "title.function.invoke", } }; diff --git a/test/markup/php/functions.expect.txt b/test/markup/php/functions.expect.txt index 946c41bd67..f6bc43f49a 100644 --- a/test/markup/php/functions.expect.txt +++ b/test/markup/php/functions.expect.txt @@ -11,11 +11,11 @@ * Function invoke */ $date = new DateTimeImmutable (); -$date->format('Y-m-d'); +$date->format('Y-m-d'); -DateTimeImmutable::createFromMutable(new \DateTime('now')); +DateTimeImmutable::createFromMutable(new \DateTime('now')); -str_contains (\strtoupper(substr('abcdef', -2), 'f')); +str_contains (\strtoupper(substr('abcdef', -2), 'f')); /** * Function declaration @@ -39,5 +39,5 @@ DateTimeImmutable::createFromMutable /** * First-class Callable Syntax */ -$fun = mb_strlen(); +$fun = mb_strlen(); $fun(); diff --git a/test/markup/php/strings.expect.txt b/test/markup/php/strings.expect.txt index 56f3428e3b..8a9c4dd8f5 100644 --- a/test/markup/php/strings.expect.txt +++ b/test/markup/php/strings.expect.txt @@ -12,12 +12,12 @@ MSG); // heredoc syntax -var_dump(<<<SQL +var_dump(<<<SQL SELECT * FROM table SQL); -var_dump(<<<SQL +var_dump(<<<SQL SELECT * FROM table SQL);