From 52c7d7ebf3ed05f24147210aa969b69bdabcc135 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Thu, 27 Jul 2006 15:12:21 +0000 Subject: [PATCH] And now, with a for loop, so it can handle the nested USE() case. --- docs/autodocifier.pl | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/autodocifier.pl b/docs/autodocifier.pl index c39260acb..4acb6bdc8 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('',