<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -149,8 +149,8 @@ module BBRuby
       &quot;Maybe try looking on [url]http://google.com[/url]&quot;,
       :link],
     'Link (Automatic)' =&gt; [
-      /\s(https?:\/\/.*?(?=\s))/,
-      ' &lt;a href=&quot;\1&quot;&gt;\1&lt;/a&gt;',
+      /(\A|\s)((https?:\/\/|www\.)[^\s&lt;]+)/,
+      ' &lt;a href=&quot;\2&quot;&gt;\2&lt;/a&gt;',
       'Hyperlink (automatic)',
       'Maybe try looking on http://www.google.com',
       :link],  </diff>
      <filename>lib/bb-ruby.rb</filename>
    </modified>
    <modified>
      <diff>@@ -143,6 +143,10 @@ class TestBBRuby &lt; Test::Unit::TestCase
 
   def test_auto_link
     assert_equal %Q(previous text &lt;a href=&quot;http://www.google.com&quot;&gt;http://www.google.com&lt;/a&gt; post text), 'previous text http://www.google.com post text'.bbcode_to_html
+    assert_equal %Q( &lt;a href=&quot;http://google.com&quot;&gt;http://google.com&lt;/a&gt; is my favorite search engine), 'http://google.com is my favorite search engine'.bbcode_to_html
+    assert_equal %Q(Try using google &lt;a href=&quot;http://google.com&quot;&gt;http://google.com&lt;/a&gt;), 'Try using google http://google.com'.bbcode_to_html
+    assert_equal %Q(Try using googlehttp://google.com), 'Try using googlehttp://google.com'.bbcode_to_html
+    assert_equal %Q( &lt;a href=&quot;http://google.com&quot;&gt;http://google.com&lt;/a&gt;), 'http://google.com'.bbcode_to_html
   end
 
   def test_html_escaping</diff>
      <filename>test/test_bb-ruby.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>ca5bca6742cc6027faed53ad8566491a229eafe2</id>
    </parent>
  </parents>
  <author>
    <name>Craig P Jolicoeur</name>
    <email>cpjolicoeur@gmail.com</email>
  </author>
  <url>http://github.com/cpjolicoeur/bb-ruby/commit/b11f42d68a79ac61bb260c3dabd437af04bd53df</url>
  <id>b11f42d68a79ac61bb260c3dabd437af04bd53df</id>
  <committed-date>2009-06-11T09:31:48-07:00</committed-date>
  <authored-date>2009-06-11T09:31:48-07:00</authored-date>
  <message>better auto-link support</message>
  <tree>810e7780488a8a7b8539c6d5dfe603c91642dc4d</tree>
  <committer>
    <name>Craig P Jolicoeur</name>
    <email>cpjolicoeur@gmail.com</email>
  </committer>
</commit>
