Skip to content

jsFuncArgRest break if there's no space before closing parentheses #497

Closed
@arch-mage

Description

@arch-mage

With this

function something(arg1, ...rest) {
   return;
}

that closing parenthesis will be highlighted by jsFuncArgRest.

but with this:

function something(arg1, ...rest ) { // notice space after 'rest'
   return;
}

that parenthesis is become jsFuncParens, which I think should be.

If I'm not mistaken, maybe the causing problem is the regular expression in this line:

/\%(\.\.\.[a-zA-Z_$][0-9a-zA-Z_$]*\))/

I've tried to remove one parenthesis in that double parenthesis, so it become like this:

/\%(\.\.\.[a-zA-Z_$][0-9a-zA-Z_$]*\)/

And it works.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions