]> sipb.mit.edu Git - ikiwiki.git/commitdiff
Embed comments into comments_embed.tmpl rather than concatenating in perl
authorSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>
Sun, 23 Nov 2008 12:02:39 +0000 (12:02 +0000)
committerSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>
Thu, 11 Dec 2008 21:14:03 +0000 (21:14 +0000)
IkiWiki/Plugin/comments.pm

index 136dc258ebe06bfbfa2d735090fdd4203ab17545..acc3ffdb3198cd520ac59087344c1b67cc91a6fa 100644 (file)
@@ -69,8 +69,8 @@ sub preprocess (@) { #{{{
 
        debug("page $params{page} => destpage $params{destpage}");
 
-       my $posts = '';
        unless (defined $params{inline} && !IkiWiki::yesno($params{inline})) {
+               my $posts = '';
                eval q{use IkiWiki::Plugin::inline};
                error($@) if ($@);
                my @args = (
@@ -89,10 +89,11 @@ sub preprocess (@) { #{{{
                push @args, feedshow => $params{feedshow} if defined $params{feedshow};
                push @args, timeformat => $params{timeformat} if defined $params{timeformat};
                push @args, feedonly => $params{feedonly} if defined $params{feedonly};
-               $posts = "\n" . IkiWiki::preprocess_inline(@args);
+               $posts = IkiWiki::preprocess_inline(@args);
+               $formtemplate->param("comments" => $posts);
        }
 
-       return $formtemplate->output . $posts;
+       return $formtemplate->output;
 } # }}}
 
 # FIXME: logic taken from editpage, should be common code?