{
    "tests": [
        {
            "description": "<!doctype html><plaintext></plaintext>",
            "input": "<!doctype html><plaintext></plaintext>",
            "output": [
                [
                    "DOCTYPE",
                    "html",
                    null,
                    null,
                    true
                ],
                [
                    "StartTag",
                    "plaintext",
                    {}
                ],
                [
                    "Character",
                    "</plaintext>"
                ]
            ]
        },
        {
            "description": "<!doctype html><table><plaintext></plaintext>",
            "input": "<!doctype html><table><plaintext></plaintext>",
            "output": [
                [
                    "DOCTYPE",
                    "html",
                    null,
                    null,
                    true
                ],
                [
                    "StartTag",
                    "table",
                    {}
                ],
                [
                    "StartTag",
                    "plaintext",
                    {}
                ],
                [
                    "Character",
                    "</plaintext>"
                ]
            ]
        },
        {
            "description": "<!doctype html><table><tbody><plaintext></plaintext>",
            "input": "<!doctype html><table><tbody><plaintext></plaintext>",
            "output": [
                [
                    "DOCTYPE",
                    "html",
                    null,
                    null,
                    true
                ],
                [
                    "StartTag",
                    "table",
                    {}
                ],
                [
                    "StartTag",
                    "tbody",
                    {}
                ],
                [
                    "StartTag",
                    "plaintext",
                    {}
                ],
                [
                    "Character",
                    "</plaintext>"
                ]
            ]
        },
        {
            "description": "<!doctype html><table><tbody><tr><plaintext></plaintext>",
            "input": "<!doctype html><table><tbody><tr><plaintext></plaintext>",
            "output": [
                [
                    "DOCTYPE",
                    "html",
                    null,
                    null,
                    true
                ],
                [
                    "StartTag",
                    "table",
                    {}
                ],
                [
                    "StartTag",
                    "tbody",
                    {}
                ],
                [
                    "StartTag",
                    "tr",
                    {}
                ],
                [
                    "StartTag",
                    "plaintext",
                    {}
                ],
                [
                    "Character",
                    "</plaintext>"
                ]
            ]
        },
        {
            "description": "<!doctype html><table><td><plaintext></plaintext>",
            "input": "<!doctype html><table><td><plaintext></plaintext>",
            "output": [
                [
                    "DOCTYPE",
                    "html",
                    null,
                    null,
                    true
                ],
                [
                    "StartTag",
                    "table",
                    {}
                ],
                [
                    "StartTag",
                    "td",
                    {}
                ],
                [
                    "StartTag",
                    "plaintext",
                    {}
                ],
                [
                    "Character",
                    "</plaintext>"
                ]
            ]
        },
        {
            "description": "<!doctype html><table><caption><plaintext></plaintext>",
            "input": "<!doctype html><table><caption><plaintext></plaintext>",
            "output": [
                [
                    "DOCTYPE",
                    "html",
                    null,
                    null,
                    true
                ],
                [
                    "StartTag",
                    "table",
                    {}
                ],
                [
                    "StartTag",
                    "caption",
                    {}
                ],
                [
                    "StartTag",
                    "plaintext",
                    {}
                ],
                [
                    "Character",
                    "</plaintext>"
                ]
            ]
        },
        {
            "description": "<!doctype html><table><tr><style></script></style>abc",
            "input": "<!doctype html><table><tr><style></script></style>abc",
            "output": [
                [
                    "DOCTYPE",
                    "html",
                    null,
                    null,
                    true
                ],
                [
                    "StartTag",
                    "table",
                    {}
                ],
                [
                    "StartTag",
                    "tr",
                    {}
                ],
                [
                    "StartTag",
                    "style",
                    {}
                ],
                [
                    "Character",
                    "</script>"
                ],
                [
                    "EndTag",
                    "style"
                ],
                [
                    "Character",
                    "abc"
                ]
            ]
        },
        {
            "description": "<!doctype html><table><tr><script></style></script>abc",
            "input": "<!doctype html><table><tr><script></style></script>abc",
            "output": [
                [
                    "DOCTYPE",
                    "html",
                    null,
                    null,
                    true
                ],
                [
                    "StartTag",
                    "table",
                    {}
                ],
                [
                    "StartTag",
                    "tr",
                    {}
                ],
                [
                    "StartTag",
                    "script",
                    {}
                ],
                [
                    "Character",
                    "</style>"
                ],
                [
                    "EndTag",
                    "script"
                ],
                [
                    "Character",
                    "abc"
                ]
            ]
        },
        {
            "description": "<!doctype html><table><caption><style></script></style>abc",
            "input": "<!doctype html><table><caption><style></script></style>abc",
            "output": [
                [
                    "DOCTYPE",
                    "html",
                    null,
                    null,
                    true
                ],
                [
                    "StartTag",
                    "table",
                    {}
                ],
                [
                    "StartTag",
                    "caption",
                    {}
                ],
                [
                    "StartTag",
                    "style",
                    {}
                ],
                [
                    "Character",
                    "</script>"
                ],
                [
                    "EndTag",
                    "style"
                ],
                [
                    "Character",
                    "abc"
                ]
            ]
        },
        {
            "description": "<!doctype html><table><td><style></script></style>abc",
            "input": "<!doctype html><table><td><style></script></style>abc",
            "output": [
                [
                    "DOCTYPE",
                    "html",
                    null,
                    null,
                    true
                ],
                [
                    "StartTag",
                    "table",
                    {}
                ],
                [
                    "StartTag",
                    "td",
                    {}
                ],
                [
                    "StartTag",
                    "style",
                    {}
                ],
                [
                    "Character",
                    "</script>"
                ],
                [
                    "EndTag",
                    "style"
                ],
                [
                    "Character",
                    "abc"
                ]
            ]
        },
        {
            "description": "<!doctype html><select><script></style></script>abc",
            "input": "<!doctype html><select><script></style></script>abc",
            "output": [
                [
                    "DOCTYPE",
                    "html",
                    null,
                    null,
                    true
                ],
                [
                    "StartTag",
                    "select",
                    {}
                ],
                [
                    "StartTag",
                    "script",
                    {}
                ],
                [
                    "Character",
                    "</style>"
                ],
                [
                    "EndTag",
                    "script"
                ],
                [
                    "Character",
                    "abc"
                ]
            ]
        },
        {
            "description": "<!doctype html><table><select><script></style></script>abc",
            "input": "<!doctype html><table><select><script></style></script>abc",
            "output": [
                [
                    "DOCTYPE",
                    "html",
                    null,
                    null,
                    true
                ],
                [
                    "StartTag",
                    "table",
                    {}
                ],
                [
                    "StartTag",
                    "select",
                    {}
                ],
                [
                    "StartTag",
                    "script",
                    {}
                ],
                [
                    "Character",
                    "</style>"
                ],
                [
                    "EndTag",
                    "script"
                ],
                [
                    "Character",
                    "abc"
                ]
            ]
        },
        {
            "description": "<!doctype html><table><tr><select><script></style></script>abc",
            "input": "<!doctype html><table><tr><select><script></style></script>abc",
            "output": [
                [
                    "DOCTYPE",
                    "html",
                    null,
                    null,
                    true
                ],
                [
                    "StartTag",
                    "table",
                    {}
                ],
                [
                    "StartTag",
                    "tr",
                    {}
                ],
                [
                    "StartTag",
                    "select",
                    {}
                ],
                [
                    "StartTag",
                    "script",
                    {}
                ],
                [
                    "Character",
                    "</style>"
                ],
                [
                    "EndTag",
                    "script"
                ],
                [
                    "Character",
                    "abc"
                ]
            ]
        },
        {
            "description": "<!doctype html><frameset></frameset><noframes>abc",
            "input": "<!doctype html><frameset></frameset><noframes>abc",
            "output": [
                [
                    "DOCTYPE",
                    "html",
                    null,
                    null,
                    true
                ],
                [
                    "StartTag",
                    "frameset",
                    {}
                ],
                [
                    "EndTag",
                    "frameset"
                ],
                [
                    "StartTag",
                    "noframes",
                    {}
                ],
                [
                    "Character",
                    "abc"
                ]
            ]
        },
        {
            "description": "<!doctype html><frameset></frameset><noframes>abc</noframes><!--abc-->",
            "input": "<!doctype html><frameset></frameset><noframes>abc</noframes><!--abc-->",
            "output": [
                [
                    "DOCTYPE",
                    "html",
                    null,
                    null,
                    true
                ],
                [
                    "StartTag",
                    "frameset",
                    {}
                ],
                [
                    "EndTag",
                    "frameset"
                ],
                [
                    "StartTag",
                    "noframes",
                    {}
                ],
                [
                    "Character",
                    "abc"
                ],
                [
                    "EndTag",
                    "noframes"
                ],
                [
                    "Comment",
                    "abc"
                ]
            ]
        },
        {
            "description": "<!doctype html><frameset></frameset></html><noframes>abc",
            "input": "<!doctype html><frameset></frameset></html><noframes>abc",
            "output": [
                [
                    "DOCTYPE",
                    "html",
                    null,
                    null,
                    true
                ],
                [
                    "StartTag",
                    "frameset",
                    {}
                ],
                [
                    "EndTag",
                    "frameset"
                ],
                [
                    "EndTag",
                    "html"
                ],
                [
                    "StartTag",
                    "noframes",
                    {}
                ],
                [
                    "Character",
                    "abc"
                ]
            ]
        },
        {
            "description": "<!doctype html><frameset></frameset></html><noframes>abc</noframes><!--abc-->",
            "input": "<!doctype html><frameset></frameset></html><noframes>abc</noframes><!--abc-->",
            "output": [
                [
                    "DOCTYPE",
                    "html",
                    null,
                    null,
                    true
                ],
                [
                    "StartTag",
                    "frameset",
                    {}
                ],
                [
                    "EndTag",
                    "frameset"
                ],
                [
                    "EndTag",
                    "html"
                ],
                [
                    "StartTag",
                    "noframes",
                    {}
                ],
                [
                    "Character",
                    "abc"
                ],
                [
                    "EndTag",
                    "noframes"
                ],
                [
                    "Comment",
                    "abc"
                ]
            ]
        },
        {
            "description": "<!doctype html><table><tr></tbody><tfoot>",
            "input": "<!doctype html><table><tr></tbody><tfoot>",
            "output": [
                [
                    "DOCTYPE",
                    "html",
                    null,
                    null,
                    true
                ],
                [
                    "StartTag",
                    "table",
                    {}
                ],
                [
                    "StartTag",
                    "tr",
                    {}
                ],
                [
                    "EndTag",
                    "tbody"
                ],
                [
                    "StartTag",
                    "tfoot",
                    {}
                ]
            ]
        },
        {
            "description": "<!doctype html><table><td><svg></svg>abc<td>",
            "input": "<!doctype html><table><td><svg></svg>abc<td>",
            "output": [
                [
                    "DOCTYPE",
                    "html",
                    null,
                    null,
                    true
                ],
                [
                    "StartTag",
                    "table",
                    {}
                ],
                [
                    "StartTag",
                    "td",
                    {}
                ],
                [
                    "StartTag",
                    "svg",
                    {}
                ],
                [
                    "EndTag",
                    "svg"
                ],
                [
                    "Character",
                    "abc"
                ],
                [
                    "StartTag",
                    "td",
                    {}
                ]
            ]
        }
    ]
}