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

JSX tag-class (HTML Element vs Component Element) #1518

Closed
Templarian opened this issue Aug 8, 2018 · 0 comments
Closed

JSX tag-class (HTML Element vs Component Element) #1518

Templarian opened this issue Aug 8, 2018 · 0 comments

Comments

@Templarian
Copy link

In JSX it's a subtle feature, but editors [Ex: VS Code] syntax highlight the difference between native HTML elements (Ex: <a>, <span>) and component classes (Ex: <DropDown>, <Foo>).

Basically, if it does not have a capital [^a-z] for the first character it would be helpful to have another class name appended. Like tag-class or something.

<foo  = <span class="token tag"><span class="token punctuation">&lt;</span>foo</span>

<Foo  = <span class="token tag tag-class"><span class="token punctuation">&lt;</span>Foo</span>
                               ^ Goal: Add this class name

I was looking below, but I can't get my head around how to achieve this for a PR (so I made this issue).

https://github.com/PrismJS/prism/blob/master/components/prism-jsx.js

Very low priority, but trying to make custom components in ReactJS documentation stand out more.

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

No branches or pull requests

2 participants