"recommended for general interchange"
@external_resource
|> File.read!()
|> String.split("\n")
- |> Enum.filter(fn line -> line != "" and not String.starts_with?(line, "#") end)
+ |> Enum.filter(fn line ->
+ line != "" and not String.starts_with?(line, "#") and
+ String.contains?(line, "fully-qualified")
+ end)
|> Enum.map(fn line ->
line
|> String.split(";", parts: 2)
refute Emoji.is_unicode_emoji?("X")
refute Emoji.is_unicode_emoji?("ね")
- assert Emoji.is_unicode_emoji?("☂")
+ # Only accept fully-qualified (RGI) emoji
+ # See http://www.unicode.org/reports/tr51/
+ refute Emoji.is_unicode_emoji?("❤")
+ refute Emoji.is_unicode_emoji?("☂")
+
assert Emoji.is_unicode_emoji?("🥺")
assert Emoji.is_unicode_emoji?("🤰")
assert Emoji.is_unicode_emoji?("❤️")