We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 16a60b1 commit 1ead341Copy full SHA for 1ead341
1 file changed
dev_tools/Minify-HTML.ps1
@@ -33,8 +33,8 @@ Write-Host "All source files found" -ForegroundColor Green
33
function Remove-Html-Comments {
34
param([string]$htmlContent)
35
36
- # Remove HTML comments <!-- --> but preserve IE conditional comments
37
- $htmlContent = $htmlContent -replace '<!--(?!\[if\s)(?!.*\[endif\]).*?-->', ''
+ # Remove standard HTML comments but preserve IE conditional comments
+ $htmlContent = $htmlContent -replace '<!--(?!\[if.*?\]>|<!\[endif).*?-->', ''
38
39
return $htmlContent
40
}
0 commit comments