Microsoft/monaco-editor

TS regex missed by Monarch grammar

Open

#2,512 opened on Jun 2, 2021

 (0 comments) (0 reactions) (0 assignees)JavaScript (4,064 forks)batch import
buggrammarshelp wantedtypescript

Repository metrics

Stars
 (46,002 stars)
PR merge metrics
 (PR metrics pending)

Description

Extracted from https://github.com/microsoft/TypeScript-Website/issues/1870

const x = true ? /^([^"]*)"/ : /^([^']*)'/

/^([^"]*)"/ is not identified as a regex by the TS Monarch grammar, which breaks bracket matching:

image

Contributor guide