Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax highlighting fails for DNF in PHP docblocks #16

Open
alexr00 opened this issue Apr 8, 2024 · 2 comments
Open

Syntax highlighting fails for DNF in PHP docblocks #16

alexr00 opened this issue Apr 8, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@alexr00
Copy link

alexr00 commented Apr 8, 2024

Description

The syntax highlighting in docblocks for PHP code fails when a parameter has DNF in the type declaration, for example:

/**
 * An example function.
 * @param string $a The first argument.
 * @param ClassA|(ClassB&ClassC) $b The second argument.
 * @param int $c The third argument.
 * @return void
 */
function example(string $a, ClassA|(ClassB&ClassC) $b, int $c) {
  // no-op
}

In this case, text after ClassA|(ClassB&ClassC) continues to be highlighted as if it continues as the type declaration, until the end of the docblock.

Related links:

Expected behavior: [What you expect to happen]

Syntax highlighting for DNF parameters in a doc block works as well as it does in the function signature

Actual behavior: [What actually happens]

image

Reproduces how often: [What percentage of the time does it reproduce?]

100%

Versions

VS Code version: Code 1.88.0, which is using commit 5e8f000.

Additional Information

[Any additional information, configuration or data that might be necessary to reproduce the issue.]

Originally from @jameswatts in microsoft/vscode#209758

@RedCMD
Copy link

RedCMD commented Apr 9, 2024

the closing ) must be followed by [] (atm)
image
image

@KapitanOczywisty
Copy link
Owner

#6 might help, I will try to merge soon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants