call preprocess in scan mode hooks before scan hooks
authorJoey Hess <joey@kitenet.net>
Mon, 30 Aug 2010 19:06:58 +0000 (15:06 -0400)
committerJoey Hess <joey@kitenet.net>
Mon, 30 Aug 2010 19:06:58 +0000 (15:06 -0400)
Following along with change in Render.pm

IkiWiki/Plugin/table.pm

index 2edd1eacd11a329d71d81add93c431462685ef03..f3c425a37dacd9d1389f0c53a0d7fbc52469c70b 100644 (file)
@@ -40,6 +40,9 @@ sub preprocess (@) {
                # scan that file too.
                return unless exists $params{file};
 
+               # Preprocess in scan-only mode.
+               IkiWiki::preprocess($params{page}, $params{page}, $params{data}, 1);
+
                IkiWiki::run_hooks(scan => sub {
                        shift->(
                                page => $params{page},
@@ -47,9 +50,6 @@ sub preprocess (@) {
                        );
                });
 
-               # Preprocess in scan-only mode.
-               IkiWiki::preprocess($params{page}, $params{page}, $params{data}, 1);
-
                return;
        }