X-Git-Url: http://git.asbjorn.biz/?a=blobdiff_plain;f=doc%2Fcodebeautifier.pl;h=169b23c226a4a1950bed0c3ccc99a2117bda2406;hb=9e546e0ca2d4472b77020cfc745f281b7864e6f9;hp=517bd69e6aaa122423a9f249ee2d0c5c0687bd45;hpb=0703a05cbcae0bec44d6f6cb6f2ec7910559f7bf;p=swftools.git diff --git a/doc/codebeautifier.pl b/doc/codebeautifier.pl index 517bd69..169b23c 100644 --- a/doc/codebeautifier.pl +++ b/doc/codebeautifier.pl @@ -1,3 +1,4 @@ +$nr = 1; while() { if(/\[CALLPERL\s+(.*)\s+left\]/ ... /\[CALLPERL end\]/) { @@ -28,6 +29,18 @@ while() print; unlink "tmp.sc"; } + elsif ($code ne "" && ($lang eq "python" or $lang eq "shell")) { + $code =~ s/"/"/g; + if($lang eq "python") { + open(fi, ">$nr.py");print fi $code;close(fi); + $nr = $nr + 1; + } + print ""; + print $embed; + print ""; + $code=""; + print; + } elsif ($code ne "") { $code=""; }