'

Before

After

', 'With attributes' => '

Before

After

', 'Multiple components' => '

Content

', 'Nested in div' => '
', ]; foreach ($testCases as $name => $html) { echo "\n=== Test: {$name} ===\n"; echo "Input: {$html}\n"; $lexer = new HtmlLexer($html); $normalized = $lexer->normalizeXComponents(); echo "Output: {$normalized}\n"; // Parse with DOM to see structure $dom = \Dom\HTMLDocument::createFromString($normalized); echo "DOM: " . $dom->saveHTML() . "\n"; }