atom / language-javascript

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

RegExp contents are not highlighted #627

Closed RomanFro closed 6 years ago

RomanFro commented 6 years ago

Prerequisites

Description

RegExp contents are not highlighted in switch.

Code to reproduce

'use strict';

switch (true) {
    case /^hello$/.test('hello'): {
        console.log('world');
    }
}

Expected behavior: Nice highlighting.

Actual behavior: RegExp contents are not highlighted.

Reproduces how often: 100%

Versions

Atom : 1.32.0 Electron: 2.0.9 Chrome : 61.0.3163.100 Node : 8.9.3

rsese commented 6 years ago

Thanks for the report! Just to clarify, do you have Tree-sitter enabled (the setting is Settings > Core > Enable Tree Sitter Parsers) and can you share a screenshot of what you see in Atom? Also, can you update to the latest hotfix release (currently 1.32.2) and let us know if you still see the same issue?

This is what I see in 1.32.2:

regex-js

RomanFro commented 6 years ago

@rsese tree-sitter was disabled because of #600. When I enabled it - highlighting started to work normally.