Bug: async not highlighted in object method shorthand notation

If an async function is declared using the object method shorthand (i.e. implicit property name), the keyword async is not highlighted:

Related CodeMirror issue: https://github.com/codemirror/CodeMirror/issues/5396

1 Like

We’re pretty optimistic about CodeMirror 6’s Lezer parser system being a boon to syntax highlighting cases like this. For full accuracy, there’s also tree-sitter, but it’s a WebAssembly cross-compiled system.

1 Like

@tom Is it fair to say that minor CM issues should/will be ignored until then, because dealing with them would be an unproportional effort?

It kind of depends on the issue - quite a few of the CM issues that we’ve run into in Observable have been fixed upstream, either through the team’s efforts, Marijn, or friendly folks in the forum. Given the nature of the existing CM parser, though, some things are nearly impossible to do, like highlighting hoisted variables, and others are fairly simple to fix, it all depends on the issue.