]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/meta.pm
fix handling of influences of pagespecs that fail to match
[git.ikiwiki.info.git] / IkiWiki / Plugin / meta.pm
index b2295923e31d94ed8d393a09d1ebeb2f05604878..da3e6223311e1f6a3a4808409fb2a93af2d38e63 100644 (file)
@@ -191,11 +191,11 @@ sub preprocess (@) {
                if ($value !~ /^\w+:\/\//) {
                        my ($redir_page, $redir_anchor) = split /\#/, $value;
 
-                       add_depends($page, $redir_page);
                        my $link=bestlink($page, $redir_page);
                        if (! length $link) {
                                error gettext("redir page not found")
                        }
+                       add_depends($page, $link, presence => 1);
 
                        $value=urlto($link, $page);
                        $value.='#'.$redir_anchor if defined $redir_anchor;
@@ -291,7 +291,7 @@ sub match {
 
        if (defined $val) {
                if ($val=~/^$re$/i) {
-                       return IkiWiki::SuccessReason->new("$re matches $field of $page");
+                       return IkiWiki::SuccessReason->new("$re matches $field of $page", $page => $IkiWiki::DEPEND_CONTENT);
                }
                else {
                        return IkiWiki::FailReason->new("$re does not match $field of $page");
@@ -305,7 +305,7 @@ sub match {
 package IkiWiki::PageSpec;
 
 sub match_title ($$;@) {
-       IkiWiki::Plugin::meta::match("title", @_);      
+       IkiWiki::Plugin::meta::match("title", @_);
 }
 
 sub match_author ($$;@) {