diff options
author | Joey Hess <joey@kodama.kitenet.net> | 2008-05-31 15:10:23 -0400 |
---|---|---|
committer | Joey Hess <joey@kodama.kitenet.net> | 2008-05-31 15:10:23 -0400 |
commit | 99e5e6dd08ba193046a9e2c349ec5843d31c9c1c (patch) | |
tree | 3480efe0b29e41fdf2cb34f2c1f433b47d5ba017 /IkiWiki | |
parent | 0353882a6608c8cce4a3395f45b47534991d43df (diff) | |
download | ikiwiki-99e5e6dd08ba193046a9e2c349ec5843d31c9c1c.tar ikiwiki-99e5e6dd08ba193046a9e2c349ec5843d31c9c1c.tar.gz |
inline: The optimisation in 2.41 broke nested inlines. Detect those and avoid overoptimising.
Diffstat (limited to 'IkiWiki')
-rw-r--r-- | IkiWiki/Plugin/inline.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/IkiWiki/Plugin/inline.pm b/IkiWiki/Plugin/inline.pm index 1fbd8b69c..7d81e9182 100644 --- a/IkiWiki/Plugin/inline.pm +++ b/IkiWiki/Plugin/inline.pm @@ -11,6 +11,7 @@ use URI; my %knownfeeds; my %page_numfeeds; my @inline; +my $nested=0; sub import { #{{{ hook(type => "getopt", id => "inline", call => \&getopt); @@ -329,7 +330,7 @@ sub preprocess_inline (@) { #{{{ } } - return $ret if $raw; + return $ret if $raw || $nested; push @inline, $ret; return "<div class=\"inline\" id=\"$#inline\"></div>\n\n"; } #}}} @@ -350,11 +351,14 @@ sub get_inline_content ($$) { #{{{ my $file=$pagesources{$page}; my $type=pagetype($file); if (defined $type) { - return htmlize($page, $type, + $nested++; + my $ret=htmlize($page, $type, linkify($page, $destpage, preprocess($page, $destpage, filter($page, $destpage, readfile(srcfile($file)))))); + $nested--; + return $ret; } else { return ""; |