IkiWiki::Render: make 'scan' idempotent

If it does nothing when a page has already been scanned, we can use it
at any time to force a page to be scanned. In particular, the
templatebody plugin is going to need this.
master
Simon McVittie 2013-09-13 09:14:24 +01:00
parent 007eded20c
commit cad753baf9
1 changed files with 3 additions and 1 deletions

View File

@ -6,7 +6,7 @@ use warnings;
use strict;
use IkiWiki;
my (%backlinks, %rendered);
my (%backlinks, %rendered, %scanned);
our %brokenlinks;
my $links_calculated=0;
@ -154,6 +154,8 @@ sub genpage ($$) {
sub scan ($) {
my $file=shift;
return if $scanned{$file};
$scanned{$file}=1;
debug(sprintf(gettext("scanning %s"), $file));