X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/9c5f4761d8bf785ca98d5fda66fbbe9dbe11897c..423aa99998c49c18d0f8adf3240840c4fa981d0e:/IkiWiki.pm diff --git a/IkiWiki.pm b/IkiWiki.pm index 0485da75c..1c8783187 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -39,7 +39,7 @@ sub defaultconfig () { #{{{ wiki_link_regexp => qr{ \[\[ # beginning of link (?: - ([^\]\|]+) # 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"; } #}}} @@ -903,7 +906,7 @@ sub template_params (@) { #{{{ my @ret=( filter => sub { my $text_ref = shift; - ${$text_ref} = Encode::decode_utf8(${$text_ref}); + ${$text_ref} = decode_utf8(${$text_ref}); }, filename => $filename, loop_context_vars => 1, @@ -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); } }