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

(javascript) fix jsx self-closing tag issues #2322

Merged
merged 6 commits into from Dec 15, 2019
Merged

(javascript) fix jsx self-closing tag issues #2322

merged 6 commits into from Dec 15, 2019

Conversation

joshgoebel
Copy link
Member

Closes #1915.

Copy link
Collaborator

@egor-rogov egor-rogov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@joshgoebel joshgoebel merged commit eee17cd into master Dec 15, 2019
@@ -6,6 +6,8 @@ Website: https://developer.mozilla.org/en-US/docs/Web/JavaScript
*/

function(hljs) {
var TAG_START = /<[A-Za-z0-9\\._:-]+/;
var TAG_FINISH = /\/[A-Za-z0-9\\._:-]+>|\/>/;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey guys, React now support fragments which are usually written as <>...</>.

So maybe this could be

var TAG_START = /<[A-Za-z0-9\\._:-]*/;
var TAG_FINISH = /\/[A-Za-z0-9\\._:-]*>|\/>/;

What do you think? Do you see any problem?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I need an actual real example of what you're talking about.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well now if that ain't just ridiculous. :-)

https://reactjs.org/docs/fragments.html#short-syntax

Could you open an actual issue for this, please?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure: #2327

@joshgoebel joshgoebel deleted the jsx_fixes branch December 22, 2019 02:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(jsx) multiple self-closing tags with attributes highlighting broken
3 participants