Skip to content

Commit

Permalink
Handle multiple occurrences of the URL shortcut {{cpan Module}}
Browse files Browse the repository at this point in the history
  • Loading branch information
mateu committed Feb 16, 2011
1 parent f8e2937 commit feabaa9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
- Auto save, simplified button choices
- more rows to fallback to when autoresize fails

[Remedies]
- Support multiple cpan shortcuts

0.01 2011-02-15 00:36:58 America/Denver
[Remedies]
- Exclude Fixture from require modules since it's in the dist.
Expand Down
2 changes: 1 addition & 1 deletion lib/Mojito/Filter/Shortcuts.pm
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ sub cpan_URL {
my ($content) = @_;
return if !$content;

$content =~ s/{{cpan\s+(.*)?}}/<a href="http:\/\/search.cpan.org\/perldoc?$1">$1<\/a>/i;
$content =~ s/{{cpan\s+([^}]*)}}/<a href="http:\/\/search.cpan.org\/perldoc?$1">$1<\/a>/sig;
return $content;
}

Expand Down

0 comments on commit feabaa9

Please sign in to comment.