45 lines
2.3 KiB
Diff
45 lines
2.3 KiB
Diff
|
From e825481e553e5a2d60ccbd9930da9060d12cff3d Mon Sep 17 00:00:00 2001
|
||
|
From: Anthony Fok <foka@debian.org>
|
||
|
Date: Tue, 8 Oct 2019 23:46:04 -0600
|
||
|
Subject: [PATCH] deps: Update minify to v2.5.2
|
||
|
|
||
|
- v2.5.1 removes import comments, solving a build error with Go 1.13
|
||
|
in GOPATH mode (used Debian packaging for example)
|
||
|
- v2.5.2 no longer converts polyline/rect/polygon/line to path
|
||
|
as it has been reported to break a SVG referenced by CSS,
|
||
|
see tdewolff/minify#260
|
||
|
|
||
|
The test case for Min SVG in TestResourceChains is updated accordingly.
|
||
|
|
||
|
Fixes pocc/tshark.dev#33
|
||
|
---
|
||
|
go.mod | 2 +-
|
||
|
go.sum | 12 ++++++------
|
||
|
hugolib/resource_chain_test.go | 6 +++---
|
||
|
3 files changed, 10 insertions(+), 10 deletions(-)
|
||
|
|
||
|
diff --git a/hugolib/resource_chain_test.go b/hugolib/resource_chain_test.go
|
||
|
index 138e7a4a28..10539d1bb2 100644
|
||
|
--- a/hugolib/resource_chain_test.go
|
||
|
+++ b/hugolib/resource_chain_test.go
|
||
|
@@ -342,8 +342,8 @@ Min HTML: {{ ( resources.Get "mydata/html1.html" | resources.Minify ).Content |
|
||
|
b.AssertFileContent("public/index.html", `Min JS: var x;x=5;document.getElementById("demo").innerHTML=x*10;`)
|
||
|
b.AssertFileContent("public/index.html", `Min JSON: {"employees":[{"firstName":"John","lastName":"Doe"},{"firstName":"Anna","lastName":"Smith"},{"firstName":"Peter","lastName":"Jones"}]}`)
|
||
|
b.AssertFileContent("public/index.html", `Min XML: <hello><world>Hugo Rocks!</<world></hello>`)
|
||
|
- b.AssertFileContent("public/index.html", `Min SVG: <svg height="100" width="100"><path d="M5 10 20 40z"/></svg>`)
|
||
|
- b.AssertFileContent("public/index.html", `Min SVG again: <svg height="100" width="100"><path d="M5 10 20 40z"/></svg>`)
|
||
|
+ b.AssertFileContent("public/index.html", `Min SVG: <svg height="100" width="100"><path d="M1e2 1e2H3e2 2e2z"/></svg>`)
|
||
|
+ b.AssertFileContent("public/index.html", `Min SVG again: <svg height="100" width="100"><path d="M1e2 1e2H3e2 2e2z"/></svg>`)
|
||
|
b.AssertFileContent("public/index.html", `Min HTML: <html><a href=#>Cool</a></html>`)
|
||
|
}},
|
||
|
|
||
|
@@ -580,7 +580,7 @@ document.getElementById("demo").innerHTML = x * 10;
|
||
|
|
||
|
b.WithSourceFile(filepath.Join("assets", "mydata", "svg1.svg"), `
|
||
|
<svg height="100" width="100">
|
||
|
- <line x1="5" y1="10" x2="20" y2="40"/>
|
||
|
+ <path d="M 100 100 L 300 100 L 200 100 z"/>
|
||
|
</svg>
|
||
|
`)
|
||
|
|