Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax highlighting breaks inside square brackets in v2.43.0 #261

Closed
markuso opened this issue Oct 8, 2016 · 3 comments
Closed

Syntax highlighting breaks inside square brackets in v2.43.0 #261

markuso opened this issue Oct 8, 2016 · 3 comments
Labels

Comments

@markuso
Copy link

markuso commented Oct 8, 2016

When using statements inside an array (square brackets), like using if or while statements within an array of functions, then the syntax highlighting breaks.

Here's how this sample example should look:

image

But when the same function is part of an array, syntax highlighting breaks at the if statement:

image

Look what happens if I remove the left angle bracket from the if statement below:

image

Even in ES6 syntax version it breaks:

image

Here's the sample code for quick test:

var arrayOfFunctions = [
  function (callback) {
    var num = 0;
    if (num <= 0) {
      return callback(null);
    }
    return callback(num);
  },
  function (callback) {
    var num = 0;
    if (num <= 0) {
      return callback(null);
    }
    return callback(num);
  }
];
@gandm
Copy link
Owner

gandm commented Oct 9, 2016

Thanks. It is a regression caused by the recent change. I'll take a look.

@gandm gandm added the bug label Oct 9, 2016
@gandm
Copy link
Owner

gandm commented Oct 9, 2016

Try 2.44.0

@gandm gandm closed this as completed Oct 9, 2016
@markuso
Copy link
Author

markuso commented Oct 9, 2016

Works great now and all the syntax highlighting is back. Thank you so much @gandm 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants