-
Notifications
You must be signed in to change notification settings - Fork 116
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
Add <body> if it's missing #183
base: master
Are you sure you want to change the base?
Conversation
Travis seems broken but there's one failing test:
// The DomTreeBuilder has special handling for text when in before head mode.
$html = '<!DOCTYPE html><html>
Foo<head></head><body></body></html>';
$doc = $this->parse($html);
$this->assertEquals('Line 0, Col 0: Unexpected text. Ignoring: Foo', $this->errors[0]);
$headElement = $doc->documentElement->firstChild;
$this->assertEquals('head', $headElement->tagName); Not sure how this case should be handled now. When saved it now outputs: <html><head></head><body>
Foo<head></head><body></body></body></html> |
@goetas how about this version? |
This looks better! (please give me some time to test this , recently i've been super busy 😢 ) |
No worries :) |
@stof would you mind helping me with this ? what do you think about the change? |
test/HTML5/Html5Test.php
Outdated
* Test for issue #166. | ||
* | ||
* @param $input | ||
* @param $expected |
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.
such @param
without type is totally useless. either add the types or remove those phpdoc
I think that this has been figured out, can you please review it again? |
Prevents
Hello, This is a test.
from being removed when parsing<html>Hello, This is a test.<br />Does it work this time?</html>
https://www.w3.org/TR/2014/REC-html5-20141028/sections.html#the-body-element