sub commentsshown ($) {
my $page=shift;
- return ! pagespec_match($page, "comment(*)",
- location => $page) &&
- pagespec_match($page, $config{comments_pagespec},
- location => $page);
+ return pagespec_match($page, $config{comments_pagespec},
+ location => $page);
}
sub commentsopen ($) {
my $comments = undef;
if ($shown) {
$comments = IkiWiki::preprocess_inline(
- pages => "comment($page)",
+ pages => "comment($page) and !comment($page/*)",
template => 'comment',
show => 0,
reverse => 'yes',
}
}
- return match_glob($page, "$glob/*", internal => 1, @_) &&
- ! match_glob($page, "$glob/*/*", internal => 1, @_);
+ return match_glob($page, "$glob/*", internal => 1, @_);
}
sub match_comment_pending ($$;@) {
return IkiWiki::FailReason->new("$page is not a pending comment");
}
- return match_glob($page, "$glob/*", internal => 1, @_) &&
- ! match_glob($page, "$glob/*/*", internal => 1, @_);
+ return match_glob($page, "$glob/*", internal => 1, @_);
}
1