Limit pagedescription text to 60 characters (#122)

* Trim extra description off for pagedescription

* Github CI lint - phpcbf

Co-authored-by: github-actions <github-actions@users.noreply.github.com>
This commit is contained in:
alistair3149 2020-06-09 12:49:27 -04:00 committed by GitHub
parent 9d6f97cae6
commit c14bb9135e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -373,7 +373,7 @@ window.WMTypeAhead = function ( appendTo, searchInput ) {
pageDescription = page.extract || '';
break;
case 'pagedescription':
pageDescription = page.pageprops.description || '';
pageDescription = page.pageprops.description.substring(0, 60) + '...' || '';
break;
}