atom / language-javascript

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

Problem with presence of jsdoc-style comments #663

Closed brettz9 closed 5 years ago

brettz9 commented 5 years ago

Prerequisites

Description

Have recently begun experiencing a quite distracting problem with the presence of jsdoc blocks in a file.

Steps to Reproduce

  1. Save a file with these contents:
/**
*
*/

const test1 = 1, test2 = 2;

module.exports = {
  test1,
  test2,
};
  1. Open the file in Atom in safe mode

Expected behavior:

Syntax coloring should be appropriate, e.g., the test1 and test2 variables should be in white when declared and in shorthand syntax as should be the curly brackets.

Actual behavior:

The items are grayed out.

Note that the problem does not occur when there is no preceding jsdoc block, or even the preceding is a comment but it is a regular multiline comment (/* ... */) without the extra asterisk (as in /** ... */).

Reproduces how often:

It always occurs, except when hitting return next to the item and causing a reflow.

Versions

Atom : 1.40.1 Electron: 3.1.10 Chrome : 66.0.3359.181 Node : 10.2.0

apm 2.4.3 npm 6.2.0 node 10.2.1 x64 atom 1.40.1 python 2.7.15 git 2.21.0

Mac OSX 10.15 Catalina

Additional Information

When I disable language-javascript and just rely on language-typescript, the problem does not occur.

rsese commented 5 years ago

Thanks for the report! I think this might have been fixed, can you confirm if you can reproduce with the latest beta (currently 1.41.0-beta1)?

brettz9 commented 5 years ago

Yes, it is indeed fixed on 1.41.0-beta1, thanks!