X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/b4b452f4ee73fb67c6ff0aa761783def7483313b..d3008b626ea6130d3b75662725f6f2c412fc71ea:/IkiWiki/Plugin/version.pm?ds=inline diff --git a/IkiWiki/Plugin/version.pm b/IkiWiki/Plugin/version.pm index 0e8d7b5e7..f96d2df06 100644 --- a/IkiWiki/Plugin/version.pm +++ b/IkiWiki/Plugin/version.pm @@ -14,9 +14,17 @@ 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 (exists $pagesources{$page} && + 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}; + } } } } # }}}