FIX: unescape emoji in pretty title

This makes emoji in title consistent, it is later escaped back when needed
This commit is contained in:
Sam
2017-05-15 10:27:54 -04:00
parent b839eb41ff
commit 44d7fe89ed
3 changed files with 16 additions and 1 deletions

View File

@@ -146,6 +146,16 @@ class Emoji
@unicode_replacements
end
def self.unicode_unescape(string)
string.each_char.map do |c|
if str = unicode_replacements[c]
":#{str}:"
else
c
end
end.join
end
def self.lookup_unicode(name)
@reverse_map ||= begin
map = {}