Skip to content

Commit ca42aaf

Browse files
authored
Clear previous output when formatting
1 parent 8bdcd40 commit ca42aaf

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/Html/HtmlFormatter.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,8 @@ public function __construct($encoding = 'HTML-ENTITIES')
3131

3232
public function Format(Document $document)
3333
{
34+
// Clear current output
35+
$this->output = '';
3436
// Keep track of style modifications
3537
$this->previousState = null;
3638
// and create a stack of states

0 commit comments

Comments
 (0)