HtmlCompress icon indicating copy to clipboard operation
HtmlCompress copied to clipboard

Unable to compress html conditional statements

Open mboron83 opened this issue 5 years ago • 1 comments

I have a problem with compressing html with conditional statements included.

Input:

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<!--[if IE]>
<h1>Hello World</h1>
<![endif]-->
</body>
</html>

Expected output:

<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body><!--[if IE]><h1>Hello World</h1><![endif]--></body></html>

Actual output:

<html><head> <body> <!--[if IE]>
<h1>Hello World</h1>
<![endif]-->

As you can see - some tags after conditional statement are completely omitted Library is installed with composer

composer require wyrihaximus/html-compress 

mboron83 avatar Dec 11 '19 15:12 mboron83

Just opened #77 to look into and fix this.

WyriHaximus avatar Dec 12 '19 07:12 WyriHaximus