From: Joey Hess Date: Thu, 15 Apr 2010 21:50:43 +0000 (-0400) Subject: fix sidebar directive parameter handling X-Git-Tag: 3.20100427~147 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4c6f5a48bcfc2462a915387515bfa39b9239a7da;p=ikiwiki.git fix sidebar directive parameter handling --- diff --git a/IkiWiki/Plugin/sidebar.pm b/IkiWiki/Plugin/sidebar.pm index f706480ca..808f0bed2 100644 --- a/IkiWiki/Plugin/sidebar.pm +++ b/IkiWiki/Plugin/sidebar.pm @@ -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 ""; diff --git a/doc/ikiwiki/directive/sidebar.mdwn b/doc/ikiwiki/directive/sidebar.mdwn index 401d7c786..599695d22 100644 --- a/doc/ikiwiki/directive/sidebar.mdwn +++ b/doc/ikiwiki/directive/sidebar.mdwn @@ -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/*"]]