Completed
Pull Request — master (#4)
by Helpful
02:37
created
thirdparty/html5lib/HTML5/TreeBuilder.php 2 patches
Doc Comments   +8 added lines patch added patch discarded remove patch
@@ -3377,6 +3377,9 @@  discard block
 block discarded – undo
3377 3377
             return self::PHRASING;
3378 3378
     }
3379 3379
 
3380
+    /**
3381
+     * @param string[] $elements
3382
+     */
3380 3383
     private function clearStackToTableContext($elements) {
3381 3384
         /* When the steps above require the UA to clear the stack back to a
3382 3385
         table context, it means that the UA must, while the current node is not
@@ -3539,6 +3542,11 @@  discard block
 block discarded – undo
3539 3542
         $this->content_model = HTML5_Tokenizer::RCDATA;
3540 3543
     }
3541 3544
 
3545
+    /**
3546
+     * @param string $key
3547
+     *
3548
+     * @return string
3549
+     */
3542 3550
     private function getAttr($token, $key) {
3543 3551
         if (!isset($token['attr'])) return false;
3544 3552
         $ret = false;
Please login to merge, or discard this patch.
Switch Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -3647,20 +3647,20 @@
 block discarded – undo
3647 3647
             /* 4.1. Set the HTML parser's tokenization  stage's content model
3648 3648
              * flag according to the context element, as follows: */
3649 3649
             switch ($this->context->tagName) {
3650
-            case 'title': case 'textarea':
3651
-                $this->content_model = HTML5_Tokenizer::RCDATA;
3652
-                break;
3653
-            case 'style': case 'script': case 'xmp': case 'iframe':
3654
-            case 'noembed': case 'noframes':
3655
-                $this->content_model = HTML5_Tokenizer::CDATA;
3656
-                break;
3657
-            case 'noscript':
3658
-                // XSCRIPT: assuming scripting is enabled
3659
-                $this->content_model = HTML5_Tokenizer::CDATA;
3660
-                break;
3661
-            case 'plaintext':
3662
-                $this->content_model = HTML5_Tokenizer::PLAINTEXT;
3663
-                break;
3650
+                case 'title': case 'textarea':
3651
+                    $this->content_model = HTML5_Tokenizer::RCDATA;
3652
+                    break;
3653
+                case 'style': case 'script': case 'xmp': case 'iframe':
3654
+                case 'noembed': case 'noframes':
3655
+                    $this->content_model = HTML5_Tokenizer::CDATA;
3656
+                    break;
3657
+                case 'noscript':
3658
+                    // XSCRIPT: assuming scripting is enabled
3659
+                    $this->content_model = HTML5_Tokenizer::CDATA;
3660
+                    break;
3661
+                case 'plaintext':
3662
+                    $this->content_model = HTML5_Tokenizer::PLAINTEXT;
3663
+                    break;
3664 3664
             }
3665 3665
             /* 4.2. Let root be a new html element with no attributes. */
3666 3666
             $root = $this->dom->createElementNS(self::NS_HTML, 'html');
Please login to merge, or discard this patch.