From: Simon McVittie Date: Mon, 24 Aug 2009 23:21:19 +0000 (+0100) Subject: use pagespec_match_list X-Git-Tag: 3.1415926~65^2~3 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=df8ab3406d67dd7d97fc45324ebb0e30c30dc9b0;p=ikiwiki.git use pagespec_match_list --- diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm index b9f1d7754..fb28b6e3b 100644 --- a/IkiWiki/Render.pm +++ b/IkiWiki/Render.pm @@ -462,15 +462,17 @@ sub refresh () { foreach my $d (keys %{$depends{$p}}) { # only consider internal files # if the page explicitly depends on such files - foreach my $file (@changed, $d=~/internal\(/ ? @internal : ()) { - next if $f eq $file; - my $page=pagename($file); - if (pagespec_match($page, $d, location => $p)) { - debug(sprintf(gettext("building %s, which depends on %s"), $f, $page)); - render($f); - $rendered{$f}=1; - next F; - } + 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; } } }