From f39763843ca444942f09cab48547c7337ee1302a Mon Sep 17 00:00:00 2001 From: kramm Date: Tue, 1 Apr 2008 16:14:10 +0000 Subject: [PATCH] support for python and shellscript --- doc/codebeautifier.pl | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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=""; } -- 1.7.10.4