jump to comments anchor after post
authorJoey Hess <joey@gnu.kitenet.net>
Thu, 18 Dec 2008 01:29:55 +0000 (20:29 -0500)
committerJoey Hess <joey@gnu.kitenet.net>
Thu, 18 Dec 2008 01:29:55 +0000 (20:29 -0500)
Not ideal, it would be nicer to jump to the actual comment posted, but no
anchor is available.

IkiWiki/Plugin/comments.pm

index db829f34461712ff9d803d2d8c51963acffc48e5..2ca2d0a1d02d2e9332571ea1f3fe2ef5876afdb0 100644 (file)
@@ -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 {