aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki.pm
diff options
context:
space:
mode:
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-02-20 01:49:52 +0000
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>2007-02-20 01:49:52 +0000
commit1081aa1ee5cf8b0bf64b1b0a804091b48b620c39 (patch)
tree32a7a772ca1bd5a55cb7810c0392cb0d61072356 /IkiWiki.pm
parent04e95f185e9613700dc64364d60d7d5ef2454945 (diff)
downloadikiwiki-1081aa1ee5cf8b0bf64b1b0a804091b48b620c39.tar
ikiwiki-1081aa1ee5cf8b0bf64b1b0a804091b48b620c39.tar.gz
fix a bug
Diffstat (limited to 'IkiWiki.pm')
-rw-r--r--IkiWiki.pm6
1 files changed, 4 insertions, 2 deletions
diff --git a/IkiWiki.pm b/IkiWiki.pm
index 2392c787b..d2fde957c 100644
--- a/IkiWiki.pm
+++ b/IkiWiki.pm
@@ -455,6 +455,7 @@ sub htmllink ($$$;$$$) { #{{{
if (! $noimageinline && isinlinableimage($bestlink)) {
return "<img src=\"$bestlink\" alt=\"$linktext\" />";
}
+
return "<a href=\"$bestlink\">$linktext</a>";
} #}}}
@@ -489,8 +490,9 @@ sub linkify ($$$) { #{{{
my $content=shift;
$content =~ s{(\\?)$config{wiki_link_regexp}}{
- $2 ? ( $1 ? "[[$2|$3]]" : htmllink($lpage, $page, titlepage($3), 0, 0, pagetitle($2)))
- : ( $1 ? "[[$3]]" : htmllink($lpage, $page, titlepage($3)))
+ defined $2
+ ? ( $1 ? "[[$2|$3]]" : htmllink($lpage, $page, titlepage($3), 0, 0, pagetitle($2)))
+ : ( $1 ? "[[$3]]" : htmllink($lpage, $page, titlepage($3)))
}eg;
return $content;