Skip to content

Javascript highlighting fails when less than symbol ("<") is first char #752

Closed
@mattrabe

Description

@mattrabe
  • VSCode Version: 1.35.0
  • OS Version: macOS 10.14.5

Steps to Reproduce:

  1. Set Language to "Javascript"

Screen Shot 2019-06-19 at 7 33 25 AM

  1. Create a line of code that performs a less-than comparison where the right-side starts with a letter, such as const fooBar = foo < bar. This will work fine. But now insert a line break before the less-than symbol. Syntax highlighting will interpret this second line incorrectly, and will color it and numerous lines after it in all-red.

Real-world use-case is a much longer line of code which has been broken onto multiple lines for readability/linting, but this example easily reproduces the behavior.

Here is a real-world example of failing highlighting:

Screen Shot 2019-06-19 at 7 32 32 AM

And here is the same line of code, but with the line break removed (no longer showing broken highlighting):

Screen Shot 2019-06-19 at 7 32 03 AM

Metadata

Metadata

Assignees

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