Skip to content

Commit 79f8699

Browse files
author
Brian Vaughn
committed
Optimized SimpleTokenizer RegExp
1 parent 093db49 commit 79f8699

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

source/StopWordsMap.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
/**
44
* Stop words list copied from Lunr JS.
55
*/
6-
export const StopWordsMap = {
6+
export var StopWordsMap = {
77
a: 'a',
88
able: 'able',
99
about: 'about',

source/Tokenizer/SimpleTokenizer.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
import type { ITokenizer } from './Tokenizer';
44

5-
const REGEX = /[^a-zа-яё0-9\-\u00000']+/i;
5+
var REGEX = /[^a-zа-яё0-9\-']+/i;
66

77
/**
88
* Simple tokenizer that splits strings on whitespace characters and returns an array of all non-empty substrings.

0 commit comments

Comments
 (0)