minifiers: Do not strip IE conditional statements
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 18 Aug 2018 09:16:34 +0000 (11:16 +0200)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Sat, 18 Aug 2018 09:16:34 +0000 (11:16 +0200)
Fixes #5089

minifiers/minifiers.go

index eeebcd00f9ee3de68b3e4f81711dbc3efac6fb32..c2f3ef6dfafb61cd09f7f415645d2e293b2a8672 100644 (file)
@@ -65,7 +65,8 @@ func (m Client) Minify(mediatype media.Type, dst io.Writer, src io.Reader) error
 func New(mediaTypes media.Types, outputFormats output.Formats) Client {
        m := minify.New()
        htmlMin := &html.Minifier{
-               KeepDocumentTags: true,
+               KeepDocumentTags:        true,
+               KeepConditionalComments: true,
        }
 
        // We use the Type definition of the media types defined in the site if found.