]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/inline.pm
web commit by XTaran: Changed case of repo link since hgweb seems to be pickier about...
[git.ikiwiki.info.git] / IkiWiki / Plugin / inline.pm
index 1fbd8b69c98ba05c0a3cca3b8d2c0331870ed292..344620ebe9ed3f0fc74f81d0bb94d2242aed4433 100644 (file)
@@ -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, $destpage, $type,
                       linkify($page, $destpage,
                       preprocess($page, $destpage,
                       filter($page, $destpage,
                       readfile(srcfile($file))))));
+               $nested--;
+               return $ret;
        }
        else {
                return "";