-
-
Notifications
You must be signed in to change notification settings - Fork 472
Closed
Description
This is the HTML:
<strong>hello</strong>
<code class="language-php">$foo = "bar";</code>
The parser only recognizes <strong> according to the output:
there are 1 nodes
- strong
$dom = new Dom;
$dom->load('<strong>hello</strong><code class="language-php">$foo = "bar";</code>');
$nodes = $dom->find('*');
$total = count($nodes);
echo "there are {$total} nodes";
/** @var Dom\AbstractNode $node*/
foreach ($nodes as $node) {
$tag = $node->getTag();
echo "<br>- {$tag->name()}";
}Any idea why <code> is ignored? I have tested a lot of tags and only this one is not recognized. Thank you in advance.
Metadata
Metadata
Assignees
Labels
No labels