oceanic-next-syntax icon indicating copy to clipboard operation
oceanic-next-syntax copied to clipboard

Absence of parameter parenthesis breaks highlighting

Open dcalhoun opened this issue 7 years ago • 1 comments

The color of certain syntax highlights changes depending on whether or not you have a parenthesis around parameters for an arrow function. Namely, const/let/var are erroneously displayed in white, when they should be orange.

Environment

  • Oceanic Next 1.0.0
  • Atom 1.23.1
  • macOS 10.13.2

Example

oceanic-next-colors

Test Case

// Orange variables
export const route = (props) => {
  const { source } = props;

  if (source) {
    return true;
  } else {
    return false;
  }
};

// White variables
export const route = props => {
  const { source } = props;

  if (source) {
    return true;
  } else {
    return false;
  }
};

dcalhoun avatar Dec 24 '17 03:12 dcalhoun

This looks like a bug in gandm/language-babel. The first function's body has the extra .syntax--function class, which it probably shouldn't have.

mmermerkaya avatar Jan 05 '18 14:01 mmermerkaya