X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/78de33d2eaf8a187b610685f70e60b7d5946374f..65e726f201d7b9919271cfe7e8a7314a6abf0fc3:/IkiWiki/Plugin/comments.pm diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index 57f5b1304..a39dab36c 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -947,14 +947,16 @@ sub match_comment ($$;@) { my $page = shift; my $glob = shift; - # To see if it's a comment, check the source file type. - # Deal with comments that were just deleted. - my $source=exists $IkiWiki::pagesources{$page} ? - $IkiWiki::pagesources{$page} : - $IkiWiki::delpagesources{$page}; - my $type=defined $source ? IkiWiki::pagetype($source) : undef; - if (! defined $type || $type ne "_comment") { - return IkiWiki::FailReason->new("$page is not a comment"); + if (! $postcomment) { + # To see if it's a comment, check the source file type. + # Deal with comments that were just deleted. + my $source=exists $IkiWiki::pagesources{$page} ? + $IkiWiki::pagesources{$page} : + $IkiWiki::delpagesources{$page}; + my $type=defined $source ? IkiWiki::pagetype($source) : undef; + if (! defined $type || $type ne "_comment") { + return IkiWiki::FailReason->new("$page is not a comment"); + } } return match_glob($page, "$glob/*", internal => 1, @_);