]> git.vanrenterghem.biz Git - git.ikiwiki.info.git/commitdiff
inline: expand show=N backwards compatibility to negative N
authorSimon McVittie <smcv@debian.org>
Fri, 6 May 2016 21:51:02 +0000 (22:51 +0100)
committerSimon McVittie <smcv@debian.org>
Fri, 6 May 2016 21:51:02 +0000 (22:51 +0100)
[[plugins/contrib]] uses show=-1 to show the post-creation widget
without actually inlining anything.

IkiWiki/Plugin/inline.pm

index c3895d9824a0efbca3f8f339b5a4d068434cfe51..19dd684dda4bebd8635d18309139fec2ab4fa795 100644 (file)
@@ -183,7 +183,7 @@ sub preprocess_inline (@) {
        my $feedonly=yesno($params{feedonly});
 
        # Backwards compatibility
-       if (defined $params{show} && $params{show} =~ m/^\d+$/) {
+       if (defined $params{show} && $params{show} =~ m/^-?\d+$/) {
                $params{limit} = $params{show};
                delete $params{show};
        }