Return empty extract if string is blank after formatting

Bug: T167626
Change-Id: Icb89cbe447226850231c3d7d74e61e5f6a5db809
This commit is contained in:
joakin 2017-06-12 12:57:30 +02:00
parent fb8d54c7ce
commit 38b061a468
3 changed files with 7 additions and 0 deletions

Binary file not shown.

Binary file not shown.

View file

@ -12,8 +12,15 @@ function htmlize( plainTextExtract, title ) {
if ( plainTextExtract === undefined ) {
return [];
}
extract = removeParentheticals( extract );
extract = removeEllipsis( extract );
// After cleaning the extract it may have been blanked
if ( extract.length === 0 ) {
return [];
}
extract = makeTitleInExtractBold( extract, title );
return extract;
}