Skip to content

[JavaScript] RegExp with combination of named capturing group and v flag breaks syntax coloring #1022

@anthonyvdotbe

Description

@anthonyvdotbe

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

  • VS Code Version: 1.87.2 (user setup) 863d2581ecda6849923a2118d93a088b0745d9d6
  • OS Version: Windows_NT x64 10.0.22631

Steps to Reproduce:

  1. create a file with the following contents:
const match = /(?<n>issue)/u.exec("issue");
// comment
const num = 42;
  1. change the u flag to the v flag:
const match = /(?<n>issue)/v.exec("issue");
// comment
const num = 42;

Expected: syntax coloring works
Actual: syntax coloring breaks in step 2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions