X-Git-Url: https://sipb.mit.edu/gitweb.cgi/ikiwiki.git/blobdiff_plain/a20bc7a3fc6a2f2369022873ef7c2afbd5e49105..9dc5685de44760d2c06a0376c97eb699de2f2964:/IkiWiki.pm diff --git a/IkiWiki.pm b/IkiWiki.pm index ac01ea418..b8e599928 100644 --- a/IkiWiki.pm +++ b/IkiWiki.pm @@ -881,7 +881,7 @@ sub bestlink ($$) { $l.="/" if length $l; $l.=$link; - if (exists $links{$l}) { + if (exists $pagesources{$l}) { return $l; } elsif (exists $pagecase{lc $l}) { @@ -891,7 +891,7 @@ sub bestlink ($$) { if (length $config{userdir}) { my $l = "$config{userdir}/".lc($link); - if (exists $links{$l}) { + if (exists $pagesources{$l}) { return $l; } elsif (exists $pagecase{lc $l}) { @@ -1081,11 +1081,10 @@ sub htmllink ($$$;@) { } my @attrs; - if (defined $opts{rel}) { - push @attrs, ' rel="'.$opts{rel}.'"'; - } - if (defined $opts{class}) { - push @attrs, ' class="'.$opts{class}.'"'; + foreach my $attr (qw{rel class title}) { + if (defined $opts{$attr}) { + push @attrs, " $attr=\"$opts{$attr}\""; + } } return "$linktext"; @@ -1408,7 +1407,7 @@ sub check_content (@) { my %old=map { $_ => 1 } split("\n", readfile(srcfile($pagesources{$params{page}}))); foreach my $line (split("\n", $params{content})) { - push @diff, $line if ! exists $old{$_}; + push @diff, $line if ! exists $old{$line}; } $params{diff}=join("\n", @diff); } @@ -2120,10 +2119,7 @@ sub merge_influences { } else { # influence blocker - print STDERR "merging $this and $other; found influence blocker\n"; $this->[1]={}; - $this->[2]=1; - return; } }