Skip to content

Multiline function arguments in arrow functions aren't colored as arguments #791

@rmtracey

Description

@rmtracey

TS and JS Grammar Extension version: 0.0.53 / latest

Code

const test = (foo, bar) => `${foo} ${bar}`

const test2 = (
  foo,
  bar
) => `${foo} ${bar}`

function test3(foo, bar) {
  return `${foo} ${bar}`
}
function test4(
  foo,
  bar
) {
  return `${foo} ${bar}`
}

(Interesting, seems as though GitHub does the same thing)

Screenshot:
image

Like the title says, if the arguments of an arrow function span multiple lines, they lose the proper argument syntax highlighting. The issue doesn't occur for regular functions. I've seen a few similar issues to this one, but most of them say something about the issue being fixed with #552. However, I'm seeing the problem even on the latest grammar.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions