fixed excerpt modifier to properly add spaces after block tags

This commit is contained in:
Gani Georgiev
2023-10-27 17:34:45 +03:00
parent 01e8c0f9f7
commit b7a49efa88
3 changed files with 30 additions and 19 deletions

View File

@@ -86,9 +86,9 @@ func TestNewExcerptModifier(t *testing.T) {
func TestExcerptModifierModify(t *testing.T) {
// plain text value: "Hello t est12 3 word"
html := ` <script>var a = 123;</script> <p>Hello</p><div id="test_id">t est<b>12
3</b></div> <h1>word </h1> `
3</b><span>456</span></div><span>word <b>7</b> 89<span>!<b>?</b><b> a </b><b>b </b>c</span>#<h1>title</h1>`
plainText := "Hello t est12 3 word"
plainText := "Hello t est12 3456 word 7 89!? a b c# title"
scenarios := []struct {
name string