]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/search.pm
Add a postscan hook.
[git.ikiwiki.info.git] / IkiWiki / Plugin / search.pm
index 284f477fae5b32f63f9c9159f06c4af84dea2acd..822b5974eca016a21043b1bf2aba92a3410ea8bc 100644 (file)
@@ -9,7 +9,7 @@ use IkiWiki 2.00;
 sub import { #{{{
        hook(type => "checkconfig", id => "search", call => \&checkconfig);
        hook(type => "pagetemplate", id => "search", call => \&pagetemplate);
-       hook(type => "sanitize", id => "search", call => \&index);
+       hook(type => "postscan", id => "search", call => \&index);
        hook(type => "delete", id => "search", call => \&delete);
        hook(type => "cgi", id => "search", call => \&cgi);
 } # }}}
@@ -48,8 +48,6 @@ my $scrubber;
 my $stemmer;
 sub index (@) { #{{{
        my %params=@_;
-       
-       return $params{content} if $IkiWiki::preprocessing{$params{destpage}};
 
        setupfiles();
 
@@ -132,8 +130,6 @@ sub index (@) { #{{{
 
        $doc->add_term($pageterm);
        $db->replace_document_by_term($pageterm, $doc);
-
-       return $params{content};
 } #}}}
 
 sub delete (@) { #{{{