colors 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,7 @@
1
+ 0.0.7
2
+ - [[:punct:]] changed into [^[:alnum:]] for detecting word edges
1
3
  0.0.6
2
- - README update - gemcutter repository instead of github
4
+ - README update - gemcutter repository instead of github
3
5
  0.0.5
4
6
  - homepage changed to github.com/apohllo/colors
5
7
  0.0.4
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "colors"
3
- s.version = "0.0.6"
4
- s.date = "2009-10-08"
3
+ s.version = "0.0.7"
4
+ s.date = "2009-12-07"
5
5
  s.summary = "Ruby String extesion for colored strings"
6
6
  s.email = "apohllo@o2.pl"
7
7
  s.homepage = "http://github.com/apohllo/colors"
@@ -34,7 +34,7 @@ class String
34
34
  # => *abc* abcd
35
35
  def hl(type=:bold,word=nil)
36
36
  if word
37
- self.gsub(/(\s|\A|[[:punct:]])#{word}(\s|\Z|[[:punct:]])/,
37
+ self.gsub(/(\s|\A|[^[:alnum:]])#{word}(\s|\Z|[^[:alnum:]])/,
38
38
  "\\1" + HIGHLIGHT[type] + word.to_s + HIGHLIGHT[:end] + "\\2")
39
39
  else
40
40
  HIGHLIGHT[type] + self.to_s + HIGHLIGHT[:end]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: colors
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aleksander Pohl
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-08 00:00:00 +02:00
12
+ date: 2009-12-07 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies: []
15
15