lajjne/emojione

Emoji with skin tone modifier sometimes rendered as emoji+color

lajjne opened this issue ยท 1 comments

Unicode emoji, e.g. ๐Ÿ‘๐Ÿฟ, is converted to :thumbsup::tone1: instead of :thumbsup_tone1: When converting to img you get ๐Ÿ‘โšซ

[TestMethod]
public void TonedEmoji() {
    string unicode = "๐Ÿ‘";
    string expected = ":thumbsup:";
    string shortname = Emojione.UnicodeToShortname(unicode);
    string img = Emojione.ShortnameToImage(shortname);
    Assert.AreEqual(expected, shortname);
    expected = @"<img class=""eo"" src=""/img/eo/1f44d.svg"" alt="":thumbsup:"" />";
    Assert.AreEqual(expected, img);

    unicode = "๐Ÿ‘๐Ÿป";
    expected = ":thumbsup_tone1:";
    shortname = Emojione.UnicodeToShortname(unicode);
    img = Emojione.ShortnameToImage(shortname);
    Assert.AreEqual(expected, shortname);
    expected = @"<img class=""eo"" src=""/img/eo/1f44d-1f3fb.svg"" alt="":thumbsup_tone1:"" />";
    Assert.AreEqual(expected, img);

    unicode = "๐Ÿ‘๐Ÿฟ";
    shortname = Emojione.UnicodeToShortname(unicode);
    expected = ":thumbsup_tone5:";
    img = Emojione.ShortnameToImage(shortname);
    Assert.AreEqual(expected, shortname);
    expected = @"<img class=""eo"" src=""/img/eo/1f44d-1f3ff.svg"" alt="":thumbsup_tone5:"" />";
    Assert.AreEqual(expected, img);
}