twitter-text 1.4.7 → 1.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile.lock +1 -1
- data/lib/regex.rb +5 -4
- data/twitter-text.gemspec +1 -1
- metadata +6 -8
data/Gemfile.lock
CHANGED
data/lib/regex.rb
CHANGED
|
@@ -59,8 +59,8 @@ module Twitter
|
|
|
59
59
|
REGEXEN[:end_screen_name_match] = /^(?:#{REGEXEN[:at_signs]}|#{REGEXEN[:latin_accents]}|:\/\/)/o
|
|
60
60
|
|
|
61
61
|
CJ_HASHTAG_CHARACTERS = [
|
|
62
|
-
(0x30A1..0x30FA).to_a, # Katakana (full-width)
|
|
63
|
-
(0xFF66..
|
|
62
|
+
(0x30A1..0x30FA).to_a, 0x30FC, # Katakana (full-width)
|
|
63
|
+
(0xFF66..0xFF9F).to_a, # Katakana (half-width)
|
|
64
64
|
(0xFF10..0xFF19).to_a, (0xFF21..0xFF3A).to_a, (0xFF41..0xFF5A).to_a, # Latin (full-width)
|
|
65
65
|
(0x3041..0x3096).to_a, # Hiragana
|
|
66
66
|
(0x3400..0x4DBF).to_a, # Kanji (CJK Extension A)
|
|
@@ -68,10 +68,11 @@ module Twitter
|
|
|
68
68
|
(0x20000..0x2A6DF).to_a, # Kanji (CJK Extension B)
|
|
69
69
|
(0x2A700..0x2B73F).to_a, # Kanji (CJK Extension C)
|
|
70
70
|
(0x2B740..0x2B81F).to_a, # Kanji (CJK Extension D)
|
|
71
|
-
(0x2F800..0x2FA1F).to_a # Kanji (CJK supplement)
|
|
71
|
+
(0x2F800..0x2FA1F).to_a, # Kanji (CJK supplement)
|
|
72
|
+
0x3005 # Kanji (iteration mark)
|
|
72
73
|
].flatten.pack('U*').freeze
|
|
73
74
|
|
|
74
|
-
HASHTAG_BOUNDARY = /(?:\A|\z|#{REGEXEN[:spaces]}
|
|
75
|
+
HASHTAG_BOUNDARY = /(?:\A|\z|#{REGEXEN[:spaces]}|「|」|。|、|\.|!|\?|!|?|,)/
|
|
75
76
|
|
|
76
77
|
# A hashtag must contain latin characters, numbers and underscores, but not all numbers.
|
|
77
78
|
HASHTAG_ALPHA = /[a-z_#{LATIN_ACCENTS}#{NON_LATIN_HASHTAG_CHARS}#{CJ_HASHTAG_CHARACTERS}]/io
|
data/twitter-text.gemspec
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
spec = Gem::Specification.new do |s|
|
|
2
2
|
s.name = "twitter-text"
|
|
3
|
-
s.version = "1.4.
|
|
3
|
+
s.version = "1.4.8"
|
|
4
4
|
s.authors = ["Matt Sanford", "Patrick Ewing", "Ben Cherry", "Britt Selvitelle", "Raffi Krikorian", "J.P. Cummins", "Yoshimasa Niwa"]
|
|
5
5
|
s.email = ["matt@twitter.com", "patrick.henry.ewing@gmail.com", "bcherry@gmail.com", "bs@brittspace.com", "raffi@twitter.com", "jcummins@twitter.com", "niw@niw.at"]
|
|
6
6
|
s.homepage = "http://twitter.com"
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: twitter-text
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
5
|
-
prerelease:
|
|
4
|
+
hash: 23
|
|
5
|
+
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 1
|
|
8
8
|
- 4
|
|
9
|
-
-
|
|
10
|
-
version: 1.4.
|
|
9
|
+
- 8
|
|
10
|
+
version: 1.4.8
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Matt Sanford
|
|
@@ -21,8 +21,7 @@ autorequire:
|
|
|
21
21
|
bindir: bin
|
|
22
22
|
cert_chain: []
|
|
23
23
|
|
|
24
|
-
date: 2011-07-
|
|
25
|
-
default_executable:
|
|
24
|
+
date: 2011-07-13 00:00:00 Z
|
|
26
25
|
dependencies:
|
|
27
26
|
- !ruby/object:Gem::Dependency
|
|
28
27
|
name: nokogiri
|
|
@@ -139,7 +138,6 @@ files:
|
|
|
139
138
|
- spec/validation_spec.rb
|
|
140
139
|
- test/conformance_test.rb
|
|
141
140
|
- twitter-text.gemspec
|
|
142
|
-
has_rdoc: true
|
|
143
141
|
homepage: http://twitter.com
|
|
144
142
|
licenses: []
|
|
145
143
|
|
|
@@ -169,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
169
167
|
requirements: []
|
|
170
168
|
|
|
171
169
|
rubyforge_project:
|
|
172
|
-
rubygems_version: 1.
|
|
170
|
+
rubygems_version: 1.8.5
|
|
173
171
|
signing_key:
|
|
174
172
|
specification_version: 3
|
|
175
173
|
summary: Twitter text handling library
|