aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorbeppu <beppu@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-02-23 17:41:41 +0000
committerbeppu <beppu@69ca8d6d-28ef-0310-b511-8ec308f3f277>2001-02-23 17:41:41 +0000
commitae05c1b34a7ac87646bdf7491378cba69f4db5e1 (patch)
tree2c57d7e84bbc39ad8363a2fb0094c56e64f95c27 /docs
parent3eee6fdb3f95ab3fafa9c33618d266824ea633b6 (diff)
downloadbusybox-w32-ae05c1b34a7ac87646bdf7491378cba69f4db5e1.tar.gz
busybox-w32-ae05c1b34a7ac87646bdf7491378cba69f4db5e1.tar.bz2
busybox-w32-ae05c1b34a7ac87646bdf7491378cba69f4db5e1.zip
During POD generation, it inserts a blank line before lines
that were intended to be indented. git-svn-id: svn://busybox.net/trunk/busybox@1920 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'docs')
-rwxr-xr-xdocs/autodocifier.pl22
1 files changed, 17 insertions, 5 deletions
diff --git a/docs/autodocifier.pl b/docs/autodocifier.pl
index fc4acadc8..e02bca93e 100755
--- a/docs/autodocifier.pl
+++ b/docs/autodocifier.pl
@@ -44,14 +44,26 @@ sub pod_for_usage {
44 my $name = shift; 44 my $name = shift;
45 my $usage = shift; 45 my $usage = shift;
46 46
47 # make options bold
47 my $trivial = $usage->{trivial}; 48 my $trivial = $usage->{trivial};
48 $trivial =~s/(?<!\w)(-\w+)/B<$1>/sxg; 49 $trivial =~s/(?<!\w)(-\w+)/B<$1>/sxg;
49 50 my @f1;
50 my $full = 51 my @f0 =
51 join("\n",
52 map { $_ !~ /^\s/ && s/(?<!\w)(-\w+)/B<$1>/g; $_ } 52 map { $_ !~ /^\s/ && s/(?<!\w)(-\w+)/B<$1>/g; $_ }
53 split("\n", $usage->{full})); 53 split("\n", $usage->{full});
54
55 # add "\n" prior to certain lines to make indented
56 # lines look right
57 my $len = @f0;
58 for (my $i = 0; $i < $len; $i++) {
59 push @f1, $f0[$i];
60 if (($i+1) != $len && $f0[$i] !~ /^\s/ && $f0[$i+1] =~ /^\s/) {
61 next if ($f0[$i] =~ /^$/);
62 push(@f1, "") unless ($f0[$i+1] =~ /^\s*$/s);
63 }
64 }
54 65
66 my $full = join("\n", @f1);
55 return 67 return
56 "-------------------------------\n". 68 "-------------------------------\n".
57 "\n". 69 "\n".
@@ -180,4 +192,4 @@ John BEPPU <beppu@lineo.com>
180 192
181=cut 193=cut
182 194
183# $Id: autodocifier.pl,v 1.7 2001/02/23 16:16:08 beppu Exp $ 195# $Id: autodocifier.pl,v 1.8 2001/02/23 17:41:41 beppu Exp $