ensure state is dropped when a page stops embeddeding the version

master
Joey Hess 2007-12-08 19:12:50 -05:00
parent b4b452f4ee
commit a829e5b865
1 changed files with 10 additions and 3 deletions

View File

@ -14,9 +14,16 @@ sub import { #{{{
sub needsbuild (@) { #{{{
my $needsbuild=shift;
foreach my $page (keys %pagestate) {
if (exists $pagestate{$page}{version}{shown} &&
$pagestate{$page}{version}{shown} ne $IkiWiki::version) {
push @$needsbuild, $pagesources{$page};
if (exists $pagestate{$page}{version}{shown}) {
if ($pagestate{$page}{version}{shown} ne $IkiWiki::version) {
push @$needsbuild, $pagesources{$page};
}
if (grep { $_ eq $pagesources{$page} } @$needsbuild) {
# remove state, will be re-added if
# the version is still shown during the
# rebuild
delete $pagestate{$page}{version}{shown};
}
}
}
} # }}}