feat: truncate description
This commit is contained in:
@@ -19,3 +19,6 @@ function geojson_to_searchable_string(location) {
|
||||
return ifdef(location.properties.name, "", ", ") + ifdef(location.properties.street, "", ifdef(location.properties.housenumber, " ",", ")) + ifdef(location.properties.city, "", ", ") + ifdef(location.properties.country, "", "")
|
||||
}
|
||||
|
||||
function truncate(str, n, url){
|
||||
return (str.length > n) ? str.slice(0, n-1) + '<a href="' + url + '">…</a>' : str;
|
||||
};
|
||||
|
Reference in New Issue
Block a user