]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/comments.pm
jump to comments anchor after post
[git.ikiwiki.info.git] / IkiWiki / Plugin / comments.pm
index cb5a517a107ea94007f00ae77436d76f69ddbdae..2ca2d0a1d02d2e9332571ea1f3fe2ef5876afdb0 100644 (file)
@@ -36,7 +36,7 @@ sub getsetup () {
                },
                comments_pagespec => {
                        type => 'pagespec',
-                       example => 'blog/* and *!/Discussion',
+                       example => 'blog/* and !*/Discussion',
                        description => 'PageSpec of pages where comments are allowed',
                        link => 'ikiwiki/PageSpec',
                        safe => 1,
@@ -500,7 +500,8 @@ sub sessioncgi ($$) {
                error($conflict) if defined $conflict;
 
                # Bounce back to where we were, but defeat broken caches
-               my $anticache = "?updated=$page/$config{comments_pagename}$i";
+               # and jump to the comments anchor.
+               my $anticache = "?updated=$page/$config{comments_pagename}$i#comments";
                IkiWiki::redirect($cgi, urlto($page, undef, 1).$anticache);
        }
        else {