From: Bjørn Erik Pedersen Date: Sat, 18 Aug 2018 09:16:34 +0000 (+0200) Subject: minifiers: Do not strip IE conditional statements X-Git-Tag: v0.47.1~7 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5a0ee2b934e38d596da0f9742361f81c1221e3d5;p=brevno-suite%2Fhugo minifiers: Do not strip IE conditional statements Fixes #5089 --- diff --git a/minifiers/minifiers.go b/minifiers/minifiers.go index eeebcd00..c2f3ef6d 100644 --- a/minifiers/minifiers.go +++ b/minifiers/minifiers.go @@ -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.