aboutsummaryrefslogtreecommitdiffhomepage
path: root/helpers/content_test.go
diff options
context:
space:
mode:
authorSatowTakeshi <[email protected]>2020-03-28 01:36:50 +0900
committerBjørn Erik Pedersen <[email protected]>2020-03-28 11:10:25 +0100
commit9c9987535f98714c8a4ec98903f54233735ef0e4 (patch)
tree3dc4880579c814e439cc64d11627538033f97e25 /helpers/content_test.go
parent4a39564efe7b02a685598ae9dbae95e2326c0230 (diff)
downloadhugo-9c9987535f98714c8a4ec98903f54233735ef0e4.tar.gz
hugo-9c9987535f98714c8a4ec98903f54233735ef0e4.zip
helpers: Fix TrimShortHTML
Where some tags are siblings of p tag. Fixes #7081
Diffstat (limited to 'helpers/content_test.go')
-rw-r--r--helpers/content_test.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/helpers/content_test.go b/helpers/content_test.go
index 7f82abc9d..86e5412c2 100644
--- a/helpers/content_test.go
+++ b/helpers/content_test.go
@@ -41,6 +41,7 @@ func TestTrimShortHTML(t *testing.T) {
{[]byte("\n \n \t <p> \t Whitespace\nHTML \n\t </p>\n\t"), []byte("Whitespace\nHTML")},
{[]byte("<p>Multiple</p><p>paragraphs</p>"), []byte("<p>Multiple</p><p>paragraphs</p>")},
{[]byte("<p>Nested<p>paragraphs</p></p>"), []byte("<p>Nested<p>paragraphs</p></p>")},
+ {[]byte("<p>Hello</p>\n<ul>\n<li>list1</li>\n<li>list2</li>\n</ul>"), []byte("<p>Hello</p>\n<ul>\n<li>list1</li>\n<li>list2</li>\n</ul>")},
}
c := newTestContentSpec()