]> git.donarmstrong.com Git - ikiwiki_plugins.git/blobdiff - sweavealike.pm
add missing semicolon
[ikiwiki_plugins.git] / sweavealike.pm
index c98c07304a463384fdc4e19f41efd571ac2d4e26..2989c83e2bc131accf5fc748fbfbd4d35a51377c 100644 (file)
@@ -62,8 +62,8 @@ sub preprocess {
     if ($@) {
        error($@);
     }
-    my $output;
-    if ($param{verbatim}) {
+    my $output = "sweave output\n\n";
+    if (exists $param{verbatim}) {
        $output = $param{code};
        $output =~ s/^/> /mg;
     }
@@ -92,7 +92,7 @@ sub savestate {
        next unless exists $pagestate{$page}{$id};
        next unless exists $pagestate{$page}{$id}{R};
        if (defined $pagestate{$page}{$id}{R}
-           and $pagestate{$param{page}}{$id}{R}->is_started()) {
+           and $pagestate{$page}{$id}{R}->is_started()) {
            $pagestate{$page}{$id}{R}->stop;
        }
        delete $pagestate{$page}{$id}{R};