-
Notifications
You must be signed in to change notification settings - Fork 29.2k
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
Fixed emmet validation when open angle bracket is followed by space #55762
Fixed emmet validation when open angle bracket is followed by space #55762
Conversation
I am not used to your standards yet and the coding guidelines didn't mention anyting in regard to that, but I decided to add another condition instead of adding an OR to the existing PHP check just to have more explicit checks. Of course this could easily be refactored as |
Thanks! If you could just add a test here it should be good to go. |
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.
The same applies if there is a \t
instead of a space. I'd suggest to use /\s/.test(char)
instead.
Great suggestion @ramya-rao-a! I just pushed this modification. Now I'm trying to figure out how those automated tests work and I'll push one @JacksonKearl. |
@mathdeziel You can run the tests with the "VS Code Emmet Tests" debug configuration, and you can use standard mocha constructs like |
Thanks for the tip @JacksonKearl! I just pushed a test, I hope it's properly done. It was my first time using Mocha. Truth be told, it was my first time for a lot of things on this journey... Thanks for your help/support @JacksonKearl, @ramya-rao-a 😄 |
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.
Thanks @mathdeziel. We are currently at the end of the testing phase for the current iteration. So, I'll merge this sometime next week for the next iteration.
Note to anyone else: Please dont merge this PR until the release branch for 1.26 has been cut
That's awesome !
пт, 3 авг. 2018 г., 23:33 Ramya Rao <notifications@github.com>:
… ***@***.**** approved this pull request.
Thanks @mathdeziel <https://github.com/mathdeziel>. We are currently at
the end of the testing phase for the current iteration. So, I'll merge this
sometime next week for the next iteration.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#55762 (review)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AVPRpVJEYgLuJ1A10mhlXy-5XPzjgYEIks5uNLOggaJpZM4VuFLQ>
.
|
Fix for issue #55411.
Much like the check for PHP's
<?
, it checks for an open angle bracket followed by a space, which is not valid as an HTML Tag, based on the W3C recommendation.This will fix issues where, for example, emmet won't trigger in JSX when the if statement contains a
<
, eg:if (age < 10) ...
.This will not work if the there is no space after the angle bracket, as in
if (age <10)
, as numbers are valid within tag names. But this problem should be taken care of by linting.