Skip to content

Backtick in a regex literal confuses the syntax highlighting #1055

@atheck

Description

@atheck

JavaScript and TypeScript Nightly version: 5.9.0-dev.20250702

Code

function foo(value: string): void {
	const regex = /sql`/gu;

	const matches = value.matchAll(regex);
	const template = `sql\n${value}`;
}

With backtick:

Image

Without backtick:

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions