@external_resource "lib/pleroma/emoji-test.txt"
+ regional_indicators =
+ Enum.map(127_462..127_487, fn codepoint ->
+ <<codepoint::utf8>>
+ end)
+
emojis =
@external_resource
|> File.read!()
end)
|> Enum.uniq()
+ emojis = emojis ++ regional_indicators
+
for emoji <- emojis do
def is_unicode_emoji?(unquote(emoji)), do: true
end
assert Emoji.is_unicode_emoji?("🤰")
assert Emoji.is_unicode_emoji?("❤️")
assert Emoji.is_unicode_emoji?("🏳️⚧️")
+
+ # Additionally, we accept regional indicators.
+ assert Emoji.is_unicode_emoji?("🇵")
+ assert Emoji.is_unicode_emoji?("🇴")
+ assert Emoji.is_unicode_emoji?("🇬")
end
end