Skip to content

Commit

Permalink
Merge pull request #16 from gzuidhof/master
Browse files Browse the repository at this point in the history
`/x/net/http` upgrade breaking change
  • Loading branch information
vanng822 authored May 2, 2024
2 parents 7ce92b6 + 9728876 commit 0eec845
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions premailer/premailer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -504,3 +504,20 @@ func TestRetainsMsoConditionalComment(t *testing.T) {

assert.Contains(t, resultHTML, `<!--[if mso]><style>.body {font-size: 16px;}</style><![endif]-->`)
}

func TestRetainsComments(t *testing.T) {
html := `<html>
<head>
</head>
<body>
<!-- Comment containing brackets < > -->
</body>
</html>`

p, err := NewPremailerFromString(html, NewOptions())
assert.Nil(t, err)
resultHTML, err := p.Transform()
assert.Nil(t, err)

assert.Contains(t, resultHTML, `<!-- Comment containing brackets < > -->`)
}

0 comments on commit 0eec845

Please sign in to comment.