X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/6e67219eff9ea599e9efa8a846a4c78c76c5b008..94268a46cd30fc72b51714e42e9db741eb29cc73:/IkiWiki/Plugin/link.pm?ds=inline diff --git a/IkiWiki/Plugin/link.pm b/IkiWiki/Plugin/link.pm index 87e06ca89..f6c3573f7 100644 --- a/IkiWiki/Plugin/link.pm +++ b/IkiWiki/Plugin/link.pm @@ -64,21 +64,23 @@ 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 ($url =~ /$email_regexp/) { + if (! $force && $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/) } @@ -138,7 +140,7 @@ sub scan (@) { my $content=$params{content}; while ($content =~ /(?