michaelgmcd / vscode-language-babel

VSCode syntax highlighting for today's JavaScript
https://marketplace.visualstudio.com/items?itemName=mgmcdermott.vscode-language-babel
MIT License
131 stars 17 forks source link

Syntax highlighting breaks when using async + multiple line function params #19

Closed lrholmes closed 6 years ago

lrholmes commented 6 years ago

To recreate:

const checkPermissions = async (
  ctx,
  nodeId,
  nodeType
) => {
  const userId = getUserId(ctx)
  if (nodeType === 'account') { // correctly highlighted 
  }

  if (nodeType === 'user') { // incorrectly highlighted 
  }
}

Image:

screen shot 2018-01-15 at 11 38 02

Something to also note is that adding a semi-colon to the first line (userId) will break the first if statement's highlighting as well.

Syntax highlighting goes back to normal if removing the async keyword or by moving all function params onto one line.

michaelgmcd commented 6 years ago

I believe this has been fixed in the latest version. Please update and let me know if it's still an issue.

lrholmes commented 6 years ago

Indeed it is fixed - thank you!