gandm / language-babel

ES2017, flow, React JSX and GraphQL grammar and transpilation for ATOM
https://atom.io/packages/language-babel
MIT License
476 stars 83 forks source link

Highlight for switch case not displaying properly #354

Closed atilacamurca closed 7 years ago

atilacamurca commented 7 years ago

Consider the following code:

const value = 'a'
switch (value) {
    case 'a':
        console.log('a')
        var c = 4
        break
    case 'b':
        console.log('b')
        break
    default:
        return `Value ${value} not supported`
}

The image bellow shows case 'b': not properly highlighted.

babel-highlight

The Syntax Theme is Monokai, but even with other themes the same happens.

Hint: if I remove the declaration var c = 4 the problem does not appear.

gandm commented 7 years ago

Try 2.57.6

atilacamurca commented 7 years ago

Works great!

Thanks for taking your time to work on this package.