]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/blobdiff - IkiWiki/Plugin/inline.pm
Follow up.
[git.ikiwiki.info.git] / IkiWiki / Plugin / inline.pm
index 001d2ed1a103618717b31d11a3553c0dab72cbf0..f89209a1b70e07e6bdbc65f95abdb6e685e66dbb 100644 (file)
@@ -212,7 +212,7 @@ sub preprocess_inline (@) {
                if ($params{feedshow} && $num < $params{feedshow}) {
                        $num=$params{feedshow};
                }
-               if ($params{skip}) {
+               if ($params{skip} && $num) {
                        $num+=$params{skip};
                }
 
@@ -221,7 +221,7 @@ sub preprocess_inline (@) {
                        filter => sub { $_[0] eq $params{page} },
                        sort => exists $params{sort} ? $params{sort} : "age",
                        reverse => yesno($params{reverse}),
-                       num => $num,
+                       ($num ? (num => $num) : ()),
                );
        }
 
@@ -337,7 +337,7 @@ sub preprocess_inline (@) {
                foreach my $page (@list) {
                        my $file = $pagesources{$page};
                        my $type = pagetype($file);
-                       if (! $raw || ($raw && ! defined $type)) {
+                       if (! $raw) {
                                if ($needcontent) {
                                        # Get the content before populating the
                                        # template, since getting the content uses
@@ -391,6 +391,10 @@ sub preprocess_inline (@) {
                                              filter($page, $params{destpage},
                                              readfile(srcfile($file)))));
                                }
+                               else {
+                                       $ret.="\n".
+                                             readfile(srcfile($file));
+                               }
                        }
                }
        }