Skip to content

Broken syntax coloring for jsx tag with < on own line #825

Description

  • VSCode Version: 1.44.2
  • OS Version: macOS 10.15.4 Catalina

Steps to Reproduce:

  1. Create new JSX file and have React available
  2. Input this text, for example:
import React from 'react'

const demo =
        <div>
            <
                div className="foo">
            </div>
        </div>;

Actual output:
image

I believe the empty line between the nested div's opening chevron and the element's name is to blame. Without the empty line:

image

This also occurs in .tsx files.

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

Edit: apparently, github's parser also doesn't handle this well, but it's correct JSX.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    limitationIssue is result of tmLanguage limitation where in the lookup does not go beyond current linewontfixIssue is either side effect or limitation that will not be fixed for now

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions