summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
6e67219)
This way, an email-like link will be a mailto until a matching page
is created, then it will link to the page. And removing the page will
convert it back to a mailto.
-sub is_externallink ($$;$) {
+sub is_externallink ($$;$$) {
my $page = shift;
my $url = shift;
my $anchor = shift;
my $page = shift;
my $url = shift;
my $anchor = shift;
if (defined $anchor) {
$url.="#".$anchor;
}
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))))
}
# 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/)
}
my $content=$params{content};
while ($content =~ /(?<!\\)$link_regexp/g) {
my $content=$params{content};
while ($content =~ /(?<!\\)$link_regexp/g) {
- if (! is_externallink($page, $2, $3)) {
+ if (! is_externallink($page, $2, $3, 1)) {
add_link($page, linkpage($2));
}
}
add_link($page, linkpage($2));
}
}