]> sipb.mit.edu Git - ikiwiki.git/commitdiff
fix a bug
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Tue, 20 Feb 2007 01:49:52 +0000 (01:49 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Tue, 20 Feb 2007 01:49:52 +0000 (01:49 +0000)
IkiWiki.pm
debian/changelog

index 2392c787bedc49e7c34d8c654b6e8d1ef0fb7064..d2fde957c2eb5011909200b56654a22c9eb8011b 100644 (file)
@@ -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;
index 2e5f1b9906a49df32ed8d144dd083eaab86e2aad..30cdc652489302a99b98e348265376451d0df028 100644 (file)
@@ -8,6 +8,8 @@ ikiwiki (1.44) UNRELEASED; urgency=low
     http://openid.net/login-bg.gif into their wiki.
   * Allow setting NOTAINT=1 when building the wiki to remove taint checking
     flags, which can be useful on some hosting providers.
+  * Fix a bug that made links like [[0|foo]] use "foo" as the link text,
+    instead of "0".
 
  -- Joey Hess <joeyh@debian.org>  Mon, 19 Feb 2007 20:08:24 -0500