Permalink
Browse files

An even better URL regex?

  • Loading branch information...
1 parent e12b888 commit b1f65f7046b856ca615f71274d11cf62dd7a38d6 Lee committed May 4, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/App/Colloqueer/Message.pm
@@ -17,7 +17,7 @@ has 'html' => (isa => 'Str', is => 'ro', lazy => 1, default => sub {
my $string = App::Colloqueer::IRC::Formatting->formatted_string_to_html($self->text);
$string =~ s/\\/\\\\/g;
$string =~ s/\s{2}/  /g;
- $string =~ s/(https?\:\/\/.+)([\b<])/<a href="$1">$1<\/a>$2/gi;
+ $string =~ s/(https?\:\/\/.+?)([\b\s<])/<a href="$1">$1<\/a>$2/gi;
return $string;
});

0 comments on commit b1f65f7

Please sign in to comment.