bb-ruby 0.9.2 → 0.9.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.
- data/History.txt +4 -0
- data/lib/bb-ruby.rb +3 -3
- data/test/test_bb-ruby.rb +4 -0
- metadata +3 -3
data/History.txt
CHANGED
data/lib/bb-ruby.rb
CHANGED
@@ -2,7 +2,7 @@ $:.unshift(File.dirname(__FILE__)) unless
|
|
2
2
|
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
|
3
3
|
|
4
4
|
module BBRuby
|
5
|
-
VERSION = '0.9.
|
5
|
+
VERSION = '0.9.3'
|
6
6
|
|
7
7
|
# allowable image formats
|
8
8
|
@@imageformats = 'png|bmp|jpg|gif|jpeg'
|
@@ -149,8 +149,8 @@ module BBRuby
|
|
149
149
|
"Maybe try looking on [url]http://google.com[/url]",
|
150
150
|
:link],
|
151
151
|
'Link (Automatic)' => [
|
152
|
-
|
153
|
-
' <a href="\
|
152
|
+
/(\A|\s)((https?:\/\/|www\.)[^\s<]+)/,
|
153
|
+
' <a href="\2">\2</a>',
|
154
154
|
'Hyperlink (automatic)',
|
155
155
|
'Maybe try looking on http://www.google.com',
|
156
156
|
:link],
|
data/test/test_bb-ruby.rb
CHANGED
@@ -143,6 +143,10 @@ class TestBBRuby < Test::Unit::TestCase
|
|
143
143
|
|
144
144
|
def test_auto_link
|
145
145
|
assert_equal %Q(previous text <a href="http://www.google.com">http://www.google.com</a> post text), 'previous text http://www.google.com post text'.bbcode_to_html
|
146
|
+
assert_equal %Q( <a href="http://google.com">http://google.com</a> is my favorite search engine), 'http://google.com is my favorite search engine'.bbcode_to_html
|
147
|
+
assert_equal %Q(Try using google <a href="http://google.com">http://google.com</a>), 'Try using google http://google.com'.bbcode_to_html
|
148
|
+
assert_equal %Q(Try using googlehttp://google.com), 'Try using googlehttp://google.com'.bbcode_to_html
|
149
|
+
assert_equal %Q( <a href="http://google.com">http://google.com</a>), 'http://google.com'.bbcode_to_html
|
146
150
|
end
|
147
151
|
|
148
152
|
def test_html_escaping
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bb-ruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Craig P Jolicoeur
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-06-
|
12
|
+
date: 2009-06-11 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 1.
|
23
|
+
version: 1.2.1
|
24
24
|
version:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: hoe
|