@@ 1787-1802 (lines=16) @@ | ||
1784 | break; |
|
1785 | ||
1786 | /* A start tag token whose tag name is "plaintext" */ |
|
1787 | case 'plaintext': |
|
1788 | /* If the stack of open elements has a p element in scope, |
|
1789 | then act as if an end tag with the tag name p had been |
|
1790 | seen. */ |
|
1791 | if($this->elementInScope('p')) { |
|
1792 | $this->emitToken(array( |
|
1793 | 'name' => 'p', |
|
1794 | 'type' => HTML5::ENDTAG |
|
1795 | )); |
|
1796 | } |
|
1797 | ||
1798 | /* Insert an HTML element for the token. */ |
|
1799 | $this->insertElement($token); |
|
1800 | ||
1801 | return HTML5::PLAINTEXT; |
|
1802 | break; |
|
1803 | ||
1804 | /* A start tag whose tag name is one of: "h1", "h2", "h3", "h4", |
|
1805 | "h5", "h6" */ |
|
@@ 1932-1947 (lines=16) @@ | ||
1929 | break; |
|
1930 | ||
1931 | /* A start tag whose tag name is "table" */ |
|
1932 | case 'table': |
|
1933 | /* If the stack of open elements has a p element in scope, |
|
1934 | then act as if an end tag with the tag name p had been seen. */ |
|
1935 | if($this->elementInScope('p')) { |
|
1936 | $this->emitToken(array( |
|
1937 | 'name' => 'p', |
|
1938 | 'type' => HTML5::ENDTAG |
|
1939 | )); |
|
1940 | } |
|
1941 | ||
1942 | /* Insert an HTML element for the token. */ |
|
1943 | $this->insertElement($token); |
|
1944 | ||
1945 | /* Change the insertion mode to "in table". */ |
|
1946 | $this->mode = self::IN_TABLE; |
|
1947 | break; |
|
1948 | ||
1949 | /* A start tag whose tag name is one of: "area", "basefont", |
|
1950 | "bgsound", "br", "embed", "img", "param", "spacer", "wbr" */ |
|
@@ 1965-1980 (lines=16) @@ | ||
1962 | break; |
|
1963 | ||
1964 | /* A start tag whose tag name is "hr" */ |
|
1965 | case 'hr': |
|
1966 | /* If the stack of open elements has a p element in scope, |
|
1967 | then act as if an end tag with the tag name p had been seen. */ |
|
1968 | if($this->elementInScope('p')) { |
|
1969 | $this->emitToken(array( |
|
1970 | 'name' => 'p', |
|
1971 | 'type' => HTML5::ENDTAG |
|
1972 | )); |
|
1973 | } |
|
1974 | ||
1975 | /* Insert an HTML element for the token. */ |
|
1976 | $this->insertElement($token); |
|
1977 | ||
1978 | /* Immediately pop the current node off the stack of open elements. */ |
|
1979 | array_pop($this->stack); |
|
1980 | break; |
|
1981 | ||
1982 | /* A start tag whose tag name is "image" */ |
|
1983 | case 'image': |