mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[chore]: Bump github.com/tdewolff/minify/v2 from 2.12.8 to 2.12.9 (#2194)
This commit is contained in:
12
vendor/github.com/tdewolff/minify/v2/html/html.go
generated
vendored
12
vendor/github.com/tdewolff/minify/v2/html/html.go
generated
vendored
@ -95,11 +95,15 @@ func (o *Minifier) Minify(m *minify.M, w io.Writer, r io.Reader, _ map[string]st
|
||||
if bytes.HasPrefix(t.Data, []byte("<!--[if ")) && bytes.HasSuffix(t.Data, []byte("<![endif]-->")) { // downlevel-hidden
|
||||
begin := bytes.IndexByte(t.Data, '>') + 1
|
||||
end := len(t.Data) - len("<![endif]-->")
|
||||
w.Write(t.Data[:begin])
|
||||
if err := o.Minify(m, w, buffer.NewReader(t.Data[begin:end]), nil); err != nil {
|
||||
return minify.UpdateErrorPosition(err, z, t.Offset)
|
||||
if begin < end {
|
||||
w.Write(t.Data[:begin])
|
||||
if err := o.Minify(m, w, buffer.NewReader(t.Data[begin:end]), nil); err != nil {
|
||||
return minify.UpdateErrorPosition(err, z, t.Offset)
|
||||
}
|
||||
w.Write(t.Data[end:])
|
||||
} else {
|
||||
w.Write(t.Data) // malformed
|
||||
}
|
||||
w.Write(t.Data[end:])
|
||||
} else {
|
||||
w.Write(t.Data) // downlevel-revealed or short downlevel-hidden
|
||||
}
|
||||
|
Reference in New Issue
Block a user