summaryrefslogtreecommitdiffstats
path: root/publisher/htmlElementsCollector_test.go
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-05-25 21:05:59 +0200
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2020-05-27 11:10:48 +0200
commitc950c86b4e5fb93f787ec78ca823bded9ef9fa3a (patch)
treeb2501c9a6ca811094d6d04427aca0eb759dda92f /publisher/htmlElementsCollector_test.go
parent915202494b140882d594e0542153531f6afada02 (diff)
downloadhugo-c950c86b4e5fb93f787ec78ca823bded9ef9fa3a.tar.gz
hugo-c950c86b4e5fb93f787ec78ca823bded9ef9fa3a.zip
publisher: Fix tag collector for nested table elements
Fixes #7318
Diffstat (limited to 'publisher/htmlElementsCollector_test.go')
-rw-r--r--publisher/htmlElementsCollector_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/publisher/htmlElementsCollector_test.go b/publisher/htmlElementsCollector_test.go
index 72abd94f0..e255a7354 100644
--- a/publisher/htmlElementsCollector_test.go
+++ b/publisher/htmlElementsCollector_test.go
@@ -51,6 +51,12 @@ func TestClassCollector(t *testing.T) {
{"duplicates", `<div class="b a b"></div>`, f("div", "a b", "")},
{"single quote", `<body class='b a'></body>`, f("body", "a b", "")},
{"no quote", `<body class=b id=myelement></body>`, f("body", "b", "myelement")},
+ {"thead", `
+ https://github.com/gohugoio/hugo/issues/7318
+<table class="cl1">
+ <thead class="cl2"><tr class="cl3"><td class="cl4"></td></tr></thead>
+ <tbody class="cl5"><tr class="cl6"><td class="cl7"></td></tr></tbody>
+</table>`, f("table tbody td thead tr", "cl1 cl2 cl3 cl4 cl5 cl6 cl7", "")},
// https://github.com/gohugoio/hugo/issues/7161
{"minified a href", `<a class="b a" href=/></a>`, f("a", "a b", "")},