]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki.pm
web commit by https://camrdale.myopenid.com/: Try putting span around a list
[ikiwiki.git] / IkiWiki.pm
index 720afdecd0faabf496f8e93797be1174b010c91c..1c87831879afd5f154983123d3da1b7b188758ee 100644 (file)
@@ -39,7 +39,7 @@ sub defaultconfig () { #{{{
        wiki_link_regexp => qr{
                \[\[                    # beginning of link
                (?:
-                       ([^\]\|\n]+)    # 1: link text
+                       ([^\]\|\n\s]+)  # 1: link text
                        \|              # followed by '|'
                )?                      # optional
                
@@ -588,6 +588,9 @@ sub htmllink ($$$;@) { #{{{
        if (defined $opts{rel}) {
                push @attrs, ' rel="'.$opts{rel}.'"';
        }
+       if (defined $opts{class}) {
+               push @attrs, ' class="'.$opts{class}.'"';
+       }
 
        return "<a href=\"$bestlink\"@attrs>$linktext</a>";
 } #}}}
@@ -1220,7 +1223,7 @@ sub match_link ($$;@) { #{{{
                                if $bestlink eq IkiWiki::bestlink($page, $p);
                }
                else {
-                       return IkiWiki::SuccessReason->new("$page links to page matching $link")
+                       return IkiWiki::SuccessReason->new("$page links to page $p matching $link")
                                if match_glob($p, $link, %params);
                }
        }