Skip to content

Commit

Permalink
Fixed lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
iangilman committed Mar 18, 2014
1 parent b58259d commit fb47ec0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions js/jquery.lunr.search.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,19 @@
var parseDate = function(input) {
var parts = input.match(/(\d+)/g);
return new Date(parts[0], parts[1]-1, parts[2]); // months are 0-based
}
};

var LunrSearch = (function() {
function LunrSearch(elem, options) {
this.$elem = elem;
this.$results = $(options.results),
this.$entries = $(options.entries, this.$results),
this.$results = $(options.results);
this.$entries = $(options.entries, this.$results);
this.indexDataUrl = options.indexUrl;
this.index = this.createIndex();
this.template = this.compileTemplate($(options.template));

this.initialize();
};
}

LunrSearch.prototype.initialize = function() {
var self = this;
Expand Down Expand Up @@ -89,7 +89,7 @@
date: parseDate(raw.date),
pubdate: function() {
// HTML5 pubdate
return dateFormat(parseDate(raw.date), 'yyyy-mm-dd')
return dateFormat(parseDate(raw.date), 'yyyy-mm-dd');
},
displaydate: function() {
// only for posts (e.g. Oct 12, 2012)
Expand Down Expand Up @@ -117,7 +117,7 @@
this.$entries.empty();
} else {
var results = $.map(this.index.search(query), function(result) {
return $.grep(entries, function(entry) { return entry.id === parseInt(result.ref, 10) })[0];
return $.grep(entries, function(entry) { return entry.id === parseInt(result.ref, 10); })[0];
});

this.displayResults(results);
Expand All @@ -131,7 +131,7 @@
$entries.empty();

if (entries.length === 0) {
$entries.append('<p>Nothing found.</p>')
$entries.append('<p>Nothing found.</p>');
} else {
$entries.append(this.template({entries: entries}));
}
Expand Down

0 comments on commit fb47ec0

Please sign in to comment.