summaryrefslogtreecommitdiff
path: root/IkiWiki
diff options
context:
space:
mode:
authorJoey Hess <joey@kitenet.net>2011-03-28 11:53:55 -0400
committerJoey Hess <joey@kitenet.net>2011-03-28 11:53:55 -0400
commita0e31f38d55f659ed9ef07ce16482308807435f8 (patch)
tree7bc6362977d08dbf5c2fcb1eb9e26ced816e55f0 /IkiWiki
parent690840698921e1a17831ff6dc15d3ae304abaf37 (diff)
comment: Better fix to avoid showing comments of subpages, while not breaking manual inlining of comments.
Diffstat (limited to 'IkiWiki')
-rw-r--r--IkiWiki/Plugin/comments.pm8
1 files changed, 3 insertions, 5 deletions
diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm
index 6691dbafa..8d46ed579 100644
--- a/IkiWiki/Plugin/comments.pm
+++ b/IkiWiki/Plugin/comments.pm
@@ -755,10 +755,8 @@ sub previewcomment ($$$) {
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 ($) {
@@ -785,7 +783,7 @@ sub pagetemplate (@) {
my $comments = undef;
if ($shown) {
$comments = IkiWiki::preprocess_inline(
- pages => "comment($page)",
+ pages => "comment($page) and !comment($page/*)",
template => 'comment',
show => 0,
reverse => 'yes',