summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Landley2006-07-27 15:12:21 +0000
committerRob Landley2006-07-27 15:12:21 +0000
commit52c7d7ebf3ed05f24147210aa969b69bdabcc135 (patch)
tree2f082bba6e8a01af8a8b1549b5668ea4948b3b05
parentfc367f98244c14ec0deeee7a5533811cc9aa2538 (diff)
downloadbusybox-52c7d7ebf3ed05f24147210aa969b69bdabcc135.zip
busybox-52c7d7ebf3ed05f24147210aa969b69bdabcc135.tar.gz
And now, with a for loop, so it can handle the nested USE() case.
-rwxr-xr-xdocs/autodocifier.pl8
1 files changed, 6 insertions, 2 deletions
diff --git a/docs/autodocifier.pl b/docs/autodocifier.pl
index c39260a..4acb6bd 100755
--- a/docs/autodocifier.pl
+++ b/docs/autodocifier.pl
@@ -21,8 +21,12 @@ 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;
+ last if ( $text2 eq $text );
+ }
$text =~ s/"\s*"//sg;
my @line = split("\n", $text);
$text = join('',