aboutsummaryrefslogtreecommitdiff
path: root/IkiWiki/Render.pm
diff options
context:
space:
mode:
authorSimon McVittie <smcv@debian.org>2013-09-13 09:14:24 +0100
committerSimon McVittie <smcv@debian.org>2014-03-05 10:42:19 +0000
commitcad753baf9b25ddd8e4cb5454766fce1cdc4217a (patch)
tree08542fdc01ba624de6c16ebc51e65dff58f70aa3 /IkiWiki/Render.pm
parent007eded20cb9ba9d528281a41a95b54db2157df5 (diff)
downloadikiwiki-cad753baf9b25ddd8e4cb5454766fce1cdc4217a.tar
ikiwiki-cad753baf9b25ddd8e4cb5454766fce1cdc4217a.tar.gz
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.
Diffstat (limited to 'IkiWiki/Render.pm')
-rw-r--r--IkiWiki/Render.pm4
1 files changed, 3 insertions, 1 deletions
diff --git a/IkiWiki/Render.pm b/IkiWiki/Render.pm
index fa2940b01..9e93534c6 100644
--- a/IkiWiki/Render.pm
+++ b/IkiWiki/Render.pm
@@ -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));