gzip: bbunzip integration fixes
[oweals/busybox.git] / docs / autodocifier.pl
index fa8c4c08acdd532daaf11974a0d80654bf7351bd..68b6f3c0585e43ae6efc155747b436882bc8ea04 100755 (executable)
@@ -21,8 +21,13 @@ sub continuation {
 # regex && eval away unwanted strings from documentation
 sub beautify {
        my $text = shift;
-       $text =~ s/USAGE_NOT\w+\(.*?"\s*\)//sxg;
-       $text =~ s/USAGE_\w+\(\s*?(.*?)"\s*\)/$1"/sxg;
+       for (;;) {
+               my $text2 = $text;
+               $text =~ s/SKIP_\w+\(.*?"\s*\)//sxg;
+               $text =~ s/USE_\w+\(\s*?(.*?)"\s*\)/$1"/sxg;
+               $text =~ s/USAGE_\w+\(\s*?(.*?)"\s*\)/$1"/sxg;
+               last if ( $text2 eq $text );
+       }
        $text =~ s/"\s*"//sg;
        my @line = split("\n", $text);
        $text = join('',
@@ -296,4 +301,3 @@ John BEPPU <b@ax9.org>
 
 =cut
 
-# $Id: autodocifier.pl,v 1.26 2004/04/06 15:26:25 andersen Exp $