michaelgmcd / vscode-language-babel

VSCode syntax highlighting for today's JavaScript
https://marketplace.visualstudio.com/items?itemName=mgmcdermott.vscode-language-babel
MIT License
131 stars 17 forks source link

Regular expressions with dotAll flag not highlighted correctly #79

Open TheLastZombie opened 3 years ago

TheLastZombie commented 3 years ago

Describe the issue With the Babel JavaScript extension enabled, regular expressions that utilize the s / dotAll flag are not highlighted as such.

Sample Code to Reproduce

RegExp(/\n\//)  // without flags, displayed correctly
RegExp(/\n\//g) // valid flag other than s, displayed correctly
RegExp(/\n\//a) // invalid flag, displayed correctly (same as without extension)
RegExp(/\n\//s) // dotAll flag, displayed incorrectly

Screenshot of Current Behavior image

Screenshot of Expected Behavior image