Skip to content

Commit

Permalink
Merge pull request #43 from ConvivioTeam/remove-duplicate-search-resu…
Browse files Browse the repository at this point in the history
…lt-snippets

Remove duplicate search result snippets
  • Loading branch information
jonathanglassman authored Aug 1, 2018
2 parents 2b9e62f + fe6ebea commit 1def8cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/assets/javascripts/_modules/collapsible-navigation.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
var $topLevelItem = $($topLevelItems[i]);
var $heading = $topLevelItem.find('> a');
var $listing = $topLevelItem.find('> ul');
var id = 'toc-' + $heading.text().toLowerCase().replace(' ', '-')
var id = 'toc-' + $heading.text().toLowerCase().replace(' ', '-');
// Only add collapsible functionality if there are children.
if ($listing.length == 0) {
continue;
Expand Down
7 changes: 4 additions & 3 deletions lib/assets/javascripts/_modules/search.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,10 @@
break;
}

var containsMark = sentences[i].includes('mark>');
if (containsMark) {
selectedSentences.push(sentences[i].trim());
var sentence = sentences[i].trim();
var containsMark = sentence.includes('mark>');
if (containsMark && (selectedSentences.indexOf(sentence) == -1)) {
selectedSentences.push(sentence);
}
}
if(selectedSentences.length > 0) {
Expand Down

0 comments on commit 1def8cf

Please sign in to comment.