You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the issue
When a lambda function is used as a parameter, it breaks down if it has a use section after its parameters.
Comments break inside object method calls (but apparently not regular function calls).
Which language seems to have the issue?
PHP
Are you using highlight or highlightAuto?
I noticed it on Stack Overflow, and confirmed with highlightElement in your demo pages.
Sample Code to Reproduce
Expected behavior
funky(
'string',
function(array$x) use ($y) {
# $y above fails to parse as a var, and this comment is broken$x[] = $y
return $x;
}
);
$o->m([
'foo',
# this comment highlights keywords like include and 'string' literals'bar',
]);