Skip to content

Commit 1ead341

Browse files
authored
Update Minify-HTML.ps1
1 parent 16a60b1 commit 1ead341

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

dev_tools/Minify-HTML.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@ Write-Host "All source files found" -ForegroundColor Green
3333
function Remove-Html-Comments {
3434
param([string]$htmlContent)
3535

36-
# Remove HTML comments <!-- --> but preserve IE conditional comments
37-
$htmlContent = $htmlContent -replace '<!--(?!\[if\s)(?!.*\[endif\]).*?-->', ''
36+
# Remove standard HTML comments but preserve IE conditional comments
37+
$htmlContent = $htmlContent -replace '<!--(?!\[if.*?\]>|<!\[endif).*?-->', ''
3838

3939
return $htmlContent
4040
}

0 commit comments

Comments
 (0)