* Fix orphans plugin to not count a link to a nonexistant page as a reason
authorjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sun, 25 Jun 2006 07:21:53 +0000 (07:21 +0000)
committerjoey <joey@0fa5a96a-9a0e-0410-b3b2-a0fd24251071>
Sun, 25 Jun 2006 07:21:53 +0000 (07:21 +0000)
  for a page not being an orphan.

IkiWiki/Plugin/orphans.pm
debian/changelog

index f8035db54b2de8d64426e7e54a14593f1c78eeb8..12b9d2e5236a1512dcb53f1a01b9d097b29d93c0 100644 (file)
@@ -31,7 +31,11 @@ sub preprocess (@) { #{{{
                next unless IkiWiki::globlist_match($page, $params{pages});
                # If the page has a link to some other page, it's
                # indirectly linked to a page via that page's backlinks.
-               next if grep { length $_ && ($_ !~/\/Discussion$/i || ! $IkiWiki::config{discussion}) && IkiWiki::bestlink($page, $_) ne $page } @{$IkiWiki::links{$page}};
+               next if grep { 
+                       length $_ &&
+                       ($_ !~ /\/Discussion$/i || ! $IkiWiki::config{discussion}) &&
+                       IkiWiki::bestlink($page, $_) !~ /^($page|)$/ 
+               } @{$IkiWiki::links{$page}};
                push @orphans, $page;
        }
        
index 6f42b8dd18d733ec9b387e03a0a201a5704a276d..c1bd99da5fa68efce2fe107a71070ac4429e0127 100644 (file)
@@ -1,3 +1,10 @@
+ikiwiki (1.8) UNRELEASED; urgency=low
+
+  * Fix orphans plugin to not count a link to a nonexistant page as a reason
+    for a page not being an orphan.
+
+ -- Joey Hess <joeyh@debian.org>  Sun, 25 Jun 2006 03:20:48 -0400
+
 ikiwiki (1.7) unstable; urgency=low
 
   * Updated logo from Recai with some kerning and alingment tuning.