X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/8489e68916eabf0ce09242e4dac66b9f646d46c4..3629e2dc993803d9cc821abec55ca95446eed558:/IkiWiki.pm diff --git a/IkiWiki.pm b/IkiWiki.pm index 720afdecd..1c8783187 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -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 "$linktext"; } #}}} @@ -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); } }