aboutsummaryrefslogtreecommitdiffhomepage
path: root/publisher
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2024-01-28 22:34:10 +0100
committerBjørn Erik Pedersen <[email protected]>2024-01-28 23:14:09 +0100
commita795acbcd8b18aa4af384d5c03f30740361c8fcf (patch)
tree0dbf7b000681a738b892c5235daf52c63cda88b9 /publisher
parent982d9513e71b3d48e20cfa38454a0e1215a8d963 (diff)
downloadhugo-a795acbcd8b18aa4af384d5c03f30740361c8fcf.tar.gz
hugo-a795acbcd8b18aa4af384d5c03f30740361c8fcf.zip
all: Run gofumpt -l -w .
Diffstat (limited to 'publisher')
-rw-r--r--publisher/htmlElementsCollector.go2
-rw-r--r--publisher/htmlElementsCollector_test.go7
2 files changed, 2 insertions, 7 deletions
diff --git a/publisher/htmlElementsCollector.go b/publisher/htmlElementsCollector.go
index 6c01fd8d9..11a640550 100644
--- a/publisher/htmlElementsCollector.go
+++ b/publisher/htmlElementsCollector.go
@@ -466,7 +466,6 @@ func parseStartTag(s string) string {
}
return s
-
}
// isClosedByTag reports whether b ends with a closing tag for tagName.
@@ -523,7 +522,6 @@ LOOP:
}
return bytes.EqualFold(tagName, b[lo:hi])
-
}
func isSpace(b byte) bool {
diff --git a/publisher/htmlElementsCollector_test.go b/publisher/htmlElementsCollector_test.go
index 3cd834acb..36447258e 100644
--- a/publisher/htmlElementsCollector_test.go
+++ b/publisher/htmlElementsCollector_test.go
@@ -86,7 +86,8 @@ func TestClassCollector(t *testing.T) {
}">
</div>
</body>`, f("body div", "class1 class2 class3", "")},
- {"AlpineJS bind 2", `<div x-bind:class="{ 'bg-black': filter.checked }" class="inline-block mr-1 mb-2 rounded bg-gray-300 px-2 py-2">FOO</div>`,
+ {
+ "AlpineJS bind 2", `<div x-bind:class="{ 'bg-black': filter.checked }" class="inline-block mr-1 mb-2 rounded bg-gray-300 px-2 py-2">FOO</div>`,
f("div", "bg-black bg-gray-300 inline-block mb-2 mr-1 px-2 py-2 rounded", ""),
},
{"AlpineJS bind 3", `<div x-bind:class="{ 'text-gray-800': !checked, 'text-white': checked }"></div>`, f("div", "text-gray-800 text-white", "")},
@@ -130,7 +131,6 @@ func TestClassCollector(t *testing.T) {
<div id="b" class="foo">d</div>`, f("div form", "foo", "a b")},
{"Big input, multibyte runes", strings.Repeat(`神真美好 `, rnd.Intn(500)+1) + "<div id=\"神真美好\" class=\"foo\">" + strings.Repeat(`神真美好 `, rnd.Intn(100)+1) + " <span>神真美好</span>", f("div span", "foo", "神真美好")},
} {
-
for _, variant := range []struct {
minify bool
}{
@@ -161,7 +161,6 @@ func TestClassCollector(t *testing.T) {
})
}
}
-
}
func TestEndsWithTag(t *testing.T) {
@@ -190,7 +189,6 @@ func TestEndsWithTag(t *testing.T) {
c.Assert(got, qt.Equals, test.expect)
})
}
-
}
func BenchmarkElementsCollectorWriter(b *testing.B) {
@@ -276,6 +274,5 @@ func BenchmarkElementsCollectorWriterPre(b *testing.B) {
))
for i := 0; i < b.N; i++ {
fmt.Fprint(w, benchHTML)
-
}
}