limax
limax copied to clipboard
Apostrophe in the custom option is ignored
Expected behavior:
>limax("wendy's", {custom: ["'"]})
wendy's
Actual behavior:
>limax("wendy's", {custom: ["'"]})
wendys
The separateApostrophes
option does not help here.
Hi, this looks like a bug. I guess the following RegEx should exclude any chars that are included in custom
:
https://github.com/lovell/limax/blob/ffdcda7eb51de6268d0a5877a1a11d1695045d05/lib/limax.js#L20-L23
Happy to accept a PR if you're able.
I figured out that there are more similar issues originating from speakingurl package on which limax depends. Fixing this issue #39 won't help much unless the upstream issue https://github.com/pid/speakingurl/issues/124 is resolved first.