Skip to content

Commit fe1c03e

Browse files
committed
Build version 2.3.8
1 parent 8e119ec commit fe1c03e

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
## 2.3.8
4+
5+
* Fix bug [#422](https://github.com/olivernn/lunr.js/issues/422) where a pipline function that returned null was not skipping the token as described in the documentation. Thanks [Stephen Cleary](https://github.com/StephenCleary) and [Rob Hoelz](https://github.com/hoelzro) for reporting and investigating.
6+
37
## 2.3.7
48

59
* Fix bug [#417](https://github.com/olivernn/lunr.js/issues/417) where leading white space would cause token position metadata to be reported incorrectly. Thanks [Rob Hoelz](https://github.com/hoelzro) for the fix.

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.3.7
1+
2.3.8

lunr.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.7
2+
* lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.8
33
* Copyright (C) 2019 Oliver Nightingale
44
* @license MIT
55
*/
@@ -54,7 +54,7 @@ var lunr = function (config) {
5454
return builder.build()
5555
}
5656

57-
lunr.version = "2.3.7"
57+
lunr.version = "2.3.8"
5858
/*!
5959
* lunr.utils
6060
* Copyright (C) 2019 Oliver Nightingale
@@ -509,8 +509,8 @@ lunr.Pipeline.registeredFunctions = Object.create(null)
509509
* or mutate (or add) metadata for a given token.
510510
*
511511
* A pipeline function can indicate that the passed token should be discarded by returning
512-
* null. This token will not be passed to any downstream pipeline functions and will not be
513-
* added to the index.
512+
* null, undefined or an empty string. This token will not be passed to any downstream pipeline
513+
* functions and will not be added to the index.
514514
*
515515
* Multiple tokens can be returned by returning an array of tokens. Each token will be passed
516516
* to any downstream pipeline functions and all will returned tokens will be added to the index.
@@ -673,7 +673,7 @@ lunr.Pipeline.prototype.run = function (tokens) {
673673
for (var j = 0; j < tokens.length; j++) {
674674
var result = fn(tokens[j], j, tokens)
675675

676-
if (result === void 0 || result === '') continue
676+
if (result === null || result === void 0 || result === '') continue
677677

678678
if (Array.isArray(result)) {
679679
for (var k = 0; k < result.length; k++) {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "lunr",
33
"description": "Simple full-text search in your browser.",
4-
"version": "2.3.7",
4+
"version": "2.3.8",
55
"author": "Oliver Nightingale",
66
"keywords": ["search"],
77
"homepage": "https://lunrjs.com",

0 commit comments

Comments
 (0)