X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/467d5b5e2a10aab53ade882a378a2e2c215d798c..8ded30c748b9fe0ada324c89e449f72530e40ed3:/IkiWiki/Plugin/inline.pm diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 935b86b58..fe7dde14c 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -22,7 +22,6 @@ sub import { #{{{ package IkiWiki; my %toping; -my @processing_inline; sub yesno ($) { #{{{ my $val=shift; @@ -32,10 +31,6 @@ sub yesno ($) { #{{{ sub preprocess_inline (@) { #{{{ my %params=@_; - # Avoid nested inlines, to avoid loops etc. - return "" if grep { $_ eq $params{page} } @processing_inline; - push @processing_inline, $params{page}; - if (! exists $params{pages}) { return ""; } @@ -45,6 +40,12 @@ sub preprocess_inline (@) { #{{{ if (! exists $params{show} && ! $archive) { $params{show}=10; } + my $desc; + if (exists $params{description}) { + $desc = $params{description} + } else { + $desc = $config{wikiname}; + } my @list; foreach my $page (keys %pagesources) { @@ -116,8 +117,8 @@ sub preprocess_inline (@) { #{{{ my $type=pagetype($file); if (defined $type) { $ret.="\n". - preprocess($page, $params{page}, linkify($page, $params{page}, + preprocess($page, $params{page}, filter($page, readfile(srcfile($file))))); } @@ -129,11 +130,10 @@ sub preprocess_inline (@) { #{{{ # only supports listing one file per page. if ($config{rss} && $rss) { writefile(rsspage($params{page}), $config{destdir}, - genrss($params{page}, @list)); + genrss($desc, $params{page}, @list)); $toping{$params{page}}=1 unless $config{rebuild}; } - pop @processing_inline; return $ret; } #}}} @@ -145,8 +145,8 @@ sub get_inline_content ($$) { #{{{ my $type=pagetype($file); if (defined $type) { return htmlize($type, - preprocess($page, $destpage, linkify($page, $destpage, + preprocess($page, $destpage, filter($page, readfile(srcfile($file)))))); } @@ -184,7 +184,8 @@ sub rsspage ($) { #{{{ return $page.".rss"; } #}}} -sub genrss ($@) { #{{{ +sub genrss ($$@) { #{{{ + my $desc = shift; my $page=shift; my @pages=@_; @@ -219,6 +220,7 @@ sub genrss ($@) { #{{{ wikiname => $config{wikiname}, pageurl => $url, content => $content, + rssdesc => $desc, ); run_hooks(pagetemplate => sub { shift->(page => $page, destpage => $page,