]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/comments.pm
comment: Better fix to avoid showing comments of subpages, while not breaking manual...
[ikiwiki.git] / IkiWiki / Plugin / comments.pm
index 6691dbafa2e0b0f74055992331b2d899616fd85b..8d46ed57983e6a0d0e7cac3c568a6cb368ec34a6 100644 (file)
@@ -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',