]> sipb.mit.edu Git - ikiwiki.git/blobdiff - IkiWiki/Plugin/otl.pm
* Patch from James Westby to add an actions option to inline; this
[ikiwiki.git] / IkiWiki / Plugin / otl.pm
index 314ed28ad07061a90a110257800c81f5a46906d3..be339c88ebee44b77371422822ae4816a102cd5e 100644 (file)
@@ -27,7 +27,9 @@ sub filter (@) { #{{{
        return $params{content};
 } # }}}
 
-sub htmlize ($) { #{{{
+sub htmlize (@) { #{{{
+       my %params=@_;
+
        my $tries=10;
        while (1) {
                eval {
@@ -37,14 +39,14 @@ sub htmlize ($) { #{{{
                $tries--;
                if ($tries < 1) {
                        IkiWiki::debug("failed to run otl2html: $@");
-                       return shift;
+                       return $params{content};
                }
        }
        # open2 doesn't respect "use open ':utf8'"
        binmode (IN, ':utf8'); 
        binmode (OUT, ':utf8'); 
        
-       print OUT shift;
+       print OUT $params{content};
        close OUT;
 
        local $/ = undef;