diff options
author | Joey Hess <joey@kitenet.net> | 2011-06-29 18:35:29 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-06-29 18:35:29 -0400 |
commit | a965e024302c900df9a77ed9eccc8609d2986571 (patch) | |
tree | 154368b56da0ee6ba8c55ee7e0092e8c3386fea7 /IkiWiki/Plugin | |
parent | a18a62aa30fb80448793376a79fe2e567212f270 (diff) | |
download | ikiwiki-a965e024302c900df9a77ed9eccc8609d2986571.tar ikiwiki-a965e024302c900df9a77ed9eccc8609d2986571.tar.gz |
Bugfix for wikilink containing an email address not showing up in brokenlinks list.
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r-- | IkiWiki/Plugin/link.pm | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/IkiWiki/Plugin/link.pm b/IkiWiki/Plugin/link.pm index f6c3573f7..87e06ca89 100644 --- a/IkiWiki/Plugin/link.pm +++ b/IkiWiki/Plugin/link.pm @@ -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)); } } |