atom / language-javascript

JavaScript language package for Atom
Other
194 stars 236 forks source link

`import.meta` inside of a template literal interpolation. #544

Open dannyfritz opened 6 years ago

dannyfritz commented 6 years ago

Prerequisites

Description

import.meta in a string breaks string highlighting.

Steps to Reproduce

atom_2017-11-23_10-27-02

Expected behavior: I expected the string context to terminate at the next `.

Actual behavior: The string context doesn't end.

Reproduces how often: 100% of the time I use import.meta in a template literal.

Versions

C:\Users\danny
λ atom --version

Atom    : 1.22.1
Electron: 1.6.15
Chrome  : 56.0.2924.87
Node    : 7.4.0

C:\Users\danny
λ apm --version
apm  1.18.8
npm  3.10.10
node 6.9.5 x64
python
git 2.15.0.windows.1
visual studio 2015

Windows 10 x64 Creator's Update

Additional Information

NA

50Wliu commented 6 years ago

It looks like import.meta is still in Editor's Draft and not supported by any stable web browsers. As such, language-javascript will not be supporting it until it is more widely supported and/or it advances to stage 4 in the TC39 process.

franciscop commented 4 years ago

It seems like import.meta is now part of the standard but it's not supported by Atom since it breaks syntax highlighting of subsequent blocks:

image