microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
163.63k stars 29.04k forks source link

Bug in PHP syntax highlighting with comments #32731

Closed ngreenwood6 closed 7 years ago

ngreenwood6 commented 7 years ago
Extension Author (truncated) Version
xml Dot 1.9.2
vscode-docker Pet 0.0.16
gitlens eam 4.3.3
php-debug fel 1.11.1
vscode-auto-open-markdown-preview hnw 0.0.4
mdhelper jos 0.0.11
php-symbols lin 2.1.0
Go luk 0.6.63
dotenv mik 1.0.0
prettify-json moh 0.0.3
php-docblocker nei 1.2.0
markdown-preview-enhanced shd 0.2.5

With the latest update to VS Code we are running into issues with the code highlighting with comments.

Steps to Reproduce:

  1. Insert the following code and set the syntax as PHP and you will see that code highlighting is not working:
    /**
    * echos test
    * @return void(nothing to see here)
    */
    function test() {
    echo 'test';
    }
  2. Now if you put as space between void and (nothing to see here), the code highlighting works.

I understand that this isn't really the correct way to do comments in docblocks, but this is a legacy codebase and it was working in the prior version. I don't think that these comments should stop it from highlighting the code anyways.

Reproduces without extensions: Yes

roblourens commented 7 years ago

This should actually be fixed in Insiders

ngreenwood6 commented 7 years ago

@roblourens I am not familiar with Insiders? Can you elaborate on what that means?

roblourens commented 7 years ago

The Insiders version is updated nightly, and you can get it here: https://code.visualstudio.com/insiders

Fixes like this one are available there, and will be released in the next stable update early next month, 1.16.0.

ngreenwood6 commented 7 years ago

Thanks @roblourens