From: Joey Hess Date: Mon, 21 Jan 2019 15:57:23 +0000 (-0400) Subject: fix permalink to comments X-Git-Tag: 3.20190207~43 X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/commitdiff_plain/5d44bf4b5c97220daec4066b7d3c758fc3f136c2 fix permalink to comments This commit was sponsored by Thomas May. --- diff --git a/CHANGELOG b/CHANGELOG index cb7a7a038..93b57465c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -11,6 +11,7 @@ ikiwiki (3.20180312) UNRELEASED; urgency=medium * aggregate: Fix aggregation of posts without a title. Thanks, Alexandre Oliva * poll: Added postlink and posttrail options for better multi-page polls. + * Fix permalink to comments. -- Simon McVittie Wed, 16 May 2018 13:09:27 +0100 diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm index 46e1b268f..edf5183a6 100644 --- a/IkiWiki/Plugin/comments.pm +++ b/IkiWiki/Plugin/comments.pm @@ -265,7 +265,7 @@ sub preprocess { $pagestate{$page}{meta}{title} = decode_entities($params{subject}); } - if ($params{page} =~ m/\/\Q$config{comments_pagename}\E\d+_/) { + if ($params{page} =~ m/\/\Q$config{comments_pagename}\E\d+/) { $pagestate{$page}{meta}{permalink} = urlto(IkiWiki::dirname($params{page})). "#".page_to_id($params{page}); }