diff options
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/calendar.pm | 4 | ||||
-rw-r--r-- | IkiWiki/Plugin/inline.pm | 4 | ||||
-rw-r--r-- | IkiWiki/Plugin/map.pm | 4 | ||||
-rw-r--r-- | IkiWiki/Render.pm | 22 |
4 files changed, 22 insertions, 12 deletions
diff --git a/IkiWiki/Plugin/calendar.pm b/IkiWiki/Plugin/calendar.pm index c25893f72..5d16dff75 100644 --- a/IkiWiki/Plugin/calendar.pm +++ b/IkiWiki/Plugin/calendar.pm @@ -212,7 +212,9 @@ EOF add_depends($params{page}, $params{pages}); # Explicitly add all currently linked pages as dependencies, so # that if they are removed, the calendar will be sure to be updated. - add_depends($params{page}, join(" or ", @list)); + foreach my $p (@list) { + add_depends($params{page}, $p); + } return $calendar; } diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 3a2f4b7bc..a501566b5 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -251,7 +251,9 @@ sub preprocess_inline (@) { # Explicitly add all currently displayed pages as dependencies, so # that if they are removed or otherwise changed, the inline will be # sure to be updated. - add_depends($params{page}, join(" or ", $#list >= $#feedlist ? @list : @feedlist)); + foreach my $p ($#list >= $#feedlist ? @list : @feedlist) { + add_depends($params{page}, $p); + } if ($feeds && exists $params{feedpages}) { @feedlist=pagespec_match_list(\@feedlist, $params{feedpages}, location => $params{page}); diff --git a/IkiWiki/Plugin/map.pm b/IkiWiki/Plugin/map.pm index 826dbbd66..54146dc46 100644 --- a/IkiWiki/Plugin/map.pm +++ b/IkiWiki/Plugin/map.pm @@ -73,7 +73,9 @@ sub preprocess (@) { add_depends($params{page}, $params{pages}); # Explicitly add all currently shown pages, to detect when pages # are removed. - add_depends($params{page}, join(" or ", keys %mapitems)); + foreach my $item (keys %mapitems) { + add_depends($params{page}, $item); + } # Create the map. my $parent=""; diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index 578142d2e..fb28b6e3b 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -455,20 +455,24 @@ sub refresh () { my @changed=(keys %rendered, @del); # rebuild dependant pages - foreach my $f (@$files) { + F: foreach my $f (@$files) { next if $rendered{$f}; my $p=pagename($f); if (exists $depends{$p}) { - # only consider internal files - # if the page explicitly depends on such files - foreach my $file (@changed, $depends{$p}=~/internal\(/ ? @internal : ()) { - next if $f eq $file; - my $page=pagename($file); - if (pagespec_match($page, $depends{$p}, location => $p)) { - debug(sprintf(gettext("building %s, which depends on %s"), $f, $page)); + foreach my $d (keys %{$depends{$p}}) { + # only consider internal files + # if the page explicitly depends on such files + my @pages = map { + pagename($_) + } grep { + $_ ne $f + } (@changed, $d =~ /internal\(/ ? @internal : ()); + @pages = pagespec_match_list(\@pages, $d, location => $p); + if (@pages) { + debug(sprintf(gettext("building %s, which depends on %s"), $f, $pages[0])); render($f); $rendered{$f}=1; - last; + next F; } } } |