mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-18 21:11:19 +02:00
helpers: Fix TrimShortHTML
Where some tags are siblings of p tag. Fixes #7081
This commit is contained in:
committed by
Bjørn Erik Pedersen
parent
4a39564efe
commit
9c9987535f
@@ -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()
|
||||
|
Reference in New Issue
Block a user