Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for React syntax #64

Open
aliktb opened this issue Jan 28, 2023 · 0 comments
Open

Support for React syntax #64

aliktb opened this issue Jan 28, 2023 · 0 comments

Comments

@aliktb
Copy link

aliktb commented Jan 28, 2023

Currently React highlighting through javascript doesn't appear to handle html tags properly. Closing tags appear to be highlighted a different color to the opening tag. It would be nice if opening and closing tags had matching colors. E.g. in the example below, if the <div> and </div> had their own color and <article> and </article> were matching. Example code paraphrased from react documentation

function Comment(props) {
  return (
    <div className="Comment">
      <article className="UserInfo">
        <img className="Avatar"
          src={props.author.avatarUrl}
          alt={props.author.name}
        />
        <div className="UserInfo-name">
          {props.author.name}
        </div>
      </article>
      <div className="Comment-text">
        {props.text}
      </div>
      <div className="Comment-date">
        {formatDate(props.date)}
      </div>
    </div>
  );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant