Skip to content

Support differentiating <button> and <Button> in JSX #956

@gaearon

Description

@gaearon

Describe the issue

In JSX, <button> refers to a built-in component, but <Button> to a user-defined one. This distinction is very important, and some syntax highlighters (including VS Code) style them with diffrent colors. I'd like to be able to do that as well, but I think this is not currently exposed from the highlighter.

My feature request is to expose this information so that I can configure the highlighter to style capital-letter-starting JSX tags (and their closing tags) differently. I'm not sure if that would require a breaking change.

Browser and platform

No response

Reproduction link

No response

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