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

Highlighting php variables inside sql string breaks when the variable is quoted #21

Open
M393 opened this issue Nov 8, 2024 · 0 comments

Comments

@M393
Copy link

M393 commented Nov 8, 2024

Description

Syntax highlighting wrong for php variables inside heredoc-sql.

Steps to Reproduce

<?php
$schema = 'test';
$id = 1;
$sql = <<<SQL
    SELECT * FROM `{$schema}`.`test` WHERE `id` = '$id';
    SQL;
$sql = <<<SQL
    SELECT * FROM {$schema}.`test` WHERE `id` = $id;
    SQL;
$sql = "SELECT * FROM `{$schema}`.`test` WHERE `id` = '$id'";

image

Expected behavior: PHP variables in a heredoc string should also be highlighted when quoted.

Actual behavior: Variables are only correctly highlighted when using a PHP string with double quotes.
With heredoc there is only syntax highlighting if the value is not quoted.

Reproduces how often: 100%

Versions

Version: 1.95.2 (user setup)
Commit: e8653663e8840adaf45af01eab5c627a5af81807
Date: 2024-11-07T11:07:22.054Z
Electron: 32.2.1
ElectronBuildId: 10427718
Chromium: 128.0.6613.186
Node.js: 20.18.0
V8: 12.8.374.38-electron.0
OS: Windows_NT x64 10.0.19045

Additional Information

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant