Microsoft/monaco-editor

TS regex missed by Monarch grammar

Open

#2,512 opened on Jun 2, 2021

View on GitHub
 (0 comments) (0 reactions) (0 assignees)JavaScript (14,836 stars) (1,283 forks)batch import
buggrammarshelp wantedtypescript

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