diff options
author | Asmir Mustafic <[email protected]> | 2015-06-07 12:09:33 +0200 |
---|---|---|
committer | Asmir Mustafic <[email protected]> | 2015-06-07 12:11:25 +0200 |
commit | 5d415a86f7465566967d8bb602a957010ae27d5b (patch) | |
tree | 71ed350c21d0c8e448fd0fd6f9c444b69ba3a21f /src | |
parent | 8f782e0f01a6e33a319bdc8f6de9cfd6569979a4 (diff) |
Allow multiple root nodes
Diffstat (limited to 'src')
-rw-r--r-- | src/HTML5/Serializer/OutputRules.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/HTML5/Serializer/OutputRules.php b/src/HTML5/Serializer/OutputRules.php index 4ad74f6..774a349 100644 --- a/src/HTML5/Serializer/OutputRules.php +++ b/src/HTML5/Serializer/OutputRules.php @@ -185,7 +185,9 @@ class OutputRules implements \Masterminds\HTML5\Serializer\RulesInterface { $this->doctype(); if ($dom->documentElement) { - $this->traverser->node($dom->documentElement); + foreach ($dom->childNodes as $node) { + $this->traverser->node($node); + } $this->nl(); } } |