@@ 1774-1782 (lines=9) @@ | ||
1771 | /* A character token that is one of one of U+0009 CHARACTER TABULATION, |
|
1772 | U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), |
|
1773 | or U+0020 SPACE */ |
|
1774 | } elseif (isset($token['data']) && preg_match( |
|
1775 | '/^[\t\n\x0b\x0c ]+$/', |
|
1776 | $token['data'] |
|
1777 | ) |
|
1778 | ) { |
|
1779 | /* Append that character to the Document node. */ |
|
1780 | $text = $this->dom->createTextNode($token['data']); |
|
1781 | $this->dom->appendChild($text); |
|
1782 | } |
|
1783 | } |
|
1784 | ||
1785 | private function rootElementPhase($token) |
|
@@ 1804-1817 (lines=14) @@ | ||
1801 | /* A character token that is one of one of U+0009 CHARACTER TABULATION, |
|
1802 | U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED (FF), |
|
1803 | or U+0020 SPACE */ |
|
1804 | } elseif ($token['type'] === HTML5::CHARACTR && |
|
1805 | preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data']) |
|
1806 | ) { |
|
1807 | /* Append that character to the Document node. */ |
|
1808 | $text = $this->dom->createTextNode($token['data']); |
|
1809 | $this->dom->appendChild($text); |
|
1810 | ||
1811 | /* A character token that is not one of U+0009 CHARACTER TABULATION, |
|
1812 | U+000A LINE FEED (LF), U+000B LINE TABULATION, U+000C FORM FEED |
|
1813 | (FF), or U+0020 SPACE |
|
1814 | A start tag token |
|
1815 | An end tag token |
|
1816 | An end-of-file token */ |
|
1817 | } elseif (($token['type'] === HTML5::CHARACTR && |
|
1818 | !preg_match('/^[\t\n\x0b\x0c ]+$/', $token['data'])) || |
|
1819 | $token['type'] === HTML5::STARTTAG || |
|
1820 | $token['type'] === HTML5::ENDTAG || |