summaryrefslogtreecommitdiff
path: root/vendor
diff options
context:
space:
mode:
authorLibravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2024-05-27 09:36:09 +0000
committerLibravatar GitHub <noreply@github.com>2024-05-27 09:36:09 +0000
commitd96cca60a1d3dfc78f6e95c325e4e32518062489 (patch)
treeaa1e52eb93f537a39f15c4bc0fc703244140ad87 /vendor
parent[chore]: Bump github.com/jackc/pgx/v5 from 5.5.5 to 5.6.0 (#2929) (diff)
downloadgotosocial-d96cca60a1d3dfc78f6e95c325e4e32518062489.tar.xz
[chore]: Bump github.com/tdewolff/minify/v2 from 2.20.25 to 2.20.32 (#2927)
Diffstat (limited to 'vendor')
-rw-r--r--vendor/github.com/tdewolff/minify/v2/html/html.go4
-rw-r--r--vendor/modules.txt2
2 files changed, 4 insertions, 2 deletions
diff --git a/vendor/github.com/tdewolff/minify/v2/html/html.go b/vendor/github.com/tdewolff/minify/v2/html/html.go
index aa078ef12..345f579fb 100644
--- a/vendor/github.com/tdewolff/minify/v2/html/html.go
+++ b/vendor/github.com/tdewolff/minify/v2/html/html.go
@@ -129,7 +129,7 @@ func (o *Minifier) Minify(m *minify.M, w io.Writer, r io.Reader, _ map[string]st
}
}
case html.SvgToken:
- if err := m.MinifyMimetype(svgMimeBytes, w, buffer.NewReader(t.Data), nil); err != nil {
+ if err := m.MinifyMimetype(svgMimeBytes, w, buffer.NewReader(t.Data), inlineParams); err != nil {
if err != minify.ErrNotExist {
return minify.UpdateErrorPosition(err, z, t.Offset)
}
@@ -147,6 +147,7 @@ func (o *Minifier) Minify(m *minify.M, w io.Writer, r io.Reader, _ map[string]st
case html.TextToken:
if t.HasTemplate {
w.Write(t.Data)
+ omitSpace = parse.IsWhitespace(t.Data[len(t.Data)-1])
} else if rawTagHash != 0 {
if rawTagHash == Style || rawTagHash == Script || rawTagHash == Iframe {
var mimetype []byte
@@ -171,6 +172,7 @@ func (o *Minifier) Minify(m *minify.M, w io.Writer, r io.Reader, _ map[string]st
}
} else if inPre {
w.Write(t.Data)
+ // omitSpace = true after block element
} else {
t.Data = parse.ReplaceMultipleWhitespaceAndEntities(t.Data, EntitiesMap, TextRevEntitiesMap)
diff --git a/vendor/modules.txt b/vendor/modules.txt
index 1c4cd1db5..6c766fe69 100644
--- a/vendor/modules.txt
+++ b/vendor/modules.txt
@@ -806,7 +806,7 @@ github.com/superseriousbusiness/oauth2/v4/generates
github.com/superseriousbusiness/oauth2/v4/manage
github.com/superseriousbusiness/oauth2/v4/models
github.com/superseriousbusiness/oauth2/v4/server
-# github.com/tdewolff/minify/v2 v2.20.25
+# github.com/tdewolff/minify/v2 v2.20.32
## explicit; go 1.18
github.com/tdewolff/minify/v2
github.com/tdewolff/minify/v2/html