Bug with Unicode
wooorm opened this issue · 5 comments
wooorm commented
> S = require('github-slugger');
[Function: BananaSlug]
> s = new S
BananaSlug { occurrences: {} }
> s.slug('I ♥ unicode')
'i-♥-unicode'...but, GitHub slugs that to i--unicode.
Apparently, this used to work fine: github-slugger used to output i--unicode (compare the last Travis build with the one I just triggered).
It’s rather weird that this changed, I’ve got no idea why...
wooorm commented
This is introduced in emoji-regex@6.1.1 in mathiasbynens/emoji-regex@37d8faa, but exposed (as the old code was still used in the npm module) in emoji-regex@6.1.3 (and no, there was no emoji-regex@6.1.2 release).
Not sure whether ♥ is special though...
Flet commented
Should we lock down package.json to a specific version of emoji-regex for now?
wooorm commented
Yeah I think so!
wooorm commented
Oh, and do you have ideas for a fix? I’m thinking an overwrite for this character?
Flet commented
published as github-slugger@1.1.2