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

Prevent ternary operator from incorrectly matching a nullcoalesce #50

Closed levibuzolic closed 5 years ago

levibuzolic commented 5 years ago

Small tweak to the ternary regex to make sure it doesn't match ?? which is used for nullcoalesce.

Before

image

You can see syntax highlighting is broken after the ??.

After

image

michaelgmcd commented 5 years ago

Thanks for the PR! Sorry for the delay, but hopefully I'll be able to give this a quick smoke test, merge, and release by the end of the week.

levibuzolic commented 5 years ago

@michaelgmcd did you get a chance to look at this?

michaelgmcd commented 5 years ago

I did. Looks great!