mirror of
https://github.com/sheumann/hush.git
synced 2024-09-12 00:55:11 +00:00
I touched perl. I feel dirty.
Make autodocifier suck less. It still doesn't handle nested USE( USE() ) case (the inner USE() winds up in the output), but making it recursive involves getting perl to accept a "for" loop and it's telling me that "break" is an unrecognized bareword and I hate perl. This is at least an improvement.
This commit is contained in:
parent
eac0c06938
commit
277eb6bb44
@ -21,8 +21,8 @@ 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;
|
||||
$text =~ s/SKIP_\w+\(.*?"\s*\)//sxg;
|
||||
$text =~ s/USE_\w+\(\s*?(.*?)"\s*\)/$1"/sxg;
|
||||
$text =~ s/"\s*"//sg;
|
||||
my @line = split("\n", $text);
|
||||
$text = join('',
|
||||
|
Loading…
Reference in New Issue
Block a user