-
Notifications
You must be signed in to change notification settings - Fork 35
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 empty (void) tags #3
Conversation
@developit Yeah, this is why I mentioned to just copy paste contents of that module to the repo. |
@developit to inline it with rollup it seems that I need to use either node-resolve plugin or provide |
Yup, I'm totally cool with that. Think it's ready to merge with that inlined? edit: see comment |
} | ||
} | ||
|
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.
Actually maybe we can simplify the sanitize mapping:
s += `</${name}>`;
} else {
s += '>';
}
sanitized[s] = true;
return s;
}
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.
@developit Done.
I think ready to merge now (if you don't have any other comments). |
Looks great! |
Great, thank you! 👍 |
@developit I'm actually not sure how it worked before without this feature, but it was producing things like
<input type="text"></input>
which is kind of wrong markup (though browsers understand it..).In this PR I load list of empty tags from
empty-tags
module which I crated long time ago for OpenJSX. Though, if you think that it makes sense inline them directly into project (separate file but in the repo) then I'll do that.I intentionally don't do any warning here when child elements are added to elements empty elements, but if that makes sense we can probably do that with a
process.ENV === 'development'
guard.