twitter-text 1.2.2 → 1.2.3

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.
Files changed (3) hide show
  1. data/Rakefile +1 -1
  2. data/lib/regex.rb +2 -2
  3. metadata +4 -4
data/Rakefile CHANGED
@@ -11,7 +11,7 @@ require 'digest'
11
11
 
12
12
  spec = Gem::Specification.new do |s|
13
13
  s.name = "twitter-text"
14
- s.version = "1.2.2"
14
+ s.version = "1.2.3"
15
15
  s.authors = ["Matt Sanford", "Patrick Ewing", "Ben Cherry", "Britt Selvitelle", "Raffi Krikorian"]
16
16
  s.email = ["matt@twitter.com", "patrick.henry.ewing@gmail.com", "bcherry@gmail.com", "bs@brittspace.com", "raffi@twitter.com"]
17
17
  s.homepage = "http://twitter.com"
data/lib/regex.rb CHANGED
@@ -43,7 +43,7 @@ module Twitter
43
43
  LATIN_ACCENTS = [(0xc0..0xd6).to_a, (0xd8..0xf6).to_a, (0xf8..0xff).to_a].flatten.pack('U*').freeze
44
44
  REGEXEN[:latin_accents] = /[#{LATIN_ACCENTS}]+/o
45
45
 
46
- REGEXEN[:end_screen_name_match] = /^#{REGEXEN[:at_signs]}|#{REGEXEN[:latin_accents]}/o
46
+ REGEXEN[:end_screen_name_match] = /^(?:#{REGEXEN[:at_signs]}|#{REGEXEN[:latin_accents]}|:\/\/)/o
47
47
 
48
48
  # Characters considered valid in a hashtag but not at the beginning, where only a-z and 0-9 are valid.
49
49
  HASHTAG_CHARACTERS = /[a-z0-9_#{LATIN_ACCENTS}]/io
@@ -52,7 +52,7 @@ module Twitter
52
52
  REGEXEN[:auto_link_emoticon] = /(8\-\#|8\-E|\+\-\(|\`\@|\`O|\<\|:~\(|\}:o\{|:\-\[|\>o\<|X\-\/|\[:-\]\-I\-|\/\/\/\/Ö\\\\\\\\|\(\|:\|\/\)|∑:\*\)|\( \| \))/
53
53
 
54
54
  # URL related hash regex collection
55
- REGEXEN[:valid_preceding_chars] = /(?:[^-\/"':!=A-Z0-9_]|^|\:)/i
55
+ REGEXEN[:valid_preceding_chars] = /(?:[^-\/"':!=A-Z0-9_@@]|^|\:)/i
56
56
  REGEXEN[:valid_domain] = /(?:[^[:punct:]\s][\.-](?=[^[:punct:]\s])|[^[:punct:]\s]){1,}\.[a-z]{2,}(?::[0-9]+)?/i
57
57
 
58
58
  # For protocol-less URLs, we'll accept them if they end in one of a handful of likely TLDs
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: 27
4
+ hash: 25
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 2
9
- - 2
10
- version: 1.2.2
9
+ - 3
10
+ version: 1.2.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Matt Sanford
@@ -19,7 +19,7 @@ autorequire: ""
19
19
  bindir: bin
20
20
  cert_chain: []
21
21
 
22
- date: 2010-10-08 00:00:00 -07:00
22
+ date: 2010-11-01 00:00:00 -07:00
23
23
  default_executable:
24
24
  dependencies:
25
25
  - !ruby/object:Gem::Dependency