more robustly. I also blow away any USAGE_NOT_\w+ macros.
# regex && eval away unwanted strings from documentation
sub beautify {
my $text = shift;
- $text =~ s/USAGE_\w+\([\s]*?(".*?").*?\)/$1/sg;
- $text =~ s/"[\s]*"//sg;
+ $text =~ s/USAGE_NOT\w+\(.*?"\s*\)//sxg;
+ $text =~ s/USAGE_\w+\(\s*?(.*?)"\s*\)/$1"/sxg;
+ $text =~ s/"\s*"//sg;
my @line = split("\n", $text);
$text = join('',
map { eval }
}
@line
);
+ print STDERR "-- d\n";
+ print STDERR $text;
return $text;
}
=cut
-# $Id: autodocifier.pl,v 1.5 2001/02/23 13:04:39 beppu Exp $
+# $Id: autodocifier.pl,v 1.6 2001/02/23 16:15:34 beppu Exp $