mack_ruby_core_extensions 0.1.27 → 0.1.28

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/extensions/string.rb +8 -2
  2. metadata +2 -2
@@ -194,9 +194,15 @@ class String
194
194
  if longword =~ textile_regex #if the longword is a textile link...ignore and recheck for the link text only
195
195
  textile_link = textile_regex.match(longword)[0]
196
196
  link_text = textile_regex.match(longword)[1]
197
- longword = link_text
197
+
198
+ if link_text[0].to_i == 34 #adds the double quote back if missing from above regex
199
+ longword = link_text
200
+ else
201
+ textile_link = "\"" + textile_link
202
+ longword = "\"" + link_text
203
+ end
204
+
198
205
  if longword =~ long_regex #link text is long...allow break
199
- textile_link = '"' + textile_link unless textile_link[0].to_i == 34 #adds the double quote back if missing from above regex
200
206
  textile_link.scan(/.{1,#{every}}/).join("<wbr/>")
201
207
  else
202
208
  textile_link #the url is what triggered the match...so leave it alone
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mack_ruby_core_extensions
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.27
4
+ version: 0.1.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - markbates
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-05-09 00:00:00 -04:00
12
+ date: 2008-05-20 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies: []
15
15