unicode-emoji 0.9.1 โ†’ 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8c4eb20ad652c14682be8230ae7d0055bbf20960
4
- data.tar.gz: 74859c59a011fc5e6464fac81851ff1e1c0f14c8
3
+ metadata.gz: 8df3bb4dced2b4a7c36f11f331e562a3a841324d
4
+ data.tar.gz: 067d77562f9271d1b02a30fc20bf5c62e7fb9376
5
5
  SHA512:
6
- metadata.gz: 42556f73e4623278ef522855822711fa133fbd7a0bd4c04b3a7c4aae8976e7678f5d8ea61408346517c768b3416f8808a37d0900ea7fdabd3a3bea96c0d3fe08
7
- data.tar.gz: 9491eebda45d972a0a11df1ce9f688f1c7c66646b09d261a6aff91549ddc5c3eb881a0bb71a8551da1a5046e074a44c993fc7479df98f6c927eaf5774691a6cd
6
+ metadata.gz: d1b1d6a88ffc93560d2e07923dc3fc8cd410ed8fd28adc26f5665c6bbb4d544d3e0b648afd3642a0cd4cafb578be39ffb1d5552515181dec37e93436d2a1db97
7
+ data.tar.gz: 5e7f632b49306b0bee09e7702aa2ad32d5283898a2192c8920913ea47cfe7e95da3b39dc87ab9851eb7b3bc767b24808ef5ca5ff4b55f7d9622f68639142f4ea
@@ -1,5 +1,9 @@
1
1
  ## CHANGELOG
2
2
 
3
+ ### 0.9.2
4
+
5
+ - REGEX_TEXT: Do not match if the text emoji is followed by a emoji modifier
6
+
3
7
  ### 0.9.1
4
8
 
5
9
  - Include a categorized list of recommended Emoji
data/README.md CHANGED
@@ -16,16 +16,6 @@ gem "unicode-emoji"
16
16
 
17
17
  ## Usage
18
18
 
19
- ### Properties
20
-
21
- Allows you to access the codepoint data form Unicode's [emoji-data.txt](http://unicode.org/Public/emoji/5.0/emoji-data.txt) file:
22
-
23
- ```ruby
24
- require "unicode/emoji"
25
-
26
- Unicode::Emoji.properties "โ˜" # => ["Emoji", "Emoji_Modifier_Base"]
27
- ```
28
-
29
19
  ### Regex
30
20
 
31
21
  Five Emoji regexes are included, which are compiled out of various Emoji Unicode data.
@@ -56,7 +46,9 @@ Regex | Description | Example Matches | Example Non-Matc
56
46
  `Unicode::Emoji::REGEX_TEXT` | Matches only textual singleton Emoji (except for singleton components, like digit 1) | `๐Ÿ˜ด๏ธŽ`, `โ–ถ` | `๐Ÿ˜ด`, `โ–ถ๏ธ`, `๐Ÿป`, `๐Ÿ›Œ๐Ÿฝ`, `๐Ÿ‡ต๐Ÿ‡น`, `๐Ÿ‡ต๐Ÿ‡ต`,`2๏ธโƒฃ`, `๐Ÿด๓ ง๓ ข๓ ณ๓ ฃ๓ ด๓ ฟ`, `๐Ÿด๓ ง๓ ข๓ ก๓ ง๓ ข๓ ฟ`, `๐Ÿคพ๐Ÿฝโ€โ™€๏ธ`, `๐Ÿค โ€๐Ÿคข`
57
47
  `Unicode::Emoji::REGEX_ANY` | Matches any Emoji-related codepoint (but no variation selectors or tags) | `๐Ÿ˜ด`, `โ–ถ`, `๐Ÿป`, `๐Ÿ›Œ`, `๐Ÿฝ`, `๐Ÿ‡ต`, `๐Ÿ‡น`, `2`, `๐Ÿด`, `๐Ÿคพ`, `โ™€`, `๐Ÿค `, `๐Ÿคข` | -
58
48
 
59
- ## List
49
+ More info about valid vs. recommended emoji in this [blog article on Emojipedia](http://blog.emojipedia.org/unicode-behind-the-curtain/).
50
+
51
+ ### List
60
52
 
61
53
  Use `Unicode::Emoji::LIST` or the list method to get a grouped (and ordered) list of Emoji:
62
54
 
@@ -73,6 +65,16 @@ Unicode::Emoji.list("Food & Drink", "food-asian")
73
65
 
74
66
  A markdown file with all recommended emoji can be found [in this gist](https://gist.github.com/janlelis/72f9be1f0ecca07372c64cf13894b801).
75
67
 
68
+ ### Properties
69
+
70
+ Allows you to access the codepoint data form Unicode's [emoji-data.txt](http://unicode.org/Public/emoji/5.0/emoji-data.txt) file:
71
+
72
+ ```ruby
73
+ require "unicode/emoji"
74
+
75
+ Unicode::Emoji.properties "โ˜" # => ["Emoji", "Emoji_Modifier_Base"]
76
+ ```
77
+
76
78
  ## Also See
77
79
 
78
80
  - [Unicodeยฎ Technical Standard #51](http://www.unicode.org/reports/tr51/proposed.html)
@@ -48,7 +48,7 @@ module Unicode
48
48
 
49
49
  text_presentation_sequence = \
50
50
  join[
51
- pack_and_join[TEXT_PRESENTATION]+ "(?!" + pack[EMOJI_VARIATION_SELECTOR] + ")" + pack[TEXT_VARIATION_SELECTOR] + "?",
51
+ pack_and_join[TEXT_PRESENTATION]+ "(?!" + pack_and_join[EMOJI_MODIFIERS + [EMOJI_VARIATION_SELECTOR]] + ")" + pack[TEXT_VARIATION_SELECTOR] + "?",
52
52
  pack_and_join[EMOJI_PRESENTATION] + pack[TEXT_VARIATION_SELECTOR]
53
53
  ]
54
54
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Unicode
4
4
  module Emoji
5
- VERSION = "0.9.1".freeze
5
+ VERSION = "0.9.2".freeze
6
6
  EMOJI_VERSION = "5.0".freeze
7
7
  DATA_DIRECTORY = File.expand_path(File.dirname(__FILE__) + '/../../../data/').freeze
8
8
  INDEX_FILENAME = (DATA_DIRECTORY + '/emoji.marshal.gz').freeze
@@ -255,6 +255,11 @@ describe Unicode::Emoji do
255
255
  assert_nil $&
256
256
  end
257
257
 
258
+ it "does not match textual singleton emoji in combination with emoji modifiers" do
259
+ "โœŒ๐Ÿป victory hand" =~ Unicode::Emoji::REGEX_TEXT
260
+ assert_nil $&
261
+ end
262
+
258
263
  it "does not match singleton 'component' emoji codepoints" do
259
264
  "๐Ÿป light skin tone" =~ Unicode::Emoji::REGEX_TEXT
260
265
  assert_nil $&
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: unicode-emoji
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 0.9.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jan Lelis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-10 00:00:00.000000000 Z
11
+ date: 2017-07-20 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: "[Emoji 5.0] Retrieve emoji data about Unicode codepoints. Also contains
14
14
  a regex to match emoji."
@@ -53,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
53
53
  version: '0'
54
54
  requirements: []
55
55
  rubyforge_project:
56
- rubygems_version: 2.6.8
56
+ rubygems_version: 2.6.11
57
57
  signing_key:
58
58
  specification_version: 4
59
59
  summary: Retrieve Emoji data about Unicode codepoints.