Skip to content

Newlines break SQL detection in PHP syntax highlighting #234892

Closed
@Virakal

Description

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.95.3
  • OS Version: Windows 10

Steps to Reproduce:

Create PHP file with the following contents:

<?php

$q1 = "   SELECT * FROM table";

$q2 = "
    SELECT *
    FROM table
";

Note that $q1 gets correctly syntax-highlighted as SQL despite leading whitespace, but $q2 (much cleaner layout for larger queries imo) is treated as a regular string.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

feature-requestRequest for new features or functionalitygrammarSyntax highlighting grammar

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions