<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -148,15 +148,12 @@ module BBRuby
       'Hyperlink (implied)',
       &quot;Maybe try looking on [url]http://google.com[/url]&quot;,
       :link],
-    # 
-    # TODO: fix automatic links
-    #
-    # 'Link (Automatic)' =&gt; [
-    #   /http:\/\/(.*?)[^&lt;\/a&gt;]/,
-    #   '&lt;a href=&quot;\1&quot;&gt;\1&lt;/a&gt;',
-    #   'Hyperlink (automatic)',
-    #   nil, nil,
-    #   :link],  
+    'Link (Automatic)' =&gt; [
+      /\s(https?:\/\/.*?(?=\s))/,
+      ' &lt;a href=&quot;\1&quot;&gt;\1&lt;/a&gt;',
+      'Hyperlink (automatic)',
+      'Maybe try looking on http://www.google.com',
+      :link],  
     'Image (Resized)' =&gt; [
       /\[img(:.+)? size=(['&quot;]?)(\d+)x(\d+)\2\](.*?)\[\/img\1?\]/im,
       '&lt;img src=&quot;\5&quot; style=&quot;width: \3px; height: \4px;&quot; /&gt;',</diff>
      <filename>lib/bb-ruby.rb</filename>
    </modified>
    <modified>
      <diff>@@ -141,6 +141,10 @@ class TestBBRuby &lt; Test::Unit::TestCase
     assert_equal '&lt;a href=&quot;mailto:wadus@wadus.com&quot;&gt;wadus@wadus.com&lt;/a&gt;', '[email]wadus@wadus.com[/email]'.bbcode_to_html
   end
 
+  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
+  end
+
   def test_html_escaping
     assert_equal &quot;&lt;strong&gt;&amp;lt;i&amp;gt;foobar&amp;lt;/i&amp;gt;&lt;/strong&gt;&quot;, '[b]&lt;i&gt;foobar&lt;/i&gt;[/b]'.bbcode_to_html
     assert_equal &quot;&lt;strong&gt;&lt;i&gt;foobar&lt;/i&gt;&lt;/strong&gt;&quot;, '[b]&lt;i&gt;foobar&lt;/i&gt;[/b]'.bbcode_to_html({}, false)
@@ -169,7 +173,7 @@ class TestBBRuby &lt; Test::Unit::TestCase
   end
 
   def test_self_tag_list
-    assert_equal 30, BBRuby.tag_list.size
+    assert_equal 31, BBRuby.tag_list.size
   end
   
   def test_redefinition_of_tag_html</diff>
      <filename>test/test_bb-ruby.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>7b20c80cd86d209db8a3dbf2bb936888968fe26a</id>
    </parent>
  </parents>
  <author>
    <name>Craig P Jolicoeur</name>
    <email>cpjolicoeur@gmail.com</email>
  </author>
  <url>http://github.com/cpjolicoeur/bb-ruby/commit/1b8ef99bdbb003e8e75856135699662f8666aa4b</url>
  <id>1b8ef99bdbb003e8e75856135699662f8666aa4b</id>
  <committed-date>2009-06-10T19:09:23-07:00</committed-date>
  <authored-date>2009-06-10T19:09:23-07:00</authored-date>
  <message>fix auto_link tags

* still not 100% perfect, but works for most occurances</message>
  <tree>c1d63db8895ca99e7dd0d8fe3d55ef45ca2dd987</tree>
  <committer>
    <name>Craig P Jolicoeur</name>
    <email>cpjolicoeur@gmail.com</email>
  </committer>
</commit>
