forrestthewoods / lib_fts

single-file public domain libraries
666 stars 136 forks source link

CAMEL_BONUS is mistakenly added in JavaScript version #31

Closed gyk closed 3 years ago

gyk commented 3 years ago

neighbor === neighbor.toLowerCase() evaluates to true for separators ('' and space), so an uppercase letter following`''or' 'will getCAMEL_BONUSas well asSEPARATOR_BONUS. This is different from the C++ version where::islower(neighbor)` is false for non-alphabetic characters.

forrestthewoods commented 3 years ago

Good catch! Can you submit a pull request with a fix?