- Fix retained memory.
- Relax required ruby version
- Moved expensive computations to constant #53
- Introduced
Twemoji::Utils::Unicode.unpack#51 - Do not set attribute on generated element if not specified #49
- Fixes woman skin 6 emoji #44
- Fixes name of kiss emoji #42
- Abstract constants into yaml files #39
- Soften nokogiri dependency >= 1.6 #38
Twemoji.parsecan now parse unicode values, too #35- [New API]
Twemoji.emoji_pattern_unicode- List all emoji unicodes in a regex - [New API]
Twemoji.emoji_pattern_all- List all emoji names and unicodes in a regex
- [New API]
- Fix
imgtagaltattribute render incorrectly #29
-
Add support to twemoji.js V2
-
Add
Twemoji.svg(not loaded by default), looks like:{ ... ":heart_eyes:" => "https://twemoji.maxcdn.com/2/svg/1f60d.svg", ... }
-
Add
Twemoji.png(not loaded by default), looks like:{ ... ":heart_eyes:" => "https://twemoji.maxcdn.com/2/72x72/1f60d.png", ... }
- Require Ruby 2.0+
Twemoji::CODESchanges toTwemoji.codesTwemoji::ICODESchanges toTwemoji.invert_codesasset_rootconfig default value changed tohttps://twemoji.maxcdn.com/2file_extconfig default value changed tosvg, available values are"svg"and"png"- PNG now only has one size
72x72 - Remove
Twemoji.to_jsonmethod
- Fix
find_by_unicodethat only can find by single unicode 051f5a5
- Lose released Gem weight #26
- Add a
bin/hackscript to make gem development easier #25 - Add missing 47 emojis #27
- Fix emoji_pattern not properly escaped #27
- Change
:thumbsup::thumbsdown:to:+1::-1:
- Export JSON for SVG and PNG (16x16, 36x36, 72x72) #18
- Soften Nokogiri dependency to ~> 1.6.2 (>= 1.6.2, < 1.7) #19
-
Breaking change:
Tewmoji.parseimg_attroption changed toimg_attrs#16Old behaviour to specify
imgHTML attributes was passed in as a string toimg_attroption fromTwemoji.parse. This API is removed.Now please use
img_attrsand passed in attribute-value pair you want in the form of Hash. You can now specify any HTML attributes to rendered emojiimg.Note that the value of
imgtag attributes can be a proc-like object run against emoji name. Say if you do not want the colon from the title attribute ofimgtag. You can define ano_colon = ->(name) { name.gsub(":", "") }then passed intoTwemoji.parselike below example:> Twemoji.parse(":heart_eyes:", img_attrs: { title: no_colon }) <img draggable="false" title="heart_eyes" alt=":heart_eyes:" src="https://twemoji.maxcdn.com/16x16/1f60d.png" class="twemoji" >
Twemoji.configure do |config| config.img_attrs = { style: "height: 1.3em;" } end
-
Twemoji Configuration #15
Twemoji.configure do |config| config.asset_root = "https://twemoji.awesomecdn.com/" config.file_ext = ".svg" config.image_size = nil # only png need to set size config.class_name = "twemoji" config.img_attr = "style='height: 1.3em;'" end
-
Some more documentations @JuanitoFatas
-
Behave more like twemoji.js. @bramswenson #5
New Methods:
-
Twemoji.find_bynow acceptsunicodekeyword argument (either a raw unicode or escaped-unicode string) to find emoji text -
Add
Twemoji.find_by_unicodeto find emoji text by raw emoji unicode or escaped-unicode string -
Add
Twemoji.render_unicodeto render raw emoji unicode from emoji text or emoji code
Changes:
imgtag'saltchanges from emoji text like:heart_eyes:to actual unicode"😍"
-
-
Restrict Nokogiri to (1.4..1.6.5). @JuanitoFatas #3
- Add ability to specify img tag attribute. @JuanitoFatas #1.