X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/a965e024302c900df9a77ed9eccc8609d2986571..bed518378afafa626d98260a7754bfae7cdb8327:/IkiWiki/Plugin/link.pm diff --git a/IkiWiki/Plugin/link.pm b/IkiWiki/Plugin/link.pm index 87e06ca89..1ba28eafd 100644 --- a/IkiWiki/Plugin/link.pm +++ b/IkiWiki/Plugin/link.pm @@ -7,7 +7,7 @@ use IkiWiki 3.00; my $link_regexp; -my $email_regexp = qr/^.+@.+$/; +my $email_regexp = qr/^.+@.+\..+$/; my $url_regexp = qr/^(?:[^:]+:\/\/|mailto:).*/i; sub import { @@ -73,13 +73,7 @@ sub is_externallink ($$;$) { $url.="#".$anchor; } - if ($url =~ /$email_regexp/) { - # url looks like an email address, so we assume it - # is supposed to be an external link if there is no - # page with that name. - return (! (bestlink($page, linkpage($url)))) - } - return ($url =~ /$url_regexp/) + return ($url =~ /$url_regexp|$email_regexp/) } sub externallink ($$;$) { @@ -150,9 +144,9 @@ sub renamepage (@) { my $old=$params{oldpage}; my $new=$params{newpage}; - $params{content} =~ s{(?