summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAsmir Mustafic <[email protected]>2015-06-07 12:09:33 +0200
committerAsmir Mustafic <[email protected]>2015-06-07 12:11:25 +0200
commit5d415a86f7465566967d8bb602a957010ae27d5b (patch)
tree71ed350c21d0c8e448fd0fd6f9c444b69ba3a21f /src
parent8f782e0f01a6e33a319bdc8f6de9cfd6569979a4 (diff)
Allow multiple root nodes
Diffstat (limited to 'src')
-rw-r--r--src/HTML5/Serializer/OutputRules.php4
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();
}
}