IkiWiki::Render: run scan hooks for internal pages, as well as preprocessing
authorSimon McVittie <smcv@debian.org>
Sat, 4 Jun 2011 15:50:07 +0000 (16:50 +0100)
committerSimon McVittie <smcv@debian.org>
Sat, 4 Jun 2011 15:50:07 +0000 (16:50 +0100)
IkiWiki/Render.pm

index 5288abc6dc40549c8debe95c6259172deb51b7b1..05132a8a81560a3ce0039b748ce0458d5742ad53 100644 (file)
@@ -475,8 +475,18 @@ sub find_changed ($) {
                        $pagemtime{$page}=$stat[9];
 
                        if (isinternal($page)) {
+                               my $content = readfile($srcfile);
+
                                # Preprocess internal page in scan-only mode.
-                               preprocess($page, $page, readfile($srcfile), 1);
+                               preprocess($page, $page, $content, 1);
+
+                               run_hooks(scan => sub {
+                                       shift->(
+                                               page => $page,
+                                               content => $content,
+                                       );
+                               });
+
                                push @internal_changed, $file;
                        }
                        else {