Skip to content

Specific JS construct breaks syntax highlighting #988

@YellowAfterlife

Description

@YellowAfterlife

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.81.0 / 6445d93c81ebe42c4cbd7a60712e0b17d9463e97
  • OS Version: Windows_NT x64 10.0.19045

Snippet:

function one() {
	return (
		{
			toString: () => {
				return "Something";
			}
		}
	);
}

function two() {
	return "??";
}

Screenshot:
image

Steps to Reproduce:

  1. Paste the following into a fresh file with JavaScript set as a language
  2. Observe keyword highlighting not working correctly for any functions following function one

This specific nesting (a lambda function with a block inside a property of an object inside parenthesis in a return statement) triggers the effect.

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