Emoji with skin tone modifier sometimes rendered as emoji+color
lajjne opened this issue ยท 1 comments
lajjne commented
Unicode emoji, e.g. ๐๐ฟ, is converted to :thumbsup::tone1:
instead of :thumbsup_tone1:
When converting to img you get ๐โซ
lajjne commented
[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);
}