Bugfix for wikilink containing an email address not showing up in brokenlinks list.
[ikiwiki.git] / IkiWiki / Plugin / link.pm
index f6c3573f75f5508dc810464162e9fb9a1ad8f527..87e06ca899b51868646346a77670835caa7deb07 100644 (file)
@@ -64,23 +64,21 @@ sub checkconfig () {
        }
 }
 
-sub is_externallink ($$;$$) {
+sub is_externallink ($$;$) {
        my $page = shift;
        my $url = shift;
        my $anchor = shift;
-       my $force = shift;
        
        if (defined $anchor) {
                $url.="#".$anchor;
        }
 
-       if (! $force && $url =~ /$email_regexp/) {
+       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/)
 }
 
@@ -140,7 +138,7 @@ sub scan (@) {
        my $content=$params{content};
 
        while ($content =~ /(?<!\\)$link_regexp/g) {
-               if (! is_externallink($page, $2, $3, 1)) {
+               if (! is_externallink($page, $2, $3)) {
                        add_link($page, linkpage($2));
                }
        }