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 (1,283 forks)batch import
buggrammarshelp wantedtypescript

Repository metrics

Stars
 (14,836 stars)
PR merge metrics
 (Avg merge 6h 26m) (15 merged PRs in 30d)

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