mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Popups
synced 2024-11-24 07:34:11 +00:00
Return empty extract if string is blank after formatting
Bug: T167626 Change-Id: Icb89cbe447226850231c3d7d74e61e5f6a5db809
This commit is contained in:
parent
fb8d54c7ce
commit
38b061a468
BIN
resources/dist/index.js
vendored
BIN
resources/dist/index.js
vendored
Binary file not shown.
BIN
resources/dist/index.js.map
vendored
BIN
resources/dist/index.js.map
vendored
Binary file not shown.
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue