Skip to content

Commit

Permalink
fixed bug where some titles were not being queried for correctly beca…
Browse files Browse the repository at this point in the history
…use of capitalization.
  • Loading branch information
davidlivingrooms committed Jun 22, 2015
1 parent 309ae84 commit eeece66
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions public/js/wikisearch.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ module.exports = {
// Map the remote source JSsON array to a JavaScript array
return $.map(articles, function (article) {
return {
value: capitalizeWords(article.title)
value: article.title
};
});
},
Expand All @@ -39,10 +39,6 @@ module.exports = {
limit: 10
});

function capitalizeWords(str) {
return str.replace(/\b./g, function(m){ return m.toUpperCase(); });
}

articles.initialize();

// Instantiate the Typeahead UI
Expand Down

0 comments on commit eeece66

Please sign in to comment.