fix sidebar directive parameter handling

master
Joey Hess 2010-04-15 17:50:43 -04:00
parent 4bbbd77a48
commit 4c6f5a48bc
2 changed files with 3 additions and 5 deletions

View File

@ -33,13 +33,11 @@ my %pagesidebar;
sub preprocess (@) {
my %params=@_;
my $content=shift;
shift;
my $page=$params{page};
return "" unless $page eq $params{destpage};
if (! defined $content) {
if (! defined $params{content}) {
$pagesidebar{$page}=undef;
}
else {
@ -50,7 +48,7 @@ sub preprocess (@) {
IkiWiki::htmlize($page, $page, $type,
IkiWiki::linkify($page, $page,
IkiWiki::preprocess($page, $page,
IkiWiki::filter($page, $page, $content))));
IkiWiki::filter($page, $page, $params{content}))));
}
return "";

View File

@ -9,7 +9,7 @@ used to disable use of the sidebar page by default.
## examples
\[[!sidebar """
\[[!sidebar content="""
This is my custom sidebar for this page.
\[[!calendar pages="posts/*"]]