content adapter: Handle <!--more--> separator in content.value

Closes #12556
This commit is contained in:
Bjørn Erik Pedersen
2024-06-01 10:27:10 +02:00
parent 74b9b8a229
commit 0221ddb39e
6 changed files with 75 additions and 37 deletions

View File

@@ -101,3 +101,14 @@ func BenchmarkHasShortcode(b *testing.B) {
}
})
}
func TestSummaryDividerStartingFromMain(t *testing.T) {
c := qt.New(t)
input := `aaa <!--more--> bbb`
items, err := collectStringMain(input)
c.Assert(err, qt.IsNil)
c.Assert(items, qt.HasLen, 4)
c.Assert(items[1].Type, qt.Equals, TypeLeadSummaryDivider)
}