]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/orphans.pm
Render.pm: also use 'our' for $backlinks_calculated
[git.ikiwiki.info.git] / IkiWiki / Plugin / orphans.pm
index b910758e0353e9d5d2762bbce41d009490fed120..8e9ab0ff402a12799843981787f427dcfc13812c 100644 (file)
@@ -6,20 +6,20 @@ use warnings;
 use strict;
 use IkiWiki 2.00;
 
 use strict;
 use IkiWiki 2.00;
 
-sub import { #{{{
+sub import {
        hook(type => "getsetup", id => "orphans", call => \&getsetup);
        hook(type => "preprocess", id => "orphans", call => \&preprocess);
        hook(type => "getsetup", id => "orphans", call => \&getsetup);
        hook(type => "preprocess", id => "orphans", call => \&preprocess);
-} # }}}
+}
 
 
-sub getsetup () { #{{{
+sub getsetup () {
        return 
                plugin => {
                        safe => 1,
                        rebuild => undef,
                },
        return 
                plugin => {
                        safe => 1,
                        rebuild => undef,
                },
-} #}}}
+}
 
 
-sub preprocess (@) { #{{{
+sub preprocess (@) {
        my %params=@_;
        $params{pages}="*" unless defined $params{pages};
        
        my %params=@_;
        $params{pages}="*" unless defined $params{pages};
        
@@ -43,7 +43,7 @@ sub preprocess (@) { #{{{
                next if grep { 
                        length $_ &&
                        ($_ !~ /\/\Q$discussion\E$/i || ! $config{discussion}) &&
                next if grep { 
                        length $_ &&
                        ($_ !~ /\/\Q$discussion\E$/i || ! $config{discussion}) &&
-                       bestlink($page, $_) !~ /^($page|)$/ 
+                       bestlink($page, $_) !~ /^(\Q$page\E|)$/ 
                } @{$links{$page}};
                push @orphans, $page;
        }
                } @{$links{$page}};
                push @orphans, $page;
        }
@@ -58,6 +58,6 @@ sub preprocess (@) { #{{{
                                "</li>"
                        } sort @orphans).
                "</ul>\n";
                                "</li>"
                        } sort @orphans).
                "</ul>\n";
-} # }}}
+}
 
 1
 
 1