Skip to content

Commit

Permalink
add comment to whitespace detection for older chrome version
Browse files Browse the repository at this point in the history
  • Loading branch information
ts-thomas committed Jan 6, 2024
1 parent 1436eff commit 497a1ac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/lang.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ export function pipeline(str, normalize, split, _collapse){
// TODO improve normalize + remove non-delimited chars like in "I'm" + split on whitespace+

export const regex_whitespace = /[\p{Z}\p{S}\p{P}\p{C}]+/u;
// https://github.com/nextapps-de/flexsearch/pull/414
//export const regex_whitespace = /[\s\xA0\u2000-\u200B\u2028\u2029\u3000\ufeff!"#$%&'()*+,\-./:;<=>?@[\\\]^_`{|}~]/
const regex_normalize = /[\u0300-\u036f]/g;

export function normalize(str){
Expand Down

0 comments on commit 497a1ac

Please sign in to comment.