summaryrefslogtreecommitdiff
path: root/vendor/github.com/tdewolff/minify/v2/html
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/github.com/tdewolff/minify/v2/html')
-rw-r--r--vendor/github.com/tdewolff/minify/v2/html/html.go6
-rw-r--r--vendor/github.com/tdewolff/minify/v2/html/table.go2
2 files changed, 4 insertions, 4 deletions
diff --git a/vendor/github.com/tdewolff/minify/v2/html/html.go b/vendor/github.com/tdewolff/minify/v2/html/html.go
index 8342f72a8..6868c9b79 100644
--- a/vendor/github.com/tdewolff/minify/v2/html/html.go
+++ b/vendor/github.com/tdewolff/minify/v2/html/html.go
@@ -274,10 +274,10 @@ func (o *Minifier) Minify(m *minify.M, w io.Writer, r io.Reader, _ map[string]st
}
}
- if o.KeepWhitespace || t.Traits&objectTag != 0 {
- omitSpace = false
- } else if t.Traits&nonPhrasingTag != 0 {
+ if t.Traits&nonPhrasingTag != 0 {
omitSpace = true // omit spaces after block elements
+ } else if o.KeepWhitespace || t.Traits&objectTag != 0 {
+ omitSpace = false
}
if !omitEndTag {
diff --git a/vendor/github.com/tdewolff/minify/v2/html/table.go b/vendor/github.com/tdewolff/minify/v2/html/table.go
index 5de3b497f..1ace143a5 100644
--- a/vendor/github.com/tdewolff/minify/v2/html/table.go
+++ b/vendor/github.com/tdewolff/minify/v2/html/table.go
@@ -35,7 +35,7 @@ var tagMap = map[Hash]traits{
Body: nonPhrasingTag,
Br: nonPhrasingTag,
Button: objectTag,
- Canvas: objectTag,
+ Canvas: objectTag | keepPTag,
Caption: nonPhrasingTag,
Cite: normalTag,
Code: normalTag,