And now, with a for loop, so it can handle the nested USE() case.
This commit is contained in:
parent
fc367f9824
commit
52c7d7ebf3
@ -21,8 +21,12 @@ sub continuation {
|
|||||||
# regex && eval away unwanted strings from documentation
|
# regex && eval away unwanted strings from documentation
|
||||||
sub beautify {
|
sub beautify {
|
||||||
my $text = shift;
|
my $text = shift;
|
||||||
$text =~ s/SKIP_\w+\(.*?"\s*\)//sxg;
|
for (;;) {
|
||||||
$text =~ s/USE_\w+\(\s*?(.*?)"\s*\)/$1"/sxg;
|
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;
|
$text =~ s/"\s*"//sg;
|
||||||
my @line = split("\n", $text);
|
my @line = split("\n", $text);
|
||||||
$text = join('',
|
$text = join('',
|
||||||
|
Loading…
x
Reference in New Issue
Block a user