microsoft / vscode

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

[php] syntax highlighter issue with SQL #22105

Closed Gonkers closed 7 years ago

Gonkers commented 7 years ago

The PHP syntax highlighter seems to have a bug. It attempts to syntax highlight SQL code within PHP strings, but if there is a SQL comment on the last line of the string, the highlighter gets confused... image

Steps to Reproduce:

  1. Create a php file.
  2. Add the following code...
        $sql = "SELECT value1
                FROM table_name t
                WHERE t.column1 = 3
                  --AND t.column2 = 'value';"
aeschli commented 7 years ago

This issue was moved to atom/language-php#187