diff --git a/src/HtmlMin.php b/src/HtmlMin.php index 575eb10..1e71682 100644 --- a/src/HtmlMin.php +++ b/src/HtmlMin.php @@ -67,7 +67,7 @@ protected function doctypeNotFound(string $html): bool protected function removeHtmlComments(string $html): string { - return (string)preg_replace('~~s', '', $html); + return (string)preg_replace('~~s', '', $html); } protected function trimScriptElements(string $html): string diff --git a/tests/HtmlMinTest.php b/tests/HtmlMinTest.php index 376a6e5..e0bd419 100644 --- a/tests/HtmlMinTest.php +++ b/tests/HtmlMinTest.php @@ -94,6 +94,20 @@ public function testLivewire(): void $this->assertEquals($expected, $this->htmlMin->minify($html)); } + public function testKnockout(): void + { + $html = "
+ + First item + + + + +
"; + $expected = "
First item
"; + $this->assertEquals($expected, $this->htmlMin->minify($html)); + } + public function testStyleTag(): void { $html = "