fix sidebar directive parameter handling
parent
4bbbd77a48
commit
4c6f5a48bc
|
@ -33,13 +33,11 @@ my %pagesidebar;
|
||||||
|
|
||||||
sub preprocess (@) {
|
sub preprocess (@) {
|
||||||
my %params=@_;
|
my %params=@_;
|
||||||
my $content=shift;
|
|
||||||
shift;
|
|
||||||
|
|
||||||
my $page=$params{page};
|
my $page=$params{page};
|
||||||
return "" unless $page eq $params{destpage};
|
return "" unless $page eq $params{destpage};
|
||||||
|
|
||||||
if (! defined $content) {
|
if (! defined $params{content}) {
|
||||||
$pagesidebar{$page}=undef;
|
$pagesidebar{$page}=undef;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
@ -50,7 +48,7 @@ sub preprocess (@) {
|
||||||
IkiWiki::htmlize($page, $page, $type,
|
IkiWiki::htmlize($page, $page, $type,
|
||||||
IkiWiki::linkify($page, $page,
|
IkiWiki::linkify($page, $page,
|
||||||
IkiWiki::preprocess($page, $page,
|
IkiWiki::preprocess($page, $page,
|
||||||
IkiWiki::filter($page, $page, $content))));
|
IkiWiki::filter($page, $page, $params{content}))));
|
||||||
}
|
}
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
|
|
|
@ -9,7 +9,7 @@ used to disable use of the sidebar page by default.
|
||||||
|
|
||||||
## examples
|
## examples
|
||||||
|
|
||||||
\[[!sidebar """
|
\[[!sidebar content="""
|
||||||
This is my custom sidebar for this page.
|
This is my custom sidebar for this page.
|
||||||
|
|
||||||
\[[!calendar pages="posts/*"]]
|
\[[!calendar pages="posts/*"]]
|
||||||
|
|
Loading…
Reference in New Issue