summaryrefslogtreecommitdiff
path: root/IkiWiki/Plugin
diff options
context:
space:
mode:
authorSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>2008-11-23 12:02:39 +0000
committerSimon McVittie <smcv@ http://smcv.pseudorandom.co.uk/>2008-12-11 21:14:03 +0000
commit430ac61f2142bc92b12d16067ca7b40202d0c589 (patch)
tree53088d294d54fe3196a9cd694a536c30e9bf39f9 /IkiWiki/Plugin
parent3a46e7c7f1e33928e2306f9a629936fce43013f7 (diff)
Embed comments into comments_embed.tmpl rather than concatenating in perl
Diffstat (limited to 'IkiWiki/Plugin')
-rw-r--r--IkiWiki/Plugin/comments.pm7
1 files changed, 4 insertions, 3 deletions
diff --git a/IkiWiki/Plugin/comments.pm b/IkiWiki/Plugin/comments.pm
index 136dc258e..acc3ffdb3 100644
--- a/IkiWiki/Plugin/comments.pm
+++ b/IkiWiki/Plugin/comments.pm
@@ -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?