[#6778] updated the excerpt modifier to properly account for multibyte characters

This commit is contained in:
Gani Georgiev committed 2025-04-28 06:03:11 +03:00
1 parent fac0d5b899
commit c7c590bace
3 files changed
+24 -4

No files matched your search

+14
View File
@@ -134,6 +134,20 @@ func TestExcerptModifierModify(t *testing.T) {
html,
plainText,
},
// multibyte chars
{
"mutibyte chars <= max",
[]string{"4", "t"},
"аб\nв ",
"аб в",
},
{
"mutibyte chars > max",
[]string{"3", "t"},
"аб\nв ",
"аб...",
},
}
for _, s := range scenarios {