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
Conversation
ea6a183
to
82a1217
Compare
494cb66
to
8924ae5
Compare
8924ae5
to
042479b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
@@ -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\\._:-]+>|\/>/; |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure: #2327
Closes #1915.