Skip to content

Commit

Permalink
compare search term and entry title both in lower case
Browse files Browse the repository at this point in the history
  • Loading branch information
mustardamus committed Jan 16, 2013
1 parent 45190d5 commit 62cda20
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion app/assets/javascripts/search.js.coffee
Expand Up @@ -64,7 +64,7 @@ class jqapi.Search
for entry in entries # go through array
titleLow = entry.title.toLowerCase() # search in lower case

if titleLow.indexOf(term) isnt -1 # search term in title?
if titleLow.indexOf(term.toLowerCase()) isnt -1 # search term in title?
results.push entry # if so push entry to array

results # return result array
Expand Down
1 change: 0 additions & 1 deletion app/views/index.haml
Expand Up @@ -280,7 +280,6 @@
Released very first version.

%a#follow{:href => 'http://twitter.com/jqapi'} Follow @jqapi for updates


:javascript
if(window.location.hostname === 'jqapi.com') {
Expand Down

0 comments on commit 62cda20

Please sign in to comment.