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

Missing highlight on async functions when returning objects #171

Closed
robertrossmann opened this issue Apr 29, 2016 · 2 comments
Closed

Missing highlight on async functions when returning objects #171

robertrossmann opened this issue Apr 29, 2016 · 2 comments

Comments

@robertrossmann
Copy link
Contributor

I have found some cases where the async keyword is not highlighted properly, attaching code snippet - please see the comments inline.

function getObject() {  
  return {
    // No async highlight for function shorthands
    async doStuff() {},
    // No async highlight for function declarations
    doOtherStuff: async doOtherStuff() {},
    // async is highlighted properly for function expressions
    doDifferent: async function() {}
    // async is highlighted properly for arrow function expressions
    doElse: async () => {}
  }
}

Changing return to an assignment (const obj = { ...) fixes the highlight for the async keyword.

I am attaching a screenshot from my editor for brevity, since github shows the highlights properly for the snippet above, which might be confusing. 😄

missing highlights for async

Here is a screenshot of what happens when I change the return to an assignment:

working highlights for async

@robertrossmann robertrossmann changed the title Missing highlight on async function when returning objects Missing highlight on async functions when returning objects Apr 29, 2016
@gandm gandm closed this as completed in 548a895 Apr 29, 2016
@gandm
Copy link
Owner

gandm commented Apr 29, 2016

Thanks for reporting this. Should be fixed now.

@robertrossmann
Copy link
Contributor Author

That was fast! Tested and all good now. Thanks!

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

No branches or pull requests

2 participants