X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/df8ab3406d67dd7d97fc45324ebb0e30c30dc9b0..5b8ffe3111737eaf5efe3f5699fcc936b9fd4e62:/IkiWiki/Render.pm?ds=inline diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index fb28b6e3b..da2d7b4cc 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -460,19 +460,21 @@ sub refresh () { my $p=pagename($f); if (exists $depends{$p}) { foreach my $d (keys %{$depends{$p}}) { + my $sub=pagespec_translate($d); + next if $@ || ! defined $sub; + # 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; - next F; + # if the page explicitly depends + # on such files + foreach my $file (@changed, $d =~ /internal\(/ ? @internal : ()) { + next if $file eq $f; + my $page=pagename($file); + if ($sub->($page, location => $p)) { + debug(sprintf(gettext("building %s, which depends on %s"), $f, $page)); + render($f); + $rendered{$f}=1; + next F; + } } } }