diff --git a/css/css.go b/css/css.go index a0261a03c0..580b848c40 100644 --- a/css/css.go +++ b/css/css.go @@ -135,6 +135,10 @@ func (t Token) IsLengthPercentage() bool { // Minify minifies CSS data, it reads from r and writes to w. func (o *Minifier) Minify(m *minify.M, w io.Writer, r io.Reader, params map[string]string) error { + tmp := &Minifier{} + *tmp = *o + o = tmp + o.newPrecision = o.Precision if o.newPrecision <= 0 || 15 < o.newPrecision { o.newPrecision = 15 // minimum number of digits a double can represent exactly diff --git a/html/html.go b/html/html.go index 345f579fb7..23cd2ca075 100644 --- a/html/html.go +++ b/html/html.go @@ -75,6 +75,7 @@ func (o *Minifier) Minify(m *minify.M, w io.Writer, r io.Reader, _ map[string]st if o.KeepConditionalComments { fmt.Println("DEPRECATED: KeepConditionalComments is replaced by KeepSpecialComments") o.KeepSpecialComments = true + o.KeepConditionalComments = false // omit next warning } omitSpace := true // if true the next leading space is omitted diff --git a/svg/svg.go b/svg/svg.go index 22ac1bc852..f86107b77f 100644 --- a/svg/svg.go +++ b/svg/svg.go @@ -41,6 +41,10 @@ func Minify(m *minify.M, w io.Writer, r io.Reader, params map[string]string) err // Minify minifies SVG data, it reads from r and writes to w. func (o *Minifier) Minify(m *minify.M, w io.Writer, r io.Reader, params map[string]string) error { + tmp := &Minifier{} + *tmp = *o + o = tmp + o.newPrecision = o.Precision if o.newPrecision <= 0 || 15 < o.newPrecision { o.newPrecision = 15 // minimum number of digits a double can represent exactly