aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IkiWiki/Plugin/link.pm10
-rw-r--r--doc/bugs/emails_should_not_be_considered_as_broken_links.mdwn4
2 files changed, 3 insertions, 11 deletions
diff --git a/IkiWiki/Plugin/link.pm b/IkiWiki/Plugin/link.pm
index 87e06ca89..ef01f1107 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 ($$;$) {
diff --git a/doc/bugs/emails_should_not_be_considered_as_broken_links.mdwn b/doc/bugs/emails_should_not_be_considered_as_broken_links.mdwn
index 353c3653d..5aad1292a 100644
--- a/doc/bugs/emails_should_not_be_considered_as_broken_links.mdwn
+++ b/doc/bugs/emails_should_not_be_considered_as_broken_links.mdwn
@@ -9,6 +9,4 @@ The [[ikiwiki/directive/brokenlinks]] directive lists emails when used inside [[
>> and it was easier to make ikiwiki's wikilinks do so too, rather
>> than put entirely different link handling into creole.
>>
->> Anyway, I've fixed this, although it leaves some weirdness if a page
->> is created with a name like an email address and that same email address
->> was previously used for external links. [[done]] --[[Joey]]
+>> Anyway, I've fixed this. [[done]] --[[Joey]]