news.html: Fix bad English
[oweals/busybox.git] / docs / autodocifier.pl
index c39260acbf3e2b5e43850bf870490f97b437b625..3aa838eb40cc74b5ba4f8cb7cf1bd778e30b75dd 100755 (executable)
@@ -21,8 +21,13 @@ sub continuation {
 # regex && eval away unwanted strings from documentation
 sub beautify {
        my $text = shift;
-       $text =~ s/SKIP_\w+\(.*?"\s*\)//sxg;
-       $text =~ s/USE_\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('',