:named_table,
{:read_concurrency, true}
]
+ @emoji_regex ~r/:[A-Za-z0-9_-]+(@.+)?:/
defstruct [:code, :file, :tags, :safe_code, :safe_file]
def emoji_url(_), do: nil
+ def emoji_name_with_instance(name, url) do
+ url = url |> URI.parse() |> Map.get(:host)
+ "#{name}@#{url}"
+ end
+
emoji_qualification_map =
emojis
|> Enum.filter(&String.contains?(&1, "\uFE0F"))
end
def fully_qualify_emoji(emoji), do: emoji
+
+ def matches_shortcode?(nil), do: false
+ def matches_shortcode?(s), do: Regex.match?(@emoji_regex, s)
end