diff --git a/src/Dump.php b/src/Dump.php
index c5e2c49..7b8d20a 100644
--- a/src/Dump.php
+++ b/src/Dump.php
@@ -33,15 +33,17 @@ class Dump {
}
public function renderHtml() {
- $data = $this->getDumpContent();
+ $data = implode('', array_map(fn($e) => " $e
+HTML; } @@ -57,9 +59,18 @@ HTML; return str_repeat('-', strlen($header)) . PHP_EOL . $header . PHP_EOL . str_repeat('-', strlen($header)) . PHP_EOL . $data . PHP_EOL; } - protected function getDumpContent() { + protected function getDumpContent(bool $split = false) : string|array { + if ($split) { + return array_map(fn($e) => $this->renderDump([ $e ]), $this->content ?: [ null ]); + } + + return $this->renderDump($this->content !== [] ? $this->content : [null]); + } + + protected function renderDump(mixed $any) : string + { ob_start(); - var_dump(...($this->content !== [] ? $this->content : [null])); + var_dump(...$any); return ob_get_clean(); }+[ file: {$this->trace['file']}:{$this->trace['line']} ] timestamp: {$this->trace['time']}
+$data
+