improve location matching and fix some performance issues as well

This commit is contained in:
Laura Klünder 2019-12-26 12:11:51 +01:00
parent f5d9b13d75
commit e59932f2b2
5 changed files with 20 additions and 6 deletions

View file

@ -115,7 +115,7 @@ c3nav = {
location.elem = c3nav._build_location_html(location);
location.title_words = location.title.toLowerCase().split(/\s+/);
location.subtitle_words = location.subtitle.toLowerCase().split(/\s+/);
location.match = ' ' + location.title_words.join(' ') + ' ' + location.subtitle_words.join(' ') + ' ' + location.slug;
location.match = ' ' + location.title_words.join(' ') + ' ' + location.subtitle_words.join(' ') + ' ' + location.slug + ' ' + location.add_search;
locations.push(location);
locations_by_id[location.id] = location;
if (location.point && location.label_settings) {