projects
/
oweals
/
busybox.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
website: fix link
[oweals/busybox.git]
/
docs
/
autodocifier.pl
diff --git
a/docs/autodocifier.pl
b/docs/autodocifier.pl
index 3a29512373ab6e82435d30abf3641ceacc726a1c..3aa838eb40cc74b5ba4f8cb7cf1bd778e30b75dd 100755
(executable)
--- a/
docs/autodocifier.pl
+++ b/
docs/autodocifier.pl
@@
-21,8
+21,13
@@
sub continuation {
# regex && eval away unwanted strings from documentation
sub beautify {
my $text = shift;
# 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;
+ 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('',
$text =~ s/"\s*"//sg;
my @line = split("\n", $text);
$text = join('',
@@
-87,6
+92,13
@@
sub pod_for_usage {
split("\n", $usage->{example})) . "\n\n"
: "";
split("\n", $usage->{example})) . "\n\n"
: "";
+ # Pad the name so that the applet name gets a line
+ # by itself in BusyBox.txt
+ my $spaces = 10 - length($name);
+ if ($spaces > 0) {
+ $name .= " " x $spaces;
+ }
+
return
"=item B<$name>".
"\n\n$name $trivial\n\n".
return
"=item B<$name>".
"\n\n$name $trivial\n\n".