* Fix multipoint shortcode bug
* Added testcase for composite emoji shortcode
def codepoint_to_unicode(codepoint)
if codepoint.include?('-')
- codepoint.split('-').map(&:hex).pack('U')
+ codepoint.split('-').map(&:hex).pack('U*')
else
[codepoint.hex].pack('U')
end
expect(emojify(text)).to eq '📖 Book'
end
+ it 'converts composite emoji shortcodes to unicode' do
+ text = ':couple_ww:'
+ expect(emojify(text)).to eq '👩❤👩'
+ end
+
it 'does not convert shortcodes that are part of a string into unicode' do
text = ':see_no_evil::hear_no_evil::speak_no_evil:'
expect(emojify(text)).to eq text