fix(HtmlParser): mark <source> elements as void#5668
fix(HtmlParser): mark <source> elements as void#5668pkozlowski-opensource wants to merge 1 commit intoangular:masterfrom
Conversation
|
@vicb picked up this one to get (a bit) familiar with the new HTML parser code. Not sure what you think about having tests for each specific tags |
Not sure if it would be really useful - if you write the source and the tests, they would probably pass. however it doesn't hurt either. There are also more void elements that are not currently covered, could you add them ? (http://www.w3.org/TR/html5/syntax.html#void-elements) |
There was a problem hiding this comment.
requiredParents means that the first parent (audio) will be automatically added when none of them is present. I don't think it's like that in the spec, is it ?
bae0b59 to
092e8a0
Compare
|
@vicb updated. Mind having another look? |
There was a problem hiding this comment.
[
'fix1',
'fix2',
].forEach((html) => {
expect(parser.parse(html, 'TestComp').errors).toEqual([]);
});
092e8a0 to
5ec317a
Compare
There was a problem hiding this comment.
nits:
- remove the extra blank lines
- have one fixture per line (I think that if you add a "," after the last element clang will not mess with the formatting)
- close the
.forEach()with a;
5ec317a to
e19dbae
Compare
|
@vicb clang-format seems to have very strong opinion about how things should work.... I'm not sure I find it easier to read now. But hey, this is why we've got formatter to make us all agree :-) Feel free to fiddle more with the formatting if you've got an idea on making it look nicer |
e19dbae to
ce95e78
Compare
|
LGTM |
|
Merging PR #5668 on behalf of @jelbourn to branch presubmit-jelbourn-pr-5668. |
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Fixes #5663